Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Howie

OpenGL OpenGL textures

This topic is 6786 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Well, that''s exactly what I wanted to know (and expected to hear...).
But OpenGL doesn''t prevent loading a texture twice into RAM?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!