shithub: tinygl

Download patch

ref: e8a1850c8d24d423c8d095c895fbd5e53394eac3
parent: f03aac3fa4e87533f0606b6d28a594504d1b0d1f
author: David <gek@katherine>
date: Wed Feb 17 09:46:46 EST 2021

Documentation update

--- a/README.md
+++ b/README.md
@@ -39,6 +39,9 @@
 
 ![model loading demo](model_hole.gif)
 
+Blending:
+![model loading demo](blend.gif)
+
 
 
 TinyGL 0.8 (c) 1997-2021 Fabrice Bellard, C-Chads, Gek (see License, it's free software)
--- a/SDL_Examples/gears.c
+++ b/SDL_Examples/gears.c
@@ -385,10 +385,10 @@
 	glBlendFunc(GL_ONE_MINUS_SRC_COLOR, GL_ZERO);
 	glBlendEquation(GL_FUNC_ADD);
 	if(blending){
-		glEnable(GL_DEPTH_TEST);
+		glDisable(GL_DEPTH_TEST);
 		glEnable(GL_BLEND);
-		glDepthMask(GL_TRUE);
-		glBlendFunc(GL_ONE_MINUS_SRC_COLOR, GL_ZERO);
+		glDepthMask(GL_FALSE);
+		glBlendFunc(GL_SRC_COLOR, GL_DST_COLOR);
 		glBlendEquation(GL_FUNC_ADD);
 	}else{
 		glEnable(GL_DEPTH_TEST);
binary files /dev/null b/blend.gif differ