Jump to content
  • Advertisement
Sign in to follow this  
manonoc

OpenGL quantity of VRAM available

This topic is 3804 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

hello, I would like to know the quatity of VRAM available, for VBO storage. Is there an openGL function ? I've read, on a recent post that we can have this quantity with DirectX, or we must ask the OS directly, but it seems strange that this functionnality is not in GLUT, for example.

Share this post


Link to post
Share on other sites
Advertisement
It fits perfectly instead. GL always abstracted those kind of things so No, you cannot guess it using GL alone!

Share this post


Link to post
Share on other sites
It's not a great idea trying to guess how much vram the host has either. The nice thing is that the GL will automatically handle your vram for you, so you dont need to know. Also bear in mind that most code written to calculate available video ram is often flawed, like it wont take into account AGP memory for example. Further, how vram is utilised is vendor specific, and often the actual storage requirement of data in vram is different to what would be expected, this is often for reasons involving optimisation and the physical organisation of memory on the card.

How do other games solve the problem then? Detail settings. Most games are made with a target GPU in mind, and the amount of RAM may vary, but never by a huge amount. For example you wont find 512mb vram on a GeForce2. For a given generation of GPU there may be variation in the amount of vram, which the user must be able to configure manually. The alternative is to get an id for every graphics card your game supports and hard code the detail settings for every one - i've known games ship with this, but they were multi-million dollar projects with an entire dev team. Unless you have access to similar resources I suggest you keep it realistic.

Share this post


Link to post
Share on other sites
As a side note, D3D doesn't let you get the amount of free video memory either - it only lets you get the available "texture memory", which includes AGP memory, and it's rounded to the nearest 1 MB, since the driver might require alignment or extra book keeping information.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!