Fragmented graphics in fullscreen mode

BlitzMax Forums/BlitzMax Programming/Fragmented graphics in fullscreen mode

maverick69(Posted 2011) [#1]
Hi,

one of my beta testers had a problem with my current game when he switches to fullscreen mode:



The buttons are draw using SetViewport and TileImage. Here is the code snippet:

SetViewport(viewportX, viewportY, viewportW, viewportH)
TileImage IMG, X, Y, frame
SetViewport(oldViewportX, oldViewportY, oldViewportW, oldViewportH)


Any suggestions how to fix it (I cannot reproduce it on any of my machines).


GfK(Posted 2011) [#2]
I don't want to be Captain Obvious, but SetViewport does not work properly on some [usually older] hardware.


maverick69(Posted 2011) [#3]
I see. Thank you for the info.

Do you know of any workarounds for this problem?


Czar Flavius(Posted 2011) [#4]
Make the buttons a full image and draw them normally. I know it sucks you have to change the way your gui works for this, but it's the only way to avoid the hassle.


SLotman(Posted 2011) [#5]
OpenGL? You could try ShareGLContexts() if it is... (call it before initializing the video)

Last edited 2011


maverick69(Posted 2011) [#6]
@CzarFlavius: Yeah, the problem is that the width and height of buttons / windows will be automatically calculated and filled with a repeated texture. So, saving everthing as image would have the disadvantage that I need many differen pictures for various sized buttons / requesters.

@Slotman: I will try that. Thank you.


Czar Flavius(Posted 2011) [#7]
You can tile them manually. It will just be awkward.