Dominic Curran | 1 Jul 2008 14:15
Picon
Favicon

WHERE TO FIND OPENGL INFORMATION - (Bi-weekly posting)

WHERE TO FIND OPENGL INFORMATION - (Bi-weekly posting)

The Official OpenGL Site - News, downloads, tutorials, books & links:- 
http://www.opengl.org/

The archive for this mailing list can be found at:- 
http://www.egroups.com/list/opengl-gamedev-l/

The OpenGL GameDev FAQ:- 
http://www.rush3d.com/opengl/

The EFnet OpenGL FAQ:- 
http://www.geocities.com/SiliconValley/Park/5625/opengl/

The Omniverous Biped's FAQ:-
http://www.sjbaker.org/steve/omniv

OpenGL 1.1 Reference - This is pretty much the Blue book on-line:- 
http://tc1.chemie.uni-bielefeld.de/doc/OpenGL/hp/Reference.html

Red Book online:-
http://fly.cc.fer.hr/~unreal/theredbook/

Manual Pages:- 
http://pyopengl.sourceforge.net/documentation/manual/reference-GL.html

Information on the GLUT API:- 
http://www.opengl.org/developers/documentation/glut.html

The Mesa 3-D graphics library:-
(Continue reading)

Mohan Parthasarathy | 8 Jul 2008 23:45
Picon

OpenGL and hardware acceleration

Hi,

I am new to OpenGL. I have been reading books and trying out different programs. I downloaded the latest
Mesa source code to understand more on what operations are accelerated by the driver. Some of them are
obvious where the driver initializes the functions in ctx->Driver.XXX. For some others, it is hard to follow.
For example, i could not find whether glVertex2f() is accelerated or not. It is hard to find whether the software
fallback or the driver function is called. Is there a good documentation for the 3D driver interfaces with the
Mesa framework so that one can understand the full flow of the OpenGL (from App -> driver) ? I searched but
 could not find a document on this. Any help would be appreciated.

thanks
mohan

Gernot Ziegler | 9 Jul 2008 01:25
Picon
Favicon

Re: OpenGL and hardware acceleration

Hej Mohan,

Mesa is a purely software-based driver.

Do you have any graphics card in your system? In that case, there should 
be an OpenGL-capable driver.

I suppose you use Linux? If yes: Use "glxinfo" to 
verify which driver is running on your system.

> I am new to OpenGL. I have been reading books and trying out different
> programs. I downloaded the latest
> Mesa source code to understand more on what operations are accelerated by
> the driver. Some of them are
> obvious where the driver initializes the functions in ctx->Driver.XXX. For
> some others, it is hard to follow.
> For example, i could not find whether glVertex2f() is accelerated or not. It
> is hard to find whether the software
> fallback or the driver function is called. Is there a good documentation for
> the 3D driver interfaces with the
> Mesa framework so that one can understand the full flow of the OpenGL (from
> App -> driver) ? I searched but
> could not find a document on this. Any help would be appreciated.
>
> thanks
> mohan
>

Servus,
   Gernot

GPU. 3D Vision. Europe. Future. Now.
Drop by: www.mpi-sb.mpg.de/~gziegler - www.geofront.eu

----- 
FAQ and OpenGL Resources at:
  http://www.geocities.com/SiliconValley/Hills/9956/OpenGL

--

-- 
Author: Gernot Ziegler
  INET: gz <at> geofront.eu

Fat City Hosting, San Diego, California -- http://www.fatcity.com
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru <at> fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Mohan Parthasarathy | 9 Jul 2008 04:00
Picon

Re: OpenGL and hardware acceleration

Hi,

Yes, i do have a graphics card and the acceleration is also working. When you download mesa, you also get
a open source driver with it. I was trying to understand more about the internals on the driver acceleration e.g.,
what openGL APIs are accelerated etc. ?

-mohan


On Tue, Jul 8, 2008 at 4:25 PM, Gernot Ziegler <gz <at> geofront.eu> wrote:
Hej Mohan,

Mesa is a purely software-based driver.

Do you have any graphics card in your system? In that case, there should be an OpenGL-capable driver.

I suppose you use Linux? If yes: Use "glxinfo" to verify which driver is running on your system.


I am new to OpenGL. I have been reading books and trying out different
programs. I downloaded the latest
Mesa source code to understand more on what operations are accelerated by
the driver. Some of them are
obvious where the driver initializes the functions in ctx->Driver.XXX. For
some others, it is hard to follow.
For example, i could not find whether glVertex2f() is accelerated or not. It
is hard to find whether the software
fallback or the driver function is called. Is there a good documentation for
the 3D driver interfaces with the
Mesa framework so that one can understand the full flow of the OpenGL (from
App -> driver) ? I searched but
could not find a document on this. Any help would be appreciated.

thanks
mohan


Servus,
 Gernot

GPU. 3D Vision. Europe. Future. Now.
Drop by: www.mpi-sb.mpg.de/~gziegler - www.geofront.eu

----- FAQ and OpenGL Resources at:
 http://www.geocities.com/SiliconValley/Hills/9956/OpenGL

--
Author: Gernot Ziegler
 INET: gz <at> geofront.eu

Fat City Hosting, San Diego, California -- http://www.fatcity.com
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru <at> fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Dave Astle | 9 Jul 2008 04:35
Favicon

Re: OpenGL and hardware acceleration

The thing about OpenGL is that it doesn't actually specify that anything has to be accelerated, nor does it include APIs to query whether specific features are implemented in hardware. So something that is hardware accelerated in one implementation might not be in another, and the only way to know for sure is to do performance profiling. You're not going to be able to glean anything useful from Mesa when it comes to this. In fact, having access to source code from several commercial OpenGL drivers, I'd caution against drawing any conclusions about driver internals from what you see in Mesa.

If you really want to understand the internal workings of OpenGL, I'd recommend the spec itself, as well as whitepapers from NVIDIA and ATI.

Dave Astle
Staff Engineer, Advanced Content Group, QUALCOMM
Executive Director, GameDev.net
Four-time author, Cengage Learning



Mohan Parthasarathy wrote:
Hi,

Yes, i do have a graphics card and the acceleration is also working. When you download mesa, you also get
a open source driver with it. I was trying to understand more about the internals on the driver acceleration e.g.,
what openGL APIs are accelerated etc. ?

-mohan


On Tue, Jul 8, 2008 at 4:25 PM, Gernot Ziegler <gz <at> geofront.eu> wrote:
Hej Mohan,

Mesa is a purely software-based driver.

Do you have any graphics card in your system? In that case, there should be an OpenGL-capable driver.

I suppose you use Linux? If yes: Use "glxinfo" to verify which driver is running on your system.


I am new to OpenGL. I have been reading books and trying out different
programs. I downloaded the latest
Mesa source code to understand more on what operations are accelerated by
the driver. Some of them are
obvious where the driver initializes the functions in ctx->Driver.XXX. For
some others, it is hard to follow.
For example, i could not find whether glVertex2f() is accelerated or not. It
is hard to find whether the software
fallback or the driver function is called. Is there a good documentation for
the 3D driver interfaces with the
Mesa framework so that one can understand the full flow of the OpenGL (from
App -> driver) ? I searched but
could not find a document on this. Any help would be appreciated.

thanks
mohan


Servus,
 Gernot

GPU. 3D Vision. Europe. Future. Now.
Drop by: www.mpi-sb.mpg.de/~gziegler - www.geofront.eu

----- FAQ and OpenGL Resources at:
 http://www.geocities.com/SiliconValley/Hills/9956/OpenGL

--
Author: Gernot Ziegler
 INET: gz <at> geofront.eu

Fat City Hosting, San Diego, California -- http://www.fatcity.com
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru <at> fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Mohan Parthasarathy | 9 Jul 2008 19:30
Picon

Re: OpenGL and hardware acceleration

Dave,

Thanks. Agreed, that trying to infer anything based on an implementation is not a good idea. But it would be nice if there
was some sort of a table that can describe what APIs are accelerated by a given hardware. I understand that there may
be constraints under which the software fallback will be used. But then having a simple one-to-one mapping would be
good to have.

-mohan


On Tue, Jul 8, 2008 at 7:35 PM, Dave Astle <dave <at> gamedev.net> wrote:
The thing about OpenGL is that it doesn't actually specify that anything has to be accelerated, nor does it include APIs to query whether specific features are implemented in hardware. So something that is hardware accelerated in one implementation might not be in another, and the only way to know for sure is to do performance profiling. You're not going to be able to glean anything useful from Mesa when it comes to this. In fact, having access to source code from several commercial OpenGL drivers, I'd caution against drawing any conclusions about driver internals from what you see in Mesa.

If you really want to understand the internal workings of OpenGL, I'd recommend the spec itself, as well as whitepapers from NVIDIA and ATI.

Dave Astle
Staff Engineer, Advanced Content Group, QUALCOMM
Executive Director, GameDev.net
Four-time author, Cengage Learning



Mohan Parthasarathy wrote:
Hi,

Yes, i do have a graphics card and the acceleration is also working. When you download mesa, you also get
a open source driver with it. I was trying to understand more about the internals on the driver acceleration e.g.,
what openGL APIs are accelerated etc. ?

-mohan


On Tue, Jul 8, 2008 at 4:25 PM, Gernot Ziegler <gz <at> geofront.eu> wrote:
Hej Mohan,

Mesa is a purely software-based driver.

Do you have any graphics card in your system? In that case, there should be an OpenGL-capable driver.

I suppose you use Linux? If yes: Use "glxinfo" to verify which driver is running on your system.


I am new to OpenGL. I have been reading books and trying out different
programs. I downloaded the latest
Mesa source code to understand more on what operations are accelerated by
the driver. Some of them are
obvious where the driver initializes the functions in ctx->Driver.XXX. For
some others, it is hard to follow.
For example, i could not find whether glVertex2f() is accelerated or not. It
is hard to find whether the software
fallback or the driver function is called. Is there a good documentation for
the 3D driver interfaces with the
Mesa framework so that one can understand the full flow of the OpenGL (from
App -> driver) ? I searched but
could not find a document on this. Any help would be appreciated.

thanks
mohan


Servus,
 Gernot

GPU. 3D Vision. Europe. Future. Now.
Drop by: www.mpi-sb.mpg.de/~gziegler - www.geofront.eu

----- FAQ and OpenGL Resources at:
 http://www.geocities.com/SiliconValley/Hills/9956/OpenGL

--
Author: Gernot Ziegler
 INET: gz <at> geofront.eu

Fat City Hosting, San Diego, California -- http://www.fatcity.com
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru <at> fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


Michael Gold | 9 Jul 2008 21:15

Re: OpenGL and hardware acceleration

Most modern hardware implementations accelerate the 3D rendering paths, to varying degrees.  For example glVertex is "accelerated" but other paths may be "more accelerated", e.g. VBOs and display lists, depending on both the implementation and your usage.

Less certain, but certainly implemented on some platforms, include things like the pixel path and accumulation operations.

Unlikely to be accelerated: selection and feedback modes, evaluators.

But you must understand that "accelerated" is a relative term.  Some or all of the above may be natively supported, emulated by lower level hardware primitives, implemented in software, or a hybrid involving one or more of these approaches.  And, which path you hit may depend on other state combinations and your usage.  Also, it depends on the card; a low end/low cost card may "accelerate" an operation but you might be able to do it faster in the application.  The reality is there are simply too many factors involved to make a simple boolean determination of whether a particular operation, given a particular set of inputs and the current state vector, is "accelerated".

Ultimately all you can do is measure the performance of modes you wish to use and make decisions based on the actual observed performance.  This link is fairly old but the problem and solution it describes are timeless.

    http://www.berkelium.com/OpenGL/isfast

I can say with a high degree of certainly that any time spend perusing the Mesa source in hopes of gleaning useful information about hardware implementations is a waste of time.

----- FAQ and OpenGL Resources at: http://www.geocities.com/SiliconValley/Hills/9956/OpenGL -- -- Author: Michael Gold INET: gold <at> berkelium.com Fat City Hosting, San Diego, California -- http://www.fatcity.com --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru <at> fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

Uday Verma | 9 Jul 2008 22:15
Picon

Re: OpenGL and hardware acceleration

I don't understand why it is important to have a one to one mapping of which calls are accelerated and which ones aren't.  My concern would be the calls that are taking too long to execute, which may or may not be because they are not accelerated. Once I figure out a bottleneck in my program, I would investigate it further.

Also, I like to think of constructs as accelerated/unaccelerated and not calls, how they perform better than other similar constructs (VBOs vs. Display Lists vs. Immediate).  A driver might optimize calls to avoid unnecessary data flow across slower AGP and PCI-E busses but that is entirely up to the driver.

I would rather just think of my implementation of something (rendering a scene, special effects, shaders, passes) as a whole and try to optimize that using the tools available.

-Uday



On Wed, Jul 9, 2008 at 12:30 PM, Mohan Parthasarathy <suruti94 <at> gmail.com> wrote:
Dave,

Thanks. Agreed, that trying to infer anything based on an implementation is not a good idea. But it would be nice if there
was some sort of a table that can describe what APIs are accelerated by a given hardware. I understand that there may
be constraints under which the software fallback will be used. But then having a simple one-to-one mapping would be
good to have.

-mohan



On Tue, Jul 8, 2008 at 7:35 PM, Dave Astle <dave <at> gamedev.net> wrote:
The thing about OpenGL is that it doesn't actually specify that anything has to be accelerated, nor does it include APIs to query whether specific features are implemented in hardware. So something that is hardware accelerated in one implementation might not be in another, and the only way to know for sure is to do performance profiling. You're not going to be able to glean anything useful from Mesa when it comes to this. In fact, having access to source code from several commercial OpenGL drivers, I'd caution against drawing any conclusions about driver internals from what you see in Mesa.

If you really want to understand the internal workings of OpenGL, I'd recommend the spec itself, as well as whitepapers from NVIDIA and ATI.

Dave Astle
Staff Engineer, Advanced Content Group, QUALCOMM
Executive Director, GameDev.net
Four-time author, Cengage Learning



Mohan Parthasarathy wrote:
Hi,

Yes, i do have a graphics card and the acceleration is also working. When you download mesa, you also get
a open source driver with it. I was trying to understand more about the internals on the driver acceleration e.g.,
what openGL APIs are accelerated etc. ?

-mohan


On Tue, Jul 8, 2008 at 4:25 PM, Gernot Ziegler <gz <at> geofront.eu> wrote:
Hej Mohan,

Mesa is a purely software-based driver.

Do you have any graphics card in your system? In that case, there should be an OpenGL-capable driver.

I suppose you use Linux? If yes: Use "glxinfo" to verify which driver is running on your system.


I am new to OpenGL. I have been reading books and trying out different
programs. I downloaded the latest
Mesa source code to understand more on what operations are accelerated by
the driver. Some of them are
obvious where the driver initializes the functions in ctx->Driver.XXX. For
some others, it is hard to follow.
For example, i could not find whether glVertex2f() is accelerated or not. It
is hard to find whether the software
fallback or the driver function is called. Is there a good documentation for
the 3D driver interfaces with the
Mesa framework so that one can understand the full flow of the OpenGL (from
App -> driver) ? I searched but
could not find a document on this. Any help would be appreciated.

thanks
mohan


Servus,
 Gernot

GPU. 3D Vision. Europe. Future. Now.
Drop by: www.mpi-sb.mpg.de/~gziegler - www.geofront.eu

----- FAQ and OpenGL Resources at:
 http://www.geocities.com/SiliconValley/Hills/9956/OpenGL

--
Author: Gernot Ziegler
 INET: gz <at> geofront.eu

Fat City Hosting, San Diego, California -- http://www.fatcity.com
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru <at> fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Allen Akin | 9 Jul 2008 22:20
Picon
Favicon

Re: OpenGL and hardware acceleration

On Wed, Jul 09, 2008 at 09:30:34AM -0800, Mohan Parthasarathy wrote:
|                    ... But it would be nice if there
|    was some sort of a table that can describe what APIs are accelerated by a
|    given hardware...

People have been asking for this since the very earliest days of OpenGL.
The reason it doesn't exist is that such a table is far too limited to
express anything meaningful about what a driver/hardware combination can
accelerate.

For example, you might ask whether glVertex2fv() is "accelerated." It
might be fast if there are fewer than a certain number of textures
enabled, or if no vertex shader is used, or if a vertex shader is used
but doesn't require too much on-chip memory, or if it's in a display
list but not in immediate mode, or if the drawing surface is allocated
in a particular bank of memory, or if certain OpenGL extensions are
supported for the current rendering context, or only if the formats used
for textures and drawing surfaces are compatible, and so on.  Hundreds
of factors affect the outcome, and sometimes they even interact, so you
also have to take their combinations into account.  The resulting
description would be overwhelmingly complex and useless in practice.
(Not to mention outdated whenever a new driver is released.)

In the past, on certain systems, there have even been combinations of
state that are processed by the GPU, but the resulting performance is
less than using the CPU to perform the same function.  What does
"hardware accelerated" mean in a situation like that?

In certain limited cases, usually when you know you're going to be
running on a particular GPU in a particular system configuration and you
have full knowledge of driver internals, you can outline a few rendering
paths that are guaranteed to be fast.  You can find examples of that
sort of thing at the NVIDIA and AMD developer websites.  But performance
profiling is the only way to determine what runs fast in the general
case.

Allen
----- 
FAQ and OpenGL Resources at:
  http://www.geocities.com/SiliconValley/Hills/9956/OpenGL

--

-- 
Author: Allen Akin
  INET: akin <at> pobox.com

Fat City Hosting, San Diego, California -- http://www.fatcity.com
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru <at> fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Mohan Parthasarathy | 9 Jul 2008 23:55
Picon

Re: OpenGL and hardware acceleration

Uday,

I mostly agree with what you say. If you are developing an application, it makes sense to look at macro things rather
than the individual calls. My question is mostly academic i guess. Sometimes, out of curiosity, you want to know what
happens under the hood. I am just writing a simple application (nothing fancy enough to get into performance problems yet) and want to know the software/hardware role. I guess Michael pointed out a few things already.

thanks
-mohan


On Wed, Jul 9, 2008 at 1:15 PM, Uday Verma <uday.karan <at> gmail.com> wrote:
I don't understand why it is important to have a one to one mapping of which calls are accelerated and which ones aren't.  My concern would be the calls that are taking too long to execute, which may or may not be because they are not accelerated. Once I figure out a bottleneck in my program, I would investigate it further.

Also, I like to think of constructs as accelerated/unaccelerated and not calls, how they perform better than other similar constructs (VBOs vs. Display Lists vs. Immediate).  A driver might optimize calls to avoid unnecessary data flow across slower AGP and PCI-E busses but that is entirely up to the driver.

I would rather just think of my implementation of something (rendering a scene, special effects, shaders, passes) as a whole and try to optimize that using the tools available.

-Uday



On Wed, Jul 9, 2008 at 12:30 PM, Mohan Parthasarathy <suruti94 <at> gmail.com> wrote:
Dave,

Thanks. Agreed, that trying to infer anything based on an implementation is not a good idea. But it would be nice if there
was some sort of a table that can describe what APIs are accelerated by a given hardware. I understand that there may
be constraints under which the software fallback will be used. But then having a simple one-to-one mapping would be
good to have.

-mohan



On Tue, Jul 8, 2008 at 7:35 PM, Dave Astle <dave <at> gamedev.net> wrote:
The thing about OpenGL is that it doesn't actually specify that anything has to be accelerated, nor does it include APIs to query whether specific features are implemented in hardware. So something that is hardware accelerated in one implementation might not be in another, and the only way to know for sure is to do performance profiling. You're not going to be able to glean anything useful from Mesa when it comes to this. In fact, having access to source code from several commercial OpenGL drivers, I'd caution against drawing any conclusions about driver internals from what you see in Mesa.

If you really want to understand the internal workings of OpenGL, I'd recommend the spec itself, as well as whitepapers from NVIDIA and ATI.

Dave Astle
Staff Engineer, Advanced Content Group, QUALCOMM
Executive Director, GameDev.net
Four-time author, Cengage Learning



Mohan Parthasarathy wrote:
Hi,

Yes, i do have a graphics card and the acceleration is also working. When you download mesa, you also get
a open source driver with it. I was trying to understand more about the internals on the driver acceleration e.g.,
what openGL APIs are accelerated etc. ?

-mohan


On Tue, Jul 8, 2008 at 4:25 PM, Gernot Ziegler <gz <at> geofront.eu> wrote:
Hej Mohan,

Mesa is a purely software-based driver.

Do you have any graphics card in your system? In that case, there should be an OpenGL-capable driver.

I suppose you use Linux? If yes: Use "glxinfo" to verify which driver is running on your system.


I am new to OpenGL. I have been reading books and trying out different
programs. I downloaded the latest
Mesa source code to understand more on what operations are accelerated by
the driver. Some of them are
obvious where the driver initializes the functions in ctx->Driver.XXX. For
some others, it is hard to follow.
For example, i could not find whether glVertex2f() is accelerated or not. It
is hard to find whether the software
fallback or the driver function is called. Is there a good documentation for
the 3D driver interfaces with the
Mesa framework so that one can understand the full flow of the OpenGL (from
App -> driver) ? I searched but
could not find a document on this. Any help would be appreciated.

thanks
mohan


Servus,
 Gernot

GPU. 3D Vision. Europe. Future. Now.
Drop by: www.mpi-sb.mpg.de/~gziegler - www.geofront.eu

----- FAQ and OpenGL Resources at:
 http://www.geocities.com/SiliconValley/Hills/9956/OpenGL

--
Author: Gernot Ziegler
 INET: gz <at> geofront.eu

Fat City Hosting, San Diego, California -- http://www.fatcity.com
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru <at> fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).





Gmane