comparison test/testgl.c @ 243:cf4944faad96

Fixed testgl so that SDL_GL_Enter2DMode() allows alpha blending
author Sam Lantinga <slouken@libsdl.org>
date Thu, 22 Nov 2001 06:34:25 +0000
parents 1af4be6a73cd
children 66f815c147ed
comparison
equal deleted inserted replaced
242:4bcb29d3769c 243:cf4944faad96
115 */ 115 */
116 glPushAttrib(GL_ENABLE_BIT); 116 glPushAttrib(GL_ENABLE_BIT);
117 glDisable(GL_DEPTH_TEST); 117 glDisable(GL_DEPTH_TEST);
118 glDisable(GL_CULL_FACE); 118 glDisable(GL_CULL_FACE);
119 glEnable(GL_TEXTURE_2D); 119 glEnable(GL_TEXTURE_2D);
120
121 /* This allows alpha blending of 2D textures with the scene */
122 glEnable(GL_BLEND);
123 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
120 124
121 glViewport(0, 0, screen->w, screen->h); 125 glViewport(0, 0, screen->w, screen->h);
122 126
123 glMatrixMode(GL_PROJECTION); 127 glMatrixMode(GL_PROJECTION);
124 glPushMatrix(); 128 glPushMatrix();