GL texture problems

Stefan Dösinger stefandoesinger at gmx.at
Thu Feb 16 13:05:00 CST 2006


Hi,
> Indeed, from looking at the patch you will need to call glGenTextures, then
> glBindTexture.  Something like the following should.  However if you
> anticipate the texture target getting rebound overtime, you will have to
> maintain the texture  ID so you can rebind it with glBindTexture() before
> each call to glTexSubImage2D.
I got a bit delayed by a hard drive crash, but now I've come back to this 
problem. I added a glGenTextures, glBindTexture before drawing, and a 
glBindTexture(GL_TEXTURE_2D, 0) and a glDeleteTexture after drawing, but this 
didn't improve the problem. The texture still has the solid color of the 
first pixel :(

Another possible problem I've found was that I calculated the texture coords 
with a int / int division. I've typcasted that to float / float, but without 
any change.

The texture is meant to be used only once, because on the next UnlockRect call 
on a rendertarget, the app might have changed the whole memory, and I have to 
re-load the whole locked area
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20060216/155f255f/attachment.pgp


More information about the wine-devel mailing list