Jump to content
  • Advertisement

Archived

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

QWERTY

OpenGL T&L

This topic is 5798 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 everyone, I am wondering how are T&L done in OpenGL rendering pipeline especially on gfx cards with GPU. In DirectX you can choose between software T&L (done by CPU) and hardware T&L (entirely done by GPU). Now I would like to know how it is done in OGL. Probably it is driver dependant but maybe it''s not so obvious. The only way how to utilize the advantage of HW T&L in OGL is to write your own vertex program or am I totaly wrong and there''s another way? I am working on advanced 3D engine and want the ability to choose between SW and HW T&L but I am not sure about standard OGL rendering pipeline and how it is implemented.

Share this post


Link to post
Share on other sites
Advertisement
Are you sure? Does it mean that on Geforce there are all transformations and lighting calculations always done by hardware? Maybe you should test it first. On my system it seems like there is a difference between standard OGL T&L pipeline and my own written as vertex program. Maybe it is driver dependent though.

Share this post


Link to post
Share on other sites
quote:

Does it mean that on Geforce there are all transformations and lighting calculations always done by hardware?


Yes. As long as you stay in the limits of the hardware (eg. not enable more lights than the HW can handle).

quote:

On my system it seems like there is a difference between standard OGL T&L pipeline and my own written as vertex program


I guess you haven''t reprogrammed the whole fixed function pipeline, because that would be quite a big vertex program (there is an nvidia paper showing a full fixed function equivalent VP, it''s pretty huge). Shorter VP will of course lead to better performance, but at the cost of less functionality.

Share this post


Link to post
Share on other sites
Of course a minimal vertex program will be faster - it''s more simple since you''re bypassing a lot of the OpenGL calculation.

T&L is automatically done in hardware for OpenGL. The only things to watch out for are redundant copies of data for Vertex Arrays (try using various extensions like fence, var, compiled vertex arrays) and not using vertex arrays at all (like using glVertex3f...ick).


Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions

Share this post


Link to post
Share on other sites
T&L is used automatically when transforming vertices. Matrix * Matrix multiplication is done on the CPU, only Vector * Matrix muls are done via T&L using the standard pipeline.

------------
- outRider -

Share this post


Link to post
Share on other sites
Ok, thank you guys for your replys. From what you have written I understand that all T&L in OGL is done by GPU if possible and it is still better to reprogram a standard pipeline by your own vertex program due to faster code unless you really need all the functionality of a standard pipeline. Probably I should test this teory first under specific conditions and see which variant is better for me. Thanks again.


[edited by - QWERTY on November 7, 2002 3:40:30 PM]

Share this post


Link to post
Share on other sites
Keep in mind that by writing your own vertex program, you''ll limit yourself to new generation 3D hardware, and your program won''t work on older hardware anymore (eg. GeForce2 or less).

Share this post


Link to post
Share on other sites
Aren''t vertex shaders emulated on the CPU for Geforce 1/2 cards? True it defeats the whole point, but it''d still be runnable, unlike if you start crowbaring in pixel shaders...

Share this post


Link to post
Share on other sites
Yep, they''ll run, but as you said, it kind of defeats the whole point (as it will be much slower than the fixed function pipeline)

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!