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_MOD_ALPHA and GPU_BLEND_SET_ALPHA.

+22
+20
SDL_gpu/GL_common/SDL_gpu_GL_common.inl
··· 521 521 glBlendFunc(GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA); 522 522 glBlendEquation(GL_FUNC_REVERSE_SUBTRACT); 523 523 } 524 + else if(mode == GPU_BLEND_MOD_ALPHA) 525 + { 526 + if(!(renderer->enabled_features & GPU_FEATURE_BLEND_FUNC_SEPARATE)) 527 + return; 528 + // Don't disturb the colors, but multiply the dest alpha by the src alpha 529 + glBlendFuncSeparate(GL_ZERO, GL_ONE, GL_ZERO, GL_SRC_ALPHA); 530 + if(!(renderer->enabled_features & GPU_FEATURE_BLEND_EQUATIONS)) 531 + return; 532 + glBlendEquation(GL_FUNC_ADD); 533 + } 534 + else if(mode == GPU_BLEND_SET_ALPHA) 535 + { 536 + if(!(renderer->enabled_features & GPU_FEATURE_BLEND_FUNC_SEPARATE)) 537 + return; 538 + // Don't disturb the colors, but set the alpha to the src alpha 539 + glBlendFuncSeparate(GL_ZERO, GL_ONE, GL_ONE, GL_ZERO); 540 + if(!(renderer->enabled_features & GPU_FEATURE_BLEND_EQUATIONS)) 541 + return; 542 + glBlendEquation(GL_FUNC_ADD); 543 + } 524 544 } 525 545 526 546
+2
SDL_gpu/SDL_gpu.h
··· 97 97 GPU_BLEND_DIFFERENCE = 9, 98 98 GPU_BLEND_PUNCHOUT = 10, 99 99 GPU_BLEND_CUTOUT = 11, 100 + GPU_BLEND_MOD_ALPHA = 12, 101 + GPU_BLEND_SET_ALPHA = 13, 100 102 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. 101 103 } GPU_BlendEnum; 102 104