Clearing Buffers

What it says on the tin: a place to discuss proposed new features.
Post Reply
User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
x 16
Contact:

Clearing Buffers

Post by KungFooMasta »

Would be great to have a convenience method to clear buffers. For example, I'm finding issues when loading a .png file into memory, setting pixel values, and saving back out to file.

Can it be done using something like this?

Code: Select all

void* ptr = buf->lock(...);
memset(ptr,0,textureWidth * textureHeight * sizeof(NotSure));
buf->unlock();
Regardless, it would be a simple and convenient function to have for buffers, right? (Solutions to clearing Texture buffers are welcome also :) )
Creator of QuickGUI!
Post Reply