Jump to content
  • Advertisement

Archived

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

DaBit

OpenGL Addiction to OpenGL breaks me up.

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

Hi guys, I am an OpenGL addict. That is a fact. Thus, when I started writing my first engine tests, I used OpenGL, which works fine. But now, with my next experimental engine I chose Direct3D because I wanted to use several specific D3D features and I wanted to overcome some problems. But, as an addict, you can''t stop with your drug. So, maybe you guys can help me with OpenGL equivalents of the specific D3D features I needed. - Support for VoodooXX cards. Just using M$ OpenGL32.DLL does not work on those cards. Is there a generic way to overcome this? - Rendering into a texture. For my shadow algorithm I need to render into a 128x128 or so texture as the first pass, and then use that texture in the second rendering pass. - The use of S3TC/DXTC/WhateverTC. This allows me to use larger textures, and render quicker. (ever used 1024x1024 textures? They are s-l-o-w) - This one is probably not possible: Using the ELSA Revelator shutter glasses or another shutter glass system. - Use hardware bumpmapping, if available. - Information about the amount of available hardware texture memory, so I can decide myself when and where to swap in/out textures. - Fast texture updates between frames (animated textures) Thanks in advance, DaBit

Share this post


Link to post
Share on other sites
Advertisement
Now I''ve never used either OpenGL or Direct3D before (gave up, still learning DDraw and suchlike), but...

Maybe with the animated textures, it would be easier to have your animation all loaded onto the hardware at once, then just go into the pointer to a texture in your whatever object and change it to the next one.

Just an idea

-Ben Dilts

Share this post


Link to post
Share on other sites
Yes, a good idea, but not always feasible, since sometimes I want to regenerate textures, so I can''t pre-load them. With DirectX I exactly know what format my (texture)surface is, so I can choose manually between a 5:6:5, 5:5:5, 8:8:8 or generic (x:x:x) routine. With OpenGL, all I can do is tell the driver to use a 24-bit texture and doing a glTexImage2D with 24-bit RGB triples, and hope the driver won''t get in the way.

The same is true with texture management. In my 3D engine I know exactly which textures I need, which I am going to need within a few frames, and which I won''t need for a longer time. A method to do manual paging, or at least query how much video memory is available for textures would be very handy for this stuff. I know there is such a thing as texture priorization, but this is not quite what I need.

On nVidia cards this works pretty well, but their OpenGL driver is of a rarely seen high quality. And I don''t want to write software that runs only well on nVidia hardware.

DaBit.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
It seems you do not have sufficient experience on OpenGL, especially latest one.

OpenGL hardware bump mapping is now supported by more cards than Direct3D: Geforce and ATI rage128/Pro all support OpenGL hardware bump mapping. Only Matrix400 supports Direct3D bump mapping, Direct3D bump mapping demo freezeswith other video cards.

As for S3TC, OpenGL has virtual texturing technology which is better than S3TC.

Texture animations are very easy. You should buy Nehe code example. Voodoo Cards are now supported by using 3dfx ICD.

Share this post


Link to post
Share on other sites
I do have OpenGL experience on both Linux and Windows. I have build a 3D engine testbench with it (see http://dabit.trybit.com, then Dabit3D. There is an (pretty old) sample of it over there.), so I am comfortable with the usual OpenGL stuff like texturing, display lists, (compiled) vertex arrays and the like. It is true that except the compiled vertex array and ARB_multitexture extensions, I did not pay too much attention to the other extensions since I have no idea which extensions are fairly common. But it seems that you are experienced, thus please help me out with those problems.

During the development of my 3D engine test, I encountered a lot of problems, like the VoodooXX support. Just binding the app to OpenGL32.DLL does not work, for some reasons. And I do not want to import a 3DFXGL.DLL myself or use other nasty tricks to get things working on 3DFX cards.
Is this problem solved already for the V2, Banshee and V3??

About OpenGL virtual texturing being better than S3TC, these are two completely different techniques, and cannot be compared against each other. S3TC (DXTC) and FXTC store a texture using less bits, even down to 2 bits per RGB texel. This allows for larger, more detailed textures in the same amount of texture memory. OpenGL virtual texturing just swaps textures in and out of video memory.

The comparison of OpenGL''s texture manager with D3D''s texturemanager is a better one. And yes, in this case OpenGL wins hands down from Direct3D (version 6.1 at least). But with D3D I have the choice to use the builtin texture manager or do it myself. With OpenGL I don''t have that choice. When using a lot of textures in a scene, being able to do texturemanagement yourself pays off since you know when to swap what texture based on your scene graph, and OpenGL doesn''t. Knowing how much (fast) video memory is available would help, so I can create, delete and prioritize textures according to this information instead of throwing it all to OpenGL and let the driver sort it out. BTW, this is also a complaint of Tim Sweeney (Epic Games) against OpenGL, and the main reason why Unreal Tournament runs way better using the DirectX driver than the OpenGL driver on cards with less than 32Mb of local memory.

About texture animations, I will take a look at NeHe''s samples.

Another big problem for me is rendering to a texture. How would I do that quickly? I am aware of the fact that I can render to the backbuffer and using glCopyTexImage2D to transfer the image data to the texture. However, this is slow.

Anyway, thenks for your answer.

DaBit.


Share this post


Link to post
Share on other sites
Addiction to Direct3D will break you up.

Microsoft offer of Windows open source code was rejected at court. The only way to settle down this monopoly issue seems to break up Microsoft.

Kate

Edited by - kate on 3/16/00 9:39:27 AM

Share this post


Link to post
Share on other sites
Wanna use opengl with a 3dfx card huh? I can relate. In fact my first 3d accelerator was a Voodoo2 and the whole reason I learned OpenGL was to code cool stuff for it after I first played accelerated Quake 2!

Now that 3dfx has finally released an OpenGL ICD, it''s fairly easy. Get the Quake 3 compatible 3dfxvgl.dll and put it in your program''s dir, but rename it opengl32.dll. You can link your program to the standard opengl32.lib. Make sure you put your window at 0,0 and size it to the display es. Also configure the windows display resolution settings before greating your gl window!

Upon execution your program should load the 3dfx gl dll which will automatically go into fullscreen on the gl card.

Note that using glu/glut/glaux libraries may cause problems. For best results you should stick to using what''s in the bare bones gl lib.

I strongly suggest that you do learn to import the dll manually, though. When you do you can do many cool things such as hiding the 3dfx "splash screen" when your program starts and you can change resolution while your program is running. If you use the aforementioned method it will be slightly easier to write your code but you lose this extra functionality.

Microsoft offered to open source Windoze? I wonder if they were going to take out all the code that spies on the users of MS software and gathers info illegally first? Hey maybe I could finally discover what the NSA is checking out about me! :D

Share this post


Link to post
Share on other sites
Let''s see:

- Anything post voodoo2 has a real installable driver. Anything before that, you just have to use the miniGLs. There''s no getting around that because of the way 3dfx designed the cards and microsoft implemented opengl in windows.

Although as stated above, dynamically linking the dll is a good move, even if you''re not using a 3dfx card. See Ryan Haksi''s page for code to detect the 3dfx minigl and dynamically load it or the default dll:

http://members.home.com/borealis/opengl.html

- You can render to a buffer and create a texture out of that, but it''s not supported well in drivers. Again, this is because microsoft chose not to implement it the right way.

- S3TC is supported in opengl as an extension. I still need to write an article about that.

- I have no idea about shutter glasses support. It''s a driver issue as far as I know. There is support in OpenGL for stereo rendering, but it''s up to microsoft and the hardware vendors to support it.

- Depends on the type of bumpmapping. If you mean evironment-mapped-bump-mapping from Matrox, I don''t think they''ve implemented an extension in opengl yet. They told me they were planning on it last summer bofore the g400 came out, but I haven''t heard anything else about it since.

Other bump mapping techniques are supported in hardware. I''m not sure what the extensions are though. You''d have to check with the vendors.

- In OpenGL the texture management is done in the driver. That''s the just model it uses. While you can implement your own texture manager (Tim Sweeney did for UT) you can, but for the most part, the driver writers do a pretty good job.

- I have an article on procedural textures. You don''t get direct access to texture memory (do you get that in directx?), but glSubTexImage2d and even glTexImage2d are both pretty quick on recent video cards.

Here''s the official opengl extension registry which may help:
http://oss.sgi.com/projects/ogl-sample/registry/


hope this helps...

Scott Franke [druid-]
sfranke@usc.edu
druid-'s GL Journal
http://www.gamedev.net/opengl

Share this post


Link to post
Share on other sites
Oh, here''s the link to my procedural texture article:

http://www.gamedev.net/opengl/proctex.html

You''ll need to download the source to my ambient psychosis demo to get any code:

http://www.gamedev.net/opengl/ambient.html


and as far as virtual texturing, that''s only in the 3dLabs Permedia3 as far as I know.



Scott Franke [druid-]
sfranke@usc.edu
druid-'s GL Journal
http://www.gamedev.net/opengl

Share this post


Link to post
Share on other sites
Druid, thanks a lot.

I will have a look at your samples, and download the dynamic OpenGL DLL loading code. The problem of not being to able to render to a texture quickly might be the biggest of them all. (Yes, you can get direct access to video RAM with D3D) With D3D I just create a rendering context to my texture, and that works pretty well as long as I don''t need Z-buffering.

I doubt if I still have valid reasons to use D3D. Oh well, one. The extensive texture combine operators when doing multitexturing. (with modulate_2X and add being the two most useful additions to normal modulation)
There is an extension to allow other texel combination parameters than only GL_REPLACE, GL_DECAL and GL_MODULATE. Is it widely supported?

Is there a list of extensions which indicates what hardware supports it?

DaBit.

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!