I know that is possible in DirectX. But since the project im am working is on OpenGL, how do one knows how much video memory is available? That way I can adjust the recomended settings from low-Textures to High Texture ammount.

Do anyone know, or have an idea on how to do it without DX??
Posted on 2002-01-08 22:20:34 by dxantos
Not sure :) What I suggest (since this doesn't really have any asm specifics) goto nehe.gamedev.net (there are countless opengl'ers who may know the secret to this :)

I did a quick search of the internet (in the hopes of being more helpful, but found little)

Posted on 2002-01-09 14:44:08 by Sliver
Afternoon, dxantos.

Do anyone know, or have an idea on how to do it without DX??

Nope :grin: .

From what I've read/seen, OpenGL doesn't support this functionality. I've seen a few proggys (including commercial) which use OpenGL for the rendering - and use DX for setting up the display mode and getting the vid mem.

Unless you make your proggy *only* use the current display mode, you're going to have to use *some* DX for getting/setting the display info you require.

This is the main reason I choose DX over OpenGL - I don't wish to work with two 3D graphics APIs at the same time.

Posted on 2002-01-09 16:07:04 by Scronty
This brings up a point I didn't examine yet..

How would you start an application that supports both directx and opengl?

I figure only one program have have the window at one time, yet, i see alot of programs that use both...

I never really thought about it till now...

Posted on 2002-01-10 00:13:43 by Sliver
Sliver, keep your rendering stuff at a "sorta high level". Like using
"RenderWorld" and "RenderObjects" methods (keep it this high).
Then, you could put the Render* functions in DLLs (or just have an
internal array if you don't feel like DLLs). By keeping the rendering
methods highlevel, the internal implementation (whether ddraw,
ogl, or d3d) can take as much advantage of the native API used.
Posted on 2002-01-10 05:02:45 by f0dder
DX methods work ok on Win9xsystems (more game friendly?) but sometimes fail phatetically on NT 4.0 and Win2k (results like zero memory etc ) ...

I guess you can make a fast DX object just to get the memory /caps of the board and release it just before creating your OpenGL window?
Posted on 2002-01-10 05:09:26 by BogdanOntanu

To make an application that supports both OpenGL/DirectX you could make a higher level api and use DLL runtime linking. Since Vertex Buffers are Vertex buffers on both it shoulnt be a big problem to do so, except that the level of indirection will affect performance. (Although just a little). When I started my project I tried with DX 5.0. And found that OpenGL was a cleaner api. (Direct3D was messy). Things changed and with DX8.0 both api's are very similar. (Altough, IMHO OpenGL Still wins :)

Anyway BogdanOntanu idea could work, since I only need a rough idea of the available video memory. (So I can change suggested Texture Quality Accordingly).

If the user still wants to use high texture quality on a 8Mb card, then its his/her problem if the performance is not good. But in the suggested setting it should run well (thats why I want to know available videomem).
Posted on 2002-01-19 15:42:47 by dxantos