GFXTexHandle::lock bug
by Tom Spilman · in Torque Game Engine Advanced · 10/02/2006 (10:57 am) · 3 replies
GFXTexHandle::lock() returns a void pointer. I assume that's supposed to be the bits of the locked surface (because it's not documented... :P). Internally it calls GFXTextureObject::lock() returning it's result. The problem is that GFXTextureObject::lock() returns a GFXLockedRect* and not the locked bits. Since the first member of structure is the 'pitch' of the locked rect, you end up missing the last few bits of the texture.
Seems like GFXTexHandle::lock() needs to be modified to return a GFXLockedRect*.
Seems like GFXTexHandle::lock() needs to be modified to return a GFXLockedRect*.
About the author
Tom is a programmer and co-owner of Sickhead Games, LLC.
Associate Tom Spilman
Sickhead Games