Hardware Acceleration?

Hello,

I am trying to determine whether hardware acceleration is enabled in an
application. We have a computer with a PCI Voodoo III card. The
banshee driver is loaded an operating normally.

We have an application that was first written in photon and then ported
to OpenGL. The application draws lines and boxes on the full (no window
manager) screen at 10 Hz. We ran the photon and OpenGL versions of the
program on the same computer and measured the drawing time and cpu
usage. Here are the results.

Photon version:
Draw time = 5 miliseconds (mean)
CPU usage = 20% (mean)

OpenGL version:
Draw time = 48 miliseconds (mean)
CPU usage = 67% (mean)

It is obvious that the photon version of the program is drawing faster
and using less CPU than the OpenGL version. It would appear that we do
not have hardware acceleration in OpenGL. I would expect that the
drawing time be less and the CPU usage be MUCH less if the hardware
acceleration was on. Is this a correct assumption?

Assuming we are not getting hardware acceleration, what must one do when
they compile an OpenGL program to make sure hardware acceleration is
on? What should be done at runtime?

Alec Gorjestani
Intelligent Vehicles Lab
University of Minnesota

What do you mean with “Photon” version and “OpenGL” version. You mean in
your Photon version you use “PgDraw…” etc commands and in your OpenGL
version you use “glBegin(GL_LINE)” etc? Your OpenGL version is full screen
using glide? If not then the drawing of the lines and boxes is done in
software using Mesa, and no big surprise, is much slower.
Markus

\

  • Photon can take advantage of hardware acceleration

“Alec Gorjestani” <alecg@me.umn.edu> wrote in message
news:3B2F71E5.5000800@me.umn.edu

Hello,

I am trying to determine whether hardware acceleration is enabled in an
application. We have a computer with a PCI Voodoo III card. The
banshee driver is loaded an operating normally.

We have an application that was first written in photon and then ported
to OpenGL. The application draws lines and boxes on the full (no window
manager) screen at 10 Hz. We ran the photon and OpenGL versions of the
program on the same computer and measured the drawing time and cpu
usage. Here are the results.

Photon version:
Draw time = 5 miliseconds (mean)
CPU usage = 20% (mean)

OpenGL version:
Draw time = 48 miliseconds (mean)
CPU usage = 67% (mean)

It is obvious that the photon version of the program is drawing faster
and using less CPU than the OpenGL version. It would appear that we do
not have hardware acceleration in OpenGL. I would expect that the
drawing time be less and the CPU usage be MUCH less if the hardware
acceleration was on. Is this a correct assumption?

Assuming we are not getting hardware acceleration, what must one do when
they compile an OpenGL program to make sure hardware acceleration is
on? What should be done at runtime?

Alec Gorjestani
Intelligent Vehicles Lab
University of Minnesota

Yes, the “Photon” version calls only Photon draw functions like PgDraw.
The OpenGL version calls only OpenGL functions like glBegin.

We are in full screen mode. We are not using the glide API. Must one
use the glide API in order to get hardware acceleration? Is there a way
to get hardware acceleration using only OpenGL functions calls?

Alec

Markus Loffler wrote:

What do you mean with “Photon” version and “OpenGL” version. You mean in
your Photon version you use “PgDraw…” etc commands and in your OpenGL
version you use “glBegin(GL_LINE)” etc? Your OpenGL version is full screen
using glide? If not then the drawing of the lines and boxes is done in
software using Mesa, and no big surprise, is much slower.
Markus

\

  • Photon can take advantage of hardware acceleration

“Alec Gorjestani” <> alecg@me.umn.edu> > wrote in message
news:> 3B2F71E5.5000800@me.umn.edu> …

Hello,

I am trying to determine whether hardware acceleration is enabled in an
application. We have a computer with a PCI Voodoo III card. The
banshee driver is loaded an operating normally.

We have an application that was first written in photon and then ported
to OpenGL. The application draws lines and boxes on the full (no window
manager) screen at 10 Hz. We ran the photon and OpenGL versions of the
program on the same computer and measured the drawing time and cpu
usage. Here are the results.

Photon version:
Draw time = 5 miliseconds (mean)
CPU usage = 20% (mean)

OpenGL version:
Draw time = 48 miliseconds (mean)
CPU usage = 67% (mean)

It is obvious that the photon version of the program is drawing faster
and using less CPU than the OpenGL version. It would appear that we do
not have hardware acceleration in OpenGL. I would expect that the
drawing time be less and the CPU usage be MUCH less if the hardware
acceleration was on. Is this a correct assumption?

Assuming we are not getting hardware acceleration, what must one do when
they compile an OpenGL program to make sure hardware acceleration is
on? What should be done at runtime?

Alec Gorjestani
Intelligent Vehicles Lab
University of Minnesota

To get hardware accelerated 3D, you should do something similar to
/usr/src/Mesa/demo.glide. You don’t use the glide API, but you use OpenGL on
top of glide (if I understand correctly, maybe somebody can enlighten me,
don’t know much about glide).

However, it’s not quite fair to compare Photon API and OpenGL. Photon API is
for 2D graphics, also optimized for 2D graphics. OpenGL is for 3D graphics,
it’s very fast for hidden line polygons, but just two draw a simple line it
does extra stuff compared to Photon API (use transformation matrices etc).

Also, do you use the same screen size for both? Do you clear the screen
continously?

Run /usr/src/Mesa/demo.sw (software OpenGL) in a maximized window as
compared to /usr/src/Mesa/demo.glide, and if you have a clear speed
difference it shows you that you use 3D hardware accleration.

Markus



“Alec Gorjestani” <alecg@me.umn.edu> wrote in message
news:3B2F8567.2090205@me.umn.edu

Yes, the “Photon” version calls only Photon draw functions like PgDraw.
The OpenGL version calls only OpenGL functions like glBegin.

We are in full screen mode. We are not using the glide API. Must one
use the glide API in order to get hardware acceleration? Is there a way
to get hardware acceleration using only OpenGL functions calls?

Alec

Markus Loffler wrote:

What do you mean with “Photon” version and “OpenGL” version. You mean in
your Photon version you use “PgDraw…” etc commands and in your OpenGL
version you use “glBegin(GL_LINE)” etc? Your OpenGL version is full
screen
using glide? If not then the drawing of the lines and boxes is done in
software using Mesa, and no big surprise, is much slower.
Markus

\

  • Photon can take advantage of hardware acceleration

“Alec Gorjestani” <> alecg@me.umn.edu> > wrote in message
news:> 3B2F71E5.5000800@me.umn.edu> …

Hello,

I am trying to determine whether hardware acceleration is enabled in an
application. We have a computer with a PCI Voodoo III card. The
banshee driver is loaded an operating normally.

We have an application that was first written in photon and then ported
to OpenGL. The application draws lines and boxes on the full (no
window
manager) screen at 10 Hz. We ran the photon and OpenGL versions of the
program on the same computer and measured the drawing time and cpu
usage. Here are the results.

Photon version:
Draw time = 5 miliseconds (mean)
CPU usage = 20% (mean)

OpenGL version:
Draw time = 48 miliseconds (mean)
CPU usage = 67% (mean)

It is obvious that the photon version of the program is drawing faster
and using less CPU than the OpenGL version. It would appear that we do
not have hardware acceleration in OpenGL. I would expect that the
drawing time be less and the CPU usage be MUCH less if the hardware
acceleration was on. Is this a correct assumption?

Assuming we are not getting hardware acceleration, what must one do
when
they compile an OpenGL program to make sure hardware acceleration is
on? What should be done at runtime?

Alec Gorjestani
Intelligent Vehicles Lab
University of Minnesota