PDA

View Full Version : glBindTexture with ALPHA sux on NVIDIA Cards !?


hgore69
2005.03.12, 02:45 PM
dear all !

i have a rather simple algorithm that renders an object to a texture. now i want to use several of these textures to fake some kind of "motionblur".
i do the following:

glClearColor(1.0f, 1.0f, 1.0f, 0.f); //ALPHA 0 !!
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
pMyObject->Render();
glBindTexture(GL_TEXTURE_2D,myTextureGLINT);
glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, g_Viewport, g_Viewport, 0);

later on i render this texture via:

glColor4f(1.f,1.f,1.f,alpha); //alphafade
glBindTexture(GL_TEXTURE_2D, myTextureGLINT);

so far so good - works totally nice on ATI cards - but not at all on NVIDIA (latest driver - no question) - any ideas on this ???
do i eventually have to use some "strange" NV_ extension to make this work ??
please help !!!

thnx & many greetings
h.

PS: i am using SDL - eventually my setup sux somehow ??
PPS: i create the texture in mem with mainly:
glTexImage2D(GL_TEXTURE_2D, 0, 4, 512, 512, 0, type, GL_UNSIGNED_INT, pToMyTexture);

OneSadCookie
2005.03.12, 04:35 PM
did you remember to request destination alpha in your opengl setup code? enable blending? choose an appropriate blendfunc?