Advertisement

A few questions

Started by April 13, 2002 06:01 PM
5 comments, last by Sabre1021 22 years, 10 months ago
Is rendering in selection mode inherently slower than regular rendering? My OpenGL application runs at 200 fps (roughly 6000 triangles using triangle fans) until I enter my object selection algorithm. It takes in upwords of 5 seconds to completely render the scene even though I use the exact same function to render the primatives as when I do normal rendering. And yes, I''ve narrowed it down to the rendering function that takes so long. I can even take out all glLoadName calls and it takes....a long long time. Question 2: How do I call OpenGL functions from inside of a __asm structure. I tried the obvious __asm call glEnd but that causes an error.
For Q2: Did you take a look at the ASM ports for some of the early tutorials?
Advertisement
I can imagine selection mode not being implemented in hardware in a couple of drivers, or at least not being on the fast path.

I''ve not used it before though so someone shoot this down if I''m wrong.


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
Heh, well I'm using a Radeon....so drivers may be the problem (stupid ATI)....

And I'm trying to use asm inside of my visual c++ code...and calling glEnd the same way (__asm call glEnd) as in the assembly tutorials doesn't seem to work.

[edited by - Sabre1021 on April 13, 2002 8:35:33 PM]
i think there''s some OGL demos written in asm onRomka''s website. hope that helps.


"Shadow of annoyance Ne''''er come hither! ...And when He falleth, He falleth like Lucifer, Ne''''er to ascend again..."


TOT
"Shadow of annoyance Ne''er come hither! ...And when He falleth, He falleth like Lucifer, Ne''er to ascend again..."
TOT
Quoting nVidia, picking is one of these ''features'' that should never have been put into the OpenGL standard. They are almost impossible to implement efficiently on current 3D chips, 3D hardware design has changed since the first OpenGL spec introduced this evil mode.

You can be pretty sure, that it is not hardware accelerated. And even if it is, performance will be far from optimal. You shouldn''t use it, if you are after good performance. Write your own picking/selection functions instead. You can even hardware accelerate them, if you use eg. the alphabuffer as a selection buffer substitute.

/ Yann
Advertisement
Well, I tried my program on a Geforce 3, and it had little slowdown (no noticable delay, as opposed to the 4 seconds on my card). So it''s most likely a driver problem. Bah. Oh well, I guess I''ll go about it a different way (my head is hurting thinking about considering this).

As for the assembly...thanks for the site...good stuff. But it''s still not quite what I''m looking for. I''m writing a program that''s 99% C++. I just want to write a few of the time-intensive loops in assembly. So I want to use the __asm keyword to execute assembly blocks. But for some reason calls to OpenGL functions inside those blocks cause errors.

This topic is closed to new replies.

Advertisement