OpenGL textures
I''m very new to OpenGL programming and have the following question: Suppose my video-card has 32Mb of RAM. But the textures my game uses are bigger than 32Mb altogether. Does OpenGL automatically select which texture is used in video-ram and which one not? Or do I have to implement a buffer system by myself?
Hard to understand, I know..
Sorry for my poor English!
Bye
actually, you can specify which textures have precedence over others by assigning priority levels with glPrioritizeTextures() like this :
GLuint texture_objects[5];
GLclampf texture_priorities[5];
glPrioritizeTextures(5, texture_objects, texture_priorities);
where texture_objects is an array of texture objects, and texture_priorities ranges rom 0 to 1, with 1 being highest priority.
a2k
(btw, your english is fine, even spelling, about 99% perfect)
Edited by - a2k on 4/15/00 9:34:50 AM
GLuint texture_objects[5];
GLclampf texture_priorities[5];
glPrioritizeTextures(5, texture_objects, texture_priorities);
where texture_objects is an array of texture objects, and texture_priorities ranges rom 0 to 1, with 1 being highest priority.
a2k
(btw, your english is fine, even spelling, about 99% perfect)
Edited by - a2k on 4/15/00 9:34:50 AM
I want to add that you haven''t got all of the 32 MB for textures because you need some memory for the framebuffer.
Visit our homepage: www.rarebyte.de.st
GA
Visit our homepage: www.rarebyte.de.st
GA
But there is an internal buffer-system, isn''t it?
I want to know that due to the question of implementing such a buffer-system by myself.
So, is it possible to overflow my video-ram just by loading textures? Or can I load as much as I want and OpenGL cares about everything else?
Thanks,
Bengt Rosenberger
I want to know that due to the question of implementing such a buffer-system by myself.
So, is it possible to overflow my video-ram just by loading textures? Or can I load as much as I want and OpenGL cares about everything else?
Thanks,
Bengt Rosenberger
OpenGL loads the textures into system RAM if there''s no more space in video RAM, but you can imagine that the program runs much slower then.
Visit our homepage: www.rarebyte.de.st
GA
Visit our homepage: www.rarebyte.de.st
GA
Well, that''s exactly what I wanted to know (and expected to hear...).
But OpenGL doesn''t prevent loading a texture twice into RAM?
But OpenGL doesn''t prevent loading a texture twice into RAM?
Nope. (How should openGl know if a texture has already been loaded?)
Uh, and to ga : I think that on win9x systems, opengl has to keep copies of every texture stored in the v-ram also in the system memory, because opengl will never get any hint from win9x if the video memory is about to be lost.
I think opengl just loads any texture (from the sys-mem) into the v-ram if it hasn't already been loaded. And if there isn't anymore space, it just kicks the texture with the lowes priority to free up some space.
(Correct me if I'm wrong)
Edited by - Chappa on 4/17/00 6:53:29 PM
Uh, and to ga : I think that on win9x systems, opengl has to keep copies of every texture stored in the v-ram also in the system memory, because opengl will never get any hint from win9x if the video memory is about to be lost.
I think opengl just loads any texture (from the sys-mem) into the v-ram if it hasn't already been loaded. And if there isn't anymore space, it just kicks the texture with the lowes priority to free up some space.
(Correct me if I'm wrong)
Edited by - Chappa on 4/17/00 6:53:29 PM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement