Game Development Community

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*.

About the author

Tom is a programmer and co-owner of Sickhead Games, LLC.


#1
10/30/2006 (8:35 pm)
Bump!
#2
10/31/2006 (10:49 am)
Hey Tom!

Yes, it does. You are correct!
#3
10/31/2006 (10:50 am)
#2336, incidentally.