Total number of triangles rendered by opengl

How to get it with opengl API,thanks.

You don’t.
You’re welcome.

Originally posted by dorbie:
[b]zeckensack,

this schoolboy rubbish is not funny.[/b]

I’m not trying to be funny!
Question: How do I get the number of triangles rendered with OpenGL?
Answer: You don’t!

I don’t see my wrong doing. The gist is, you have to do that in your own code if you want to know it. Is that so wrong?

/edit
Ok, let’s put it this way:
OpenGL is a low level interface. It will certainly not spend any time counting triangels. If you need that information, just add some kind of ++triangle_count; to your own code. The rationale behind this is to make the common case fast and the common case doesn’t include counting triangles.

Some may think my initial response was rude but I’d say my initial response was straight to the point.

No hard feelings towards either of you hapcafe and dorbie.

[This message has been edited by zeckensack (edited 04-04-2002).]

Sorry, I missed the question in the title. My response was based on the text of the message.

I still prefered your second post :-).

Reading your second reply was surreal for a moment.

You don’t.
You’re welcome.

Hi zeckensack,

very exact and polite answer!

Martin

I have been considering writing a vertex program that will count verts/tris and the like. of course this is a little problematic since I am still using a tnt 2 ultra. I intend on getting something new, just not sure if I want a geforce 4 right now or if I will hold off for 6 more months for the next release. Hey the fact that I use a tnt 2 ultra still is just a fact that nvidia has the best cards and perhaps more importantly the best drivers. Period. The only real problem I have with my current setup is the fact that using hi-res nurbs in 3d studio max is quite slow (but I am gonna blame my processor and ram on that one).

I really need a new development system, I’m just really undecided on what to get.

vertex programs don’t help there. first. they would only count vertices, not triangles.
second. vertexprogram is a simple function with one vertex in and one vertex out. no static variables in wich you can manipulate. only constant stuff and registers. no way to count

You can’t do this in d3d either - the reason being that it’s a ridiculous thing to ask for, you’ve sent it the triangles (or specified the nurb, or whatever), so you already know the answer.

just because u sent them doesnt mean they got rendered,
i suppose u could render each trianlge in a different colour + then do a redaback of the screen + count the number of different colours (dont expect major speed).
good luck

Aye, you’re right of course.
Why do you want this information, hapcafe?

actually i wasnt 100% correct cause that doesnt take account of how many tris get rendered + then overdraw by other triangles. perhaps this is possible to do with stencil?

Who cares?
hapcafe obviously doesn’t.

Sorry for my late coming again.I am not very sure about what happened here,but i believe everybody hopes this is the very place for everyone to study, to exchange ideas, no matter you are either a professional or amateur. Just be easy!

[This message has been edited by hapcafe (edited 04-08-2002).]

What are you talking about, hapcafe?
Why do you want to know how many triangles have been rendered?

Originally posted by knackered:
What are you talking about, hapcafe?
Why do you want to know how many triangles have been rendered?

Maybe you didn’t notice what they talked about above.I don’t wanna make people uneasy because of me.

You can do this and several other things (type of primitives submitted, texture use etc) using Intel’s Graphics Performance Toolkit.Basically it is a profiler specific for 3d applications.
An evaluation version is available at developer.intel.com (under software).

Originally posted by Theodoros:
You can do this and several other things (type of primitives submitted, texture use etc) using Intel’s Graphics Performance Toolkit.Basically it is a profiler specific for 3d applications.
An evaluation version is available at developer.intel.com (under software).

Thanks, Theodoros. I’ll try it.