Dremora posted this a while back:
http://www.blitzbasic.com/Community/posts.php?topic=56916#632770
"You can't control whats in VRAM. If you use DirectX then only the textures are in VRAM that are needed at the moment. Thats managed through DirectX. If you use OpenGL, then you can't do anything about it. This needs the texture in VRAM as OpenGL does not offer its own management (you would need to write an own management)."
But in another post on another forum (check the 2nd post down) the users states OpenGL is handling the textures similar to DirectX.
http://www.gamedev.net/community/forums/topic.asp?topic_id=461133
Anyway, something strange is indeed going on, in this demo I repeatedly load an image into a TImage and display it.
In OpenGL mode, memory usage sky rockets climbing to 200-300mb and going back down, etc, etc. Very shaky frame rates, etc, etc.
In DirectX Mode, memory usage seems to be alot less and alot more stable. Frame rate is ofcourse still choppy, but much less noticable compared to OpenGL.
Q) What's the 100% official answer? Is OpenGL mode managing our textures? Swapping in/out as needed?
Q) What internally is happening when we code something like: MyImage:TImage = Null ? Is the internal surface created for that image also being destroyed to free up video memory? If it's not being destroyed, this could be a useful addition to the underlying graphics driver.
Obviously if there is no texture management going on under OpenGL, games that "only" load 32,64,128mb will be ok if they're running on a card that supports their vram requirements. But what if you want to code a game where each level loads a new background, sprites, animations, etc, etc. If nothing is getting destroyed or managed, is it safe to assume eventually performance will suffer?
http://www.blitzbasic.com/Community/posts.php?topic=56916#632770
"You can't control whats in VRAM. If you use DirectX then only the textures are in VRAM that are needed at the moment. Thats managed through DirectX. If you use OpenGL, then you can't do anything about it. This needs the texture in VRAM as OpenGL does not offer its own management (you would need to write an own management)."
But in another post on another forum (check the 2nd post down) the users states OpenGL is handling the textures similar to DirectX.
http://www.gamedev.net/community/forums/topic.asp?topic_id=461133
Anyway, something strange is indeed going on, in this demo I repeatedly load an image into a TImage and display it.
SuperStrict 'SetGraphicsDriver D3D7Max2DDriver() SetGraphicsDriver GLMax2DDriver() Graphics(800,600,0,60) Global t1:TImage t1 = New TImage ' While Not KeyDown(KEY_ESCAPE) Cls() t1= LoadImage("t1.jpg",0) ' any image, but try one 1024x1024 DrawImage(t1,MouseX(),MouseY()) Flip(1) Wend EndGraphics() End
In OpenGL mode, memory usage sky rockets climbing to 200-300mb and going back down, etc, etc. Very shaky frame rates, etc, etc.
In DirectX Mode, memory usage seems to be alot less and alot more stable. Frame rate is ofcourse still choppy, but much less noticable compared to OpenGL.
Q) What's the 100% official answer? Is OpenGL mode managing our textures? Swapping in/out as needed?
Q) What internally is happening when we code something like: MyImage:TImage = Null ? Is the internal surface created for that image also being destroyed to free up video memory? If it's not being destroyed, this could be a useful addition to the underlying graphics driver.
Obviously if there is no texture management going on under OpenGL, games that "only" load 32,64,128mb will be ok if they're running on a card that supports their vram requirements. But what if you want to code a game where each level loads a new background, sprites, animations, etc, etc. If nothing is getting destroyed or managed, is it safe to assume eventually performance will suffer?