Is the attached what you mean?
Erich Hoover ehoover@mines.edu
On 3/11/07, Stefan Dösinger stefandoesinger@gmx.at wrote:
Am Sonntag 11 März 2007 21:08 schrieb Erich Hoover:
Yeah, that would make more sense wouldn't it :) Please see attached
patch. If you do it that way, you can remove the PreLoad, LockRect the surface(with WINED3DLOCK_READONLY), use glTexImage2D to load This->cursorTexture and then Unlock the surface. This saves uploading -> downloading -> uploading. If you use that way, please remove SFLAG_FORCELOAD too.
You should make sure that a correct gl texture unit is activated before loading This->cursorTexture with GL_EXTCALL(glActiveTextureARB(X)); Search through the code how that is done, you have to make sure that glActiveTextureARB is supported before using it. You don't have to enable GL_TEXTURE_2D to my knowledge to call glTexImage2D, but you have to restore the originally bound texture or dirtify the sampler you modify(IWineD3DDeviceImpl_MarkStateDirty(This, SAMPLER(X)); where X is the unit you selected before. (X = 0 is prefered).