• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Why are surfaces volatile?

P

Paolo Mazzon

Guest
I understand that in Gamemaker, you must check that a surfaces exists before drawing it because if you minimize the window or something, it could be wiped from vram; but why?

For a while now I've been working with SFML and SDL2 (Both of which use OpenGL (No, I did not use SDL2 software rendering.)) and when using it, I noticed that when I make a texture in vram (Not software surface), I can draw to it all I like and know for a fact it will be there until the end of execution.

Why is it that Gamemaker's surfaces which are also in vram (as the documentation states) is high risk for being destroyed?
 
A

Aura

Guest
I'm pretty sure the Manual gives a reason as well. This is because they are stored in the texture memory and may be overwritten when the target platform needs that memory for something else. (source)
 
P

Paolo Mazzon

Guest
@Jas
Makes enough sense; at least to someone who knows nothing of the DirectX api. I never thought of this till now, but if GM (Windows) applications are on a DirectX framework, how do GLSL shaders work? I was under the impression that GLSL was OpenGL and HLSL was DirectX. (Kind of off topic, but I guess while there is someone who knows the DirectX api here, I might as well get the question out now.)
 
I

icuurd12b42

Guest
Why is it that Gamemaker's surfaces which are also in vram (as the documentation states) is high risk for being destroyed?
Because resource is limited in both ram and number of pages than can reside on board... an application may get activated and require its data to be loaded up and nukes the other's data out of the way. your own game could technically destroy resources it created prior
 
Top