GL texture problems
Aric.Cyr at gmail.com
Mon Feb 13 21:31:42 CST 2006
H. Verbeet <hverbeet <at> gmail.com> writes:
> On 13/02/06, Stefan Dösinger <stefandoesinger <at> gmx.at> wrote:
> > Hello,
> > I'm trying to change IWineD3DSurface::UnlockRect for rendertargets to avoid
> > glDrawPixels. Instead, I'd like to load the image from memory into an OpenGL
> > texture, and draw that texture with a textured quad onto the front / back
> > buffer.
> I've only had a quick look, so I may have overlooked it, but were do
> you bind the texture?
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
On termination you should cleanup with glDeleteTextures(1, &This->texture_id).
More information about the wine-devel