SFML community forums
Help => Graphics => Topic started by: dydya-stepa on December 25, 2011, 01:23:22 pm
-
what happens if the size of textures loaded is larger then the available video memory ?
Let's say I want to load 100 sprites in total 100 Mb but video card has only 64 Mb ?
-
The driver manage that. Most likely say just that the operation for creating it failed.
And Sprites aren't that big and is not uploaded to the graphics card like that, I think you mean textures/images
-
of course i do.
but still i don't get the idea. I will start creating images... Memory occupied by them reaches the video card limit - what happens then ?
-
No one ever covered it for me but I see it as two different things that can possible happen, either the driver tells us (SFML) that the creation of the texture failed or the driver moves unused textures to the primary memory or the secondary. But we should just assume that the driver will fail if this happen. So just check if the Create functions return false.
-
and what should i do if it returns false? abort the game? what's the difference then with a just termination
-
I don't understand the question? You want to know why SFML doesn't abort itself?
You are allowed to handle it however you want yourself. I tell my texture manager to collect unused textures and unload them. You can make an über smart system to handle this if you want. Or you can just keep it simple and abort of course.