Re: [osg-users] Counting OpenGL Draw calls in Stats

2012-02-23 Thread Robert Osfield
Hi Jason,

On 22 February 2012 18:34, Jason Daly jd...@ist.ucf.edu wrote:
 I'm interested in determining how many OpenGL draw calls are made during the
 rendering of a frame (counting and storing them as a Stats variable).  I'm
 sure this is possible, but I wonder if it would be feasible to do without
 significantly affecting performance.

 Anyone have any thoughts?

The OSG doesn't have any stats collection on individual OpenGL draw
calls, such low level instrumentation would be rather expensive to
implement code wise and expensive w.r.t run-time cost.

The best solution for this type of low level instrumentation is to use
a wrapper around the OpenGL driver as suggested by others in this
thread.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Counting OpenGL Draw calls in Stats

2012-02-23 Thread Jason Daly

On 02/23/2012 05:22 AM, Robert Osfield wrote:

The OSG doesn't have any stats collection on individual OpenGL draw
calls, such low level instrumentation would be rather expensive to
implement code wise and expensive w.r.t run-time cost.

The best solution for this type of low level instrumentation is to use
a wrapper around the OpenGL driver as suggested by others in this
thread.


Hi, Robert,

I was afraid you'd say that  :-)

Thanks for the reply.

--J
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Counting OpenGL Draw calls in Stats

2012-02-22 Thread Jason Daly


Hi, all,

I'm interested in determining how many OpenGL draw calls are made during 
the rendering of a frame (counting and storing them as a Stats 
variable).  I'm sure this is possible, but I wonder if it would be 
feasible to do without significantly affecting performance.


Anyone have any thoughts?

--J
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Counting OpenGL Draw calls in Stats

2012-02-22 Thread Buckley, Bob CTR MDA/DES
gDEBugger has the ability to view OpenGL Call history.
Can't speak on the performance hit.
But, sounds like you need it in the app itself.
I don't know of an internal mechanism.
However, should be able to easily CASE a thin inlined OpenGL layer with metrics 
embedded.

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Daly
Sent: Wednesday, February 22, 2012 11:35 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Counting OpenGL Draw calls in Stats


Hi, all,

I'm interested in determining how many OpenGL draw calls are made during 
the rendering of a frame (counting and storing them as a Stats 
variable).  I'm sure this is possible, but I wonder if it would be 
feasible to do without significantly affecting performance.

Anyone have any thoughts?

--J
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Counting OpenGL Draw calls in Stats

2012-02-22 Thread Jason Daly


Thanks, Bob.

I've used gDEBugger for this before, but for this case, I need to get it 
into the OSG Stats proper.  The capability isn't there yet, so I'm 
looking into adding it.  I'm trying to gauge how feasible it would be to 
add this feature without adversely affecting performance.


The current frame Stats don't seem too heavy, but they're mainly taking 
measurements before and after the frame, not counting events that happen 
during the frame.


--J


On 02/22/2012 03:22 PM, Buckley, Bob CTR MDA/DES wrote:

gDEBugger has the ability to view OpenGL Call history.
Can't speak on the performance hit.
But, sounds like you need it in the app itself.
I don't know of an internal mechanism.
However, should be able to easily CASE a thin inlined OpenGL layer with metrics 
embedded.

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Daly
Sent: Wednesday, February 22, 2012 11:35 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Counting OpenGL Draw calls in Stats


Hi, all,

I'm interested in determining how many OpenGL draw calls are made during
the rendering of a frame (counting and storing them as a Stats
variable).  I'm sure this is possible, but I wonder if it would be
feasible to do without significantly affecting performance.

Anyone have any thoughts?

--J
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Counting OpenGL Draw calls in Stats

2012-02-22 Thread Buckley, Bob CTR MDA/DES
OpenGL video driver comes to mind.
Anything in the spec that facilitates this across platforms?

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Daly
Sent: Wednesday, February 22, 2012 1:34 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Counting OpenGL Draw calls in Stats


Thanks, Bob.

I've used gDEBugger for this before, but for this case, I need to get it 
into the OSG Stats proper.  The capability isn't there yet, so I'm 
looking into adding it.  I'm trying to gauge how feasible it would be to 
add this feature without adversely affecting performance.

The current frame Stats don't seem too heavy, but they're mainly taking 
measurements before and after the frame, not counting events that happen 
during the frame.

--J


On 02/22/2012 03:22 PM, Buckley, Bob CTR MDA/DES wrote:
 gDEBugger has the ability to view OpenGL Call history.
 Can't speak on the performance hit.
 But, sounds like you need it in the app itself.
 I don't know of an internal mechanism.
 However, should be able to easily CASE a thin inlined OpenGL layer with 
 metrics embedded.

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org 
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Daly
 Sent: Wednesday, February 22, 2012 11:35 AM
 To: osg-users@lists.openscenegraph.org
 Subject: [osg-users] Counting OpenGL Draw calls in Stats


 Hi, all,

 I'm interested in determining how many OpenGL draw calls are made during
 the rendering of a frame (counting and storing them as a Stats
 variable).  I'm sure this is possible, but I wonder if it would be
 feasible to do without significantly affecting performance.

 Anyone have any thoughts?

 --J
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Counting OpenGL Draw calls in Stats

2012-02-22 Thread Buckley, Bob CTR MDA/DES
A co-worker sent me this:

http://www.opengl.org/sdk/tools/GLIntercept/
It wraps opengl32.dll so that it can log all calls to OpenGL
Unfortunately, it appears to be Windows only.


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Buckley, Bob 
CTR MDA/DES
Sent: Wednesday, February 22, 2012 2:02 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Counting OpenGL Draw calls in Stats

OpenGL video driver comes to mind.
Anything in the spec that facilitates this across platforms?

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Daly
Sent: Wednesday, February 22, 2012 1:34 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Counting OpenGL Draw calls in Stats


Thanks, Bob.

I've used gDEBugger for this before, but for this case, I need to get it 
into the OSG Stats proper.  The capability isn't there yet, so I'm 
looking into adding it.  I'm trying to gauge how feasible it would be to 
add this feature without adversely affecting performance.

The current frame Stats don't seem too heavy, but they're mainly taking 
measurements before and after the frame, not counting events that happen 
during the frame.

--J


On 02/22/2012 03:22 PM, Buckley, Bob CTR MDA/DES wrote:
 gDEBugger has the ability to view OpenGL Call history.
 Can't speak on the performance hit.
 But, sounds like you need it in the app itself.
 I don't know of an internal mechanism.
 However, should be able to easily CASE a thin inlined OpenGL layer with 
 metrics embedded.

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org 
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Daly
 Sent: Wednesday, February 22, 2012 11:35 AM
 To: osg-users@lists.openscenegraph.org
 Subject: [osg-users] Counting OpenGL Draw calls in Stats


 Hi, all,

 I'm interested in determining how many OpenGL draw calls are made during
 the rendering of a frame (counting and storing them as a Stats
 variable).  I'm sure this is possible, but I wonder if it would be
 feasible to do without significantly affecting performance.

 Anyone have any thoughts?

 --J
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Counting OpenGL Draw calls in Stats

2012-02-22 Thread Jason Daly

On 02/22/2012 05:53 PM, Buckley, Bob CTR MDA/DES wrote:

A co-worker sent me this:

http://www.opengl.org/sdk/tools/GLIntercept/
It wraps opengl32.dll so that it can log all calls to OpenGL
Unfortunately, it appears to be Windows only.



Hi, Bob,

I'm not really interested in any other solutions outside of OSG itself.

What I'm considering specifically is adding code to count the actual 
OpenGL draw calls made by OSG (mainly in PrimitiveSet.cpp) and placing 
the count into an osg::Stats variable (much like the FPS, update, cull, 
and draw times, number of groups and geodes in the scene, etc).  I'd 
like to add GL draw calls as a stat that can be queried in code (and 
conceivably could be put into the StatsHandler display).


I'm just not sure whether or not collecting this count would be too 
heavy for general use.  If it can't be done without a driver layer or 
some kind of non-standard instrumentation (like gDEBugger), then we'd 
rather just not do it.


--J
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org