Is fullscreen mode slower???

Is fullscreen mode slower???

Post by avia.. » Sun, 01 Oct 2000 11:25:02



I have been working on a OpenGL application and
have encountered two spead querks that are
confuseing me!  The first is that fullscreen
modes seam to run about 20-50 times slower than
windowed modes???  This happens with other
programs as well!  I've tryed 8,16 and 32 bit
modes in fullscreen and windowed modes and there
all slower in fullscreen!  I am primarly useing a
voodoo 3 2000 but have also had this on my other
systems with ati and matrox cards as well!  (What
I wouldn't give for an nvidia card right now! :(
The other speed problem I have is useing display
list, I'm working with the code from nehe's
tutorial 13 to do 2d text and for some reason
adding  a 10 letter string with a spinning cube
dropped the frame rate from over 500 fps to about
100 fps! :(  Is the text objects really that
expensive???  combining that with the fullscreen
mode give me avout a .25 fps!!! :(  for 10
letters and a spinning cube (solid color, not
textured)

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Is fullscreen mode slower???

Post by ZZ » Sun, 01 Oct 2000 14:55:18


1/ with a voodoo u have to be in 16bit mode, 8 or 32 dont accelerate.
2/ text is made up of a lot of triangles, u can do an I or L with just a few polygons but try doing a B C D, to get curves that look
smooth u need a lot of polygons. check out the faq for methods on doing text in gl http://www.frii.com/~martz/oglfaq/ there might
also be further info about your card

> I have been working on a OpenGL application and
> have encountered two spead querks that are
> confuseing me!  The first is that fullscreen
> modes seam to run about 20-50 times slower than
> windowed modes???  This happens with other
> programs as well!  I've tryed 8,16 and 32 bit
> modes in fullscreen and windowed modes and there
> all slower in fullscreen!  I am primarly useing a
> voodoo 3 2000 but have also had this on my other
> systems with ati and matrox cards as well!  (What
> I wouldn't give for an nvidia card right now! :(
> The other speed problem I have is useing display
> list, I'm working with the code from nehe's
> tutorial 13 to do 2d text and for some reason
> adding  a 10 letter string with a spinning cube
> dropped the frame rate from over 500 fps to about
> 100 fps! :(  Is the text objects really that
> expensive???  combining that with the fullscreen
> mode give me avout a .25 fps!!! :(  for 10
> letters and a spinning cube (solid color, not
> textured)

> Sent via Deja.com http://www.deja.com/
> Before you buy.


 
 
 

Is fullscreen mode slower???

Post by S.S. » Sun, 01 Oct 2000 04:00:00


In full screen mode you wait for a VSync retrace signals so the frame rate
can never be more than your monitor refresh rate.. i.e 60-80 fps.

in windowed mode you get a higher fps rate because VSync is not checked.
You might might be drawing 500 frames per sec but since your monitor
refreshes at ~75fps then you obviously don't see all the frames that you
draw.
75fps produces prety smooth animations. If your problem is the speed your
animation is running at, then you should use some kind of timing control.

You  can either use a window timer to synchronise or you can use
QueryPerformanceFrequency and QueryPerformanceCounter windowsSDK calls to
calculate the time elapsed and the correct animation speed based on the time
interval


> I have been working on a OpenGL application and
> have encountered two spead querks that are
> confuseing me!  The first is that fullscreen
> modes seam to run about 20-50 times slower than
> windowed modes???  This happens with other
> programs as well!  I've tryed 8,16 and 32 bit
> modes in fullscreen and windowed modes and there
> all slower in fullscreen!  I am primarly useing a
> voodoo 3 2000 but have also had this on my other
> systems with ati and matrox cards as well!  (What
> I wouldn't give for an nvidia card right now! :(
> The other speed problem I have is useing display
> list, I'm working with the code from nehe's
> tutorial 13 to do 2d text and for some reason
> adding  a 10 letter string with a spinning cube
> dropped the frame rate from over 500 fps to about
> 100 fps! :(  Is the text objects really that
> expensive???  combining that with the fullscreen
> mode give me avout a .25 fps!!! :(  for 10
> letters and a spinning cube (solid color, not
> textured)

> Sent via Deja.com http://www.deja.com/
> Before you buy.

 
 
 

Is fullscreen mode slower???

Post by Tobias Thiere » Sun, 01 Oct 2000 04:00:00


Hi,


> I have been working on a OpenGL application and
> have encountered two spead querks that are
> confuseing me!  The first is that fullscreen
> modes seam to run about 20-50 times slower than
> windowed modes???  This happens with other
> programs as well!  I've tryed 8,16 and 32 bit
> modes in fullscreen and windowed modes and there
> all slower in fullscreen!  I am primarly useing a
> voodoo 3 2000

You should use 16 bit colordepth as "ZZ" already
mentioned, because the voodoo3 is not capable
of accelerating 32bit color modes. I'm not sure
about 8bit, though.

Quote:> The other speed problem I have is useing display
> list, I'm working with the code from nehe's
> tutorial 13 to do 2d text and for some reason
> adding  a 10 letter string with a spinning cube
> dropped the frame rate from over 500 fps to about
> 100 fps! :(

What did you draw before adding the string and the
cube? If you didn't draw anything, a slowdown from
500fps to 100fps is not surprising. Besides, you
will never get such high framerates if you are
running fullscreen and wait for the vertical
retrace, because your monitor is probably operating
somewhere between 75 and 140 Hz.

Quote:> Is the text objects really that
> expensive??? combining that with the fullscreen
> mode give me avout a .25 fps!!! :(

It shouldn't be too expensive, especially because it
is only a bitmap font (you should have mentioned that).
It should definitely not drop your framerate below 50.
You must be doing something wrong.

What does happen if you run the sample code that
is provided for Nehe's Lesson 13? Does this
code also run so slow?

Regards,

        Tobias Thierer

 
 
 

Is fullscreen mode slower???

Post by Ruud van Ga » Sun, 01 Oct 2000 04:00:00


On Sat, 30 Sep 2000 12:40:29 +0200, Tobias Thierer

...

Quote:>> Is the text objects really that
>> expensive??? combining that with the fullscreen
>> mode give me avout a .25 fps!!! :(

>It shouldn't be too expensive, especially because it
>is only a bitmap font (you should have mentioned that).
>It should definitely not drop your framerate below 50.
>You must be doing something wrong.

I've noticed that using glBitmap() calls to draw 2D text is very slow,
when porting my car sim from SGI to the PC. Even so much, that I'm
going to leave out glBitmap() calls hopefully all the way.

Ruud van Gaal, GPL Rank +53.25
MarketGraph   : http://www.marketgraph.nl
Pencil art    : http://www.marketgraph.nl/gallery/
Car simulation: http://www.marketgraph.nl/gallery/racer/

 
 
 

Is fullscreen mode slower???

Post by Ben Harri » Sun, 01 Oct 2000 23:55:57


That's an interesting problem, as for myself, I experience framerate
increases when running in fullscreen modes.
I'm using a TNT2, and it's important to point out that vsync can be disabled
on this card (and most nVidia models).

The real reason that I replied to this message though was to mention that
from a WIN32 perspective, using wglUseFontBitmaps or the associated
functions to create a font set are INCREDIBLY slow. 2D fonts can be just as
problematic and I seriously doubt this performance hit has anything to do
with the number of polygons being rendered.

Although it can be cumbersome, if you want real performance, the best bet is
to texture map a polygon with the text you wish to output.

Ben.


> I have been working on a OpenGL application and
> have encountered two spead querks that are
> confuseing me!  The first is that fullscreen
> modes seam to run about 20-50 times slower than
> windowed modes???  This happens with other
> programs as well!  I've tryed 8,16 and 32 bit
> modes in fullscreen and windowed modes and there
> all slower in fullscreen!  I am primarly useing a
> voodoo 3 2000 but have also had this on my other
> systems with ati and matrox cards as well!  (What
> I wouldn't give for an nvidia card right now! :(
> The other speed problem I have is useing display
> list, I'm working with the code from nehe's
> tutorial 13 to do 2d text and for some reason
> adding  a 10 letter string with a spinning cube
> dropped the frame rate from over 500 fps to about
> 100 fps! :(  Is the text objects really that
> expensive???  combining that with the fullscreen
> mode give me avout a .25 fps!!! :(  for 10
> letters and a spinning cube (solid color, not
> textured)

> Sent via Deja.com http://www.deja.com/
> Before you buy.

 
 
 

Is fullscreen mode slower???

Post by Oleg Letsinsk » Mon, 02 Oct 2000 04:00:00



> I have been working on a OpenGL application and
> have encountered two spead querks that are
> confuseing me!  The first is that fullscreen
> modes seam to run about 20-50 times slower than
> windowed modes???  This happens with other
> programs as well!  I've tryed 8,16 and 32 bit
> modes in fullscreen and windowed modes and there
> all slower in fullscreen!

There is (IMO) only one explanation - your programs run in software
rendering mode in full-screen. Have you tried full-screen programs,
written by someone else? (GLQuake :-))

--
People who think they know everything greatly annoy those of us who do.

 
 
 

Is fullscreen mode slower???

Post by avia.. » Tue, 03 Oct 2000 13:23:29


In an attemp to reply to all the reply's I got...  And thanks to all
who replyed! :)
The nehe tutorial program runs incredibly slow as well! :(

The results of running the program...
All resolutions at 640x480
All fullscreen modes at 16 bit!
The desktop set to 16 bit!
Voodoo 3 2000 16M video card
350 Mhz PII
128 MB ram
Cube displayed is flat shaded solid color cube

In windowed mode
Spinning cube without FPS text displayed
514 fps
Spinning cube with FPS text displayed
119 fps

In fullscreen mode
Spinning cube without FPS text displayed
60 fps (monitor goes to 60hz when in 640x480 mode!)
Spinning cube with FPS text displayed
0.4 fps

OK, I hit the vsync rate in fullscreen!  but what happens to drop the
framerate by 150 time when I display 15 characters when in windowed
mode the same change only makes a 5 times difference??? :(  If it's
explained by the number of polygons displayed for the text then that
means that the text averages 60 polys per letter!!! :(

To create the font I use
        FontDisplayLists = glGenLists(256);

        HFONT   font;
        font = CreateFont(
            -24,        // Height Of Font
        0,      // Width Of Font
        0,      // Angle Of Escapement
        0,      // Orientation Angle
        FW_BOLD,        // Font Weight
        FALSE,          // Italic
        FALSE,          // Underline
        FALSE,          // Strikeout
        ANSI_CHARSET,   // Character Set Identifier
        OUT_TT_PRECIS,  // Output Precision
        CLIP_DEFAULT_PRECIS,// Clipping Precision
        DRAFT_QUALITY,  // Output Quality
        FF_DONTCARE|DEFAULT_PITCH,// Family And Pitch
        "Courier New");               // Font Name
        SelectObject(Current->GetGLDC(),font);
        wglUseFontBitmaps(Current->GetGLDC(),0,255,FontDisplayLists);

To display the text I use
        glPushAttrib(GL_LIST_BIT);
        glListBase(FontDisplayLists);
        glCallLists(strlen(text), GL_UNSIGNED_BYTE, text);
        glPopAttrib();

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Is fullscreen mode slower???

Post by Ruud van Ga » Tue, 03 Oct 2000 04:00:00


...

Quote:>In fullscreen mode
>Spinning cube without FPS text displayed
>60 fps (monitor goes to 60hz when in 640x480 mode!)
>Spinning cube with FPS text displayed
>0.4 fps

>OK, I hit the vsync rate in fullscreen!  but what happens to drop the
>framerate by 150 time when I display 15 characters when in windowed
>mode the same change only makes a 5 times difference??? :(  If it's
>explained by the number of polygons displayed for the text then that
>means that the text averages 60 polys per letter!!! :(

...
>    wglUseFontBitmaps(Current->GetGLDC(),0,255,FontDisplayLists);

>To display the text I use
>    glPushAttrib(GL_LIST_BIT);
>    glListBase(FontDisplayLists);
>    glCallLists(strlen(text), GL_UNSIGNED_BYTE, text);
>    glPopAttrib();

Try omitting the glPushAttrib()/glPopAttrib(); you don't need it and
it's slow. I use glCallLists as well in my car sim (you can try how
fast that one goes; it's about 20-30Hz at my PII-400/Voodoo Banshee).
I use the exact same stuff, although perhaps I don't create all 256
chars, but just a subrange. Try that too.

Ruud van Gaal, GPL Rank +53.25
MarketGraph   : http://www.marketgraph.nl
Pencil art    : http://www.marketgraph.nl/gallery/
Car simulation: http://www.marketgraph.nl/gallery/racer/

 
 
 

Is fullscreen mode slower???

Post by avia.. » Fri, 06 Oct 2000 04:00:00


Well, I did a profile of the program and discovered that 90.6% of the
program's execution time is spent on the glCallLists function! :(
This means that's what's slowing thing's down.  As for the fullscreen
mode OpenGL is reporting the hardware acceleration and if I remove the
text it run's fine.  I think it might be a problem with the driver in
fullscreen not handeling the display list very well! :(  On the
otherhand the nehe tutorial 25 wich is a display of the driver info and
extensions present run's at full speed in fullscreen mode!  I'll have
to go through that and see what kind of differences there are that
might be causing this problem.
If anyone has any other sugestions please let me know.

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Is fullscreen mode slower???

Post by ZZ » Sat, 07 Oct 2000 04:00:00


its not surprising 90% of the time is spent in the calllists function,
after all it does all the drawing

> Well, I did a profile of the program and discovered that 90.6% of the
> program's execution time is spent on the glCallLists function! :(
> This means that's what's slowing thing's down.  As for the fullscreen
> mode OpenGL is reporting the hardware acceleration and if I remove the
> text it run's fine.  I think it might be a problem with the driver in
> fullscreen not handeling the display list very well! :(  On the
> otherhand the nehe tutorial 25 wich is a display of the driver info and
> extensions present run's at full speed in fullscreen mode!  I'll have
> to go through that and see what kind of differences there are that
> might be causing this problem.
> If anyone has any other sugestions please let me know.

> Sent via Deja.com http://www.deja.com/
> Before you buy.

 
 
 

Is fullscreen mode slower???

Post by Ruud van Ga » Sat, 07 Oct 2000 04:00:00




Quote:>its not surprising 90% of the time is spent in the calllists function,
>after all it does all the drawing

If you suspect thought that glCallLists() has way too much overhead,
try not filling them with commands, but still creating them.
Not that this is really worth your time, probably. ;-)
glBitmap() calls are just plain slow on low-end consumer hardware
(much like glDrawPixels(), although less slow on my Banshee).


>> Well, I did a profile of the program and discovered that 90.6% of the
>> program's execution time is spent on the glCallLists function! :(
>> This means that's what's slowing thing's down.

Ruud van Gaal, GPL Rank +53.25
MarketGraph   : http://www.marketgraph.nl
Pencil art    : http://www.marketgraph.nl/gallery/
Car simulation: http://www.marketgraph.nl/gallery/racer/
 
 
 

Is fullscreen mode slower???

Post by avia.. » Sat, 07 Oct 2000 04:00:00




Quote:> If you suspect thought that glCallLists() has way too much overhead,
> try not filling them with commands, but still creating them.
> Not that this is really worth your time, probably. ;-)
> glBitmap() calls are just plain slow on low-end consumer hardware
> (much like glDrawPixels(), although less slow on my Banshee).

Just tryed that.  The framerate jumped from 25 to 490 in windowed mode
and from practically 0 to 60 in fullscreen mode!  The program is
displaying 4 lines now, the fps, driver name, driver vendor, and driver
version.  I finally got a friend to try it on his geforce 2!!! :)  It
did 60 fps windowed (32 bit desktop) and in 32 bit fullscreen.  It did
116 fps in 16 bit fullscreen!!! :)
  I'm still gonna find a better way to do the text!  probably precreate
everything I can to a texture and do one textured quad.  oh well!

  thanks for the help.

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Is fullscreen mode slower???

Post by fungu » Sat, 07 Oct 2000 04:00:00



>   I'm still gonna find a better way to do the text!  probably precreate
> everything I can to a texture and do one textured quad.  oh well!

Ummm...isn't that what the FAQ's told you since the very beginning???

--
<\___/>
/ O O \
\_____/  FTB.

 
 
 

Is fullscreen mode slower???

Post by Ruud van Ga » Sat, 07 Oct 2000 04:00:00



>  I'm still gonna find a better way to do the text!  probably precreate
>everything I can to a texture and do one textured quad.  oh well!

Try to go for gold; create 1 texture which lots of the chars you'll
need, and draw 1 poly (quad) for each letter. At least, well, that's
faster than creating a texture every time you want to change the text.
Note: this is because on 3dfx/nVidia low-end, you will probably use
glCopyTexImage2D() or one of those, which is slow too (never used it
yet though on PC's). So, get 1 texture ready, it's in the card's
memory, and draw little poly's with the texture coords right so you
get the right characters shown.

Note also that on better/future machines, you can edit your textures
'live', or at least I do that on O2's, where you can have a pbuffer,
an offscreen OpenGL-accelerated buffer. You can use that pbuffer
directly as a texture, and you have access (memory ptr for example, or
an OpenGL context) to it. So you can edit your texture more easily
(you can get live video/movies in full 3D like that on O2's).
Instead, on your card you must probably set it up in host memory and
copy that to the gfx card's video memory. Which is like
glDrawPixels().

So go for the 1 static texture method, which contains a single font.
Try not to move beyond 256x256 for 3dfx's old cards sake. Hm, a bit
small perhaps for a font, but anyway.

Or better yet, avoid the text where possible.

Ruud van Gaal, GPL Rank +53.25
MarketGraph   : http://www.marketgraph.nl
Pencil art    : http://www.marketgraph.nl/gallery/
Car simulation: http://www.marketgraph.nl/gallery/racer/