pixmaps don't clip?

BlitzMax Forums/BlitzMax Programming/pixmaps don't clip?

Russell(Posted 2010) [#1]
It doesn't cause a program error, per se, but I notice that if a pixmap is drawn partially or completely outside the display, a direct3d error message appears on the output window (something about failure to lock a texture or something).

Funny thing is, TImages don't do this, even though, internally, they are pixmaps too...

Russell


ima747(Posted 2010) [#2]
I believe direct pixmap drawing is handled very differently by each driver, whereas image drawing is a bit more unified (since the pixmap is used to generate a texture, and thus the pixmap itself is not actually used for the drawing, hence the need to lock/unlock if you want to edit the pixmap, which causes the texture to be rebuilt)


Russell(Posted 2010) [#3]
Still, it's just weird. I'm guessing (hoping?) that this error generation does not affect release mode exe's in a negative way (memory leaks, exceptions, etc).

The fact that this is not handled by DrawPixmap is a bit of an inconvenience, and somewhat nullifies the benefit of using TPixmaps over TImages...

Relating to Unlock(), if you look at the actual source code for Unlock(), it is completely empty and does not actually do anything whatsoever! Strange that it would be required :/

Russell