minor pixmap bug
BlitzMax Forums/BlitzMax Programming/minor pixmap bug
| ||
'OpenGL reports pixel coordinates out of bounds but DirectX works as normal for 0,0,0,0 xywh coordinates. 'Comment SetGraphicsDriver to see SuperStrict SetGraphicsDriver GLMax2DDriver() Graphics 800,600,0 Local pixmap:TPixmap = CreatePixmap(128,128,PF_RGBA8888) Local temp:TPixmap = PixmapWindow( pixmap , 0 , 0 , 0 , 0 ) Local image:TImage = LoadImage( temp ) DrawImage image , 0 , 0 |
| ||
You will need to copy the result of PixmapWindow for this to work reliably, eg:SuperStrict SetGraphicsDriver GLMax2DDriver() Graphics 800,600,0 Local pixmap:TPixmap = CreatePixmap(128,128,PF_RGBA8888) Local temp:TPixmap = PixmapWindow( pixmap , 0 , 0 , 0 , 0 ).Copy() Local image:TImage = LoadImage( temp ) DrawImage image , 0 , 0 Pixmap 'windows' are only as valid as long as their source pixmaps exist. |
| ||
Thanks but the bug is moaning about coordinates 0,0,0,0 under opengl and it does not throw an error under dx (it actually works under dx) I just wanted to point out the inconsistency. And thanks for the .copy() tip - thats fixed my other problem! |