Answer the question
In order to leave comments, you need to log in
How to make OpenGL textures work with very little video memory?
There is a game written in C++ using OpenGL. The game makes extensive use of various textures for a total of 128~256 MB of video memory. When working on computers that have a video card with video memory less than 128 megabytes, many textures are displayed as white polygons, which means that the textures did not load.
I get a similar result when starting the game from under VirtualBox, where the video memory is obviously not enough. However, I've noticed that as soon as I start Qt Creator (the development environment included with Qt), which partially uses OpenGL to render its interface, it magically allows the game to run correctly with full support for all textures.
The question is, how do I compensate for the lack of video memory for textures on weaker video cards, or how do I enable software rendering mode if the video card is not able to work correctly with OpenGL or has too little RAM?
The problem with the game occurred on a Windows XP computer with 128 MB of video memory (Intel(R) 82865G) and 512 MB of RAM. On a similar computer with more video memory, the game works correctly. The problem also occurs on VirtualBox even despite 256 megabytes of video memory.
The application is cross-platform, I use SDL2, I build the game under Linux (G++ >=4.7), Windows (MinGW >=4.7) and Mac OS X (clang++ >=3.6).
Answer the question
In order to leave comments, you need to log in
It may not even be the amount of video memory. Perhaps the first video card does not support some kind of extension, but the second one does, so it draws normally. I don't remember what it's called, but my colleague had one.
Well, if the problem is still in volume, then you can monitor how much memory you take and dynamically unload some textures that are not needed at the moment, they need to be loaded for rendering. This will certainly squander the FPS, but what can you do.
As an option to redo the levels, so as to reduce the number of textures.
Just for the test, you can reduce the size of all textures and see what happens.
PS Do you have all texture sizes that are multiples of a power of two?
PSS The trick with QtCreator inclines me to the opinion that these are problems with the supported extensions of the video card itself.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question