Windowed mode resize

Archives Forums/Blitz3D SDK Programming/Windowed mode resize

Brendane(Posted 2007) [#1]
Can we have a resize function for windowed modes.

ie. I want to resize the Graphics3D to my newly sized window without having to close the graphics.


Pinete(Posted 2007) [#2]
good question!
I'm very interested too...


dynaman(Posted 2007) [#3]
I think there was a note in the documentation that the trick was to make the windowed mode size as large as needed (maximum window size) and then use the viewport commands.


Pinete(Posted 2007) [#4]
could you please explain this a little more?

Thanks in advance!


ziggy(Posted 2007) [#5]
Good point... Currently I'm ending graphics and creating them again (and realoding everything) on the resize command... and working this way sucks...


dynaman(Posted 2007) [#6]
> could you please explain this a little more?

If you are working on a 1024 by 768 display and the rendering window is 400 by 200 then then do the following. (psuedocode)

bbsetblitz3dhwnd(control.hwnd)
bbbeginblitz#d()
graphics3d(1024,768)
cam = bbcreatecamera
bbcameraviewport(cam,0,0,400,200)

When the output area is resized do another bbcamerviewport command.

For the 2D modes there should be something similar