this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Added new blend modes: GPU_BLEND_SET and GPU_BLEND_KEEP_ALPHA.

+19
+17
SDL_gpu/GL_common/SDL_gpu_GL_common.inl
··· 541 541 return; 542 542 glBlendEquation(GL_FUNC_ADD); 543 543 } 544 + else if(mode == GPU_BLEND_SET) 545 + { 546 + glBlendFunc(GL_ONE, GL_ZERO); 547 + if(!(renderer->enabled_features & GPU_FEATURE_BLEND_EQUATIONS)) 548 + return; 549 + glBlendEquation(GL_FUNC_ADD); 550 + } 551 + else if(mode == GPU_BLEND_KEEP_ALPHA) 552 + { 553 + if(!(renderer->enabled_features & GPU_FEATURE_BLEND_FUNC_SEPARATE)) 554 + return; 555 + // Don't disturb the alpha 556 + glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ZERO, GL_ONE); 557 + if(!(renderer->enabled_features & GPU_FEATURE_BLEND_EQUATIONS)) 558 + return; 559 + glBlendEquation(GL_FUNC_ADD); 560 + } 544 561 } 545 562 546 563
+2
SDL_gpu/SDL_gpu.h
··· 99 99 GPU_BLEND_CUTOUT = 11, 100 100 GPU_BLEND_MOD_ALPHA = 12, 101 101 GPU_BLEND_SET_ALPHA = 13, 102 + GPU_BLEND_SET = 14, 103 + GPU_BLEND_KEEP_ALPHA = 15, 102 104 GPU_BLEND_OVERRIDE = 100 // Lets you specify direct GL calls before blitting. Note: You should call GPU_FlushBlitBuffer() before you change blend modes via OpenGL so the new blend mode doesn't affect SDL_gpu's previously buffered blits. 103 105 } GPU_BlendEnum; 104 106