Silly question : basic resolution changer

Blitz3D Forums/Blitz3D Beginners Area/Silly question : basic resolution changer

Buff Jigsaw(Posted 2014) [#1]
Why does hitting the R key make the cone disappear ?

; Graphics3D Example
; ------------------
Global camera
; Set 3D graphics mode
Graphics3D 640,480,32,2

SetBuffer BackBuffer()

camera=CreateCamera()
light=CreateLight()

cone=CreateCone( 32 )
PositionEntity cone,0,0,5


While Not KeyDown( 1 ) ;start the loop

If KeyHit(19) ;hit the R key to change the resolution
Graphics3D 1280,720,32,2
EndIf

RenderWorld
Flip
Wend

End



Krischan(Posted 2014) [#2]
Because after the Graphics3D command you must initiate ALL objects again, it clears all objects/textures from memory, other vars will stay however.


Buff Jigsaw(Posted 2014) [#3]
Got it. Thank you.


Krischan(Posted 2014) [#4]
In Blitzmax+miniB3D I managed to change the resolution without initializing the objects/textures again, I only had to free the camera before the Graphics3D command and created a new camera after it :-) But I doubt this works in Blitz3D, too.

Taken directly from my framework:



Buff Jigsaw(Posted 2014) [#5]
Yeah,

I tried a few things based on your example and the result was the same as before. In Blitz3D, changing the graphics mode seems to wipe most of the graphics memory. That is my interpretation anyway.


fox95871(Posted 2014) [#6]
delete


Yue(Posted 2014) [#7]
Imposible, End Graphics or Graphics3D removed the content of the memory and reset everything plays obligation.