wined3d: Allow SetCursorProperties on existing cursor

Stefan Dösinger stefandoesinger at gmx.at
Mon Mar 12 04:20:27 CDT 2007


Am Sonntag 11 März 2007 23:58 schrieb Erich Hoover:
> Is the attached what you mean?
Yes, that looks better. A few minor things:

You can remove the SFLAG_FORCELOAD definition from wined3d_private.h now. 
Also, if I remember right, the cursor must be A8R8G8B8, so instead of reading 
the description from the surface you can read it from the pixel format 
table(getFormatDescEntry). I think pSur->glDescription is set on the first 
PreLoad only. Instead of hardcoding GL_RGBA in the glTexImage2D call use the 
internal format returned by getFormatDescEntry. Finally, 
pSur->resource.wineD3DDevice == This, so you don't have to read the device 
from the surface.

> Erich Hoover
> ehoover at mines.edu
>
> On 3/11/07, Stefan Dösinger <stefandoesinger at 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).
-------------- 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/20070312/a990abbc/attachment.pgp


More information about the wine-devel mailing list