OpenGL works slow without graphics drivers, and also in Virtual Machines (VMWare) ?

Discussion in 'Windows 64bit' started by Skybuck Flying, Jul 13, 2011.

  1. Hello,

    I suspect OpenGL works very slow without graphics drivers on operating
    systems and also works very slow in virtual machines like VMWare.

    I am not sure what the cause of the slowdown is... it could be "opengl
    array" related issues, like glDrawArrays it could also be glClear it could
    also be glCopyPixels.

    It's somewhat surprising that OpenGL is so slow and GDI so fast.

    OpenGL seems 1000x slower than GDI in these kinds of situations.

    This makes it seem that OpenGL is unsuited as a general graphics purposes
    layer.

    It's a risk for software/application developers.

    Especially since Virtualization is populair.

    Even a modern Windows Professional x64 Virtualized Operating System shows
    the tremendous slow down.

    Either there is a really strange bug in my own application or something
    really weird is going on with OpenGL.

    Anybody have samiliar experiences with OpenGL without graphics drivers
    installed or OpenGL in virtual environments ?!?

    Bye,
    Skybuck.
     
    Skybuck Flying, Jul 13, 2011
    #1
    1. Advertising

  2. Skybuck Flying

    David Guest

    Virtualbox ( http:/www.virtualbox.org ) supports accelerated opengl on
    linux, well does with my virtual ubuntu installation anyway...

    "Skybuck Flying" wrote in message
    news:78815$4e1ce1cf$5419acc3$1.nb.home.nl...

    Hello,

    I suspect OpenGL works very slow without graphics drivers on operating
    systems and also works very slow in virtual machines like VMWare.

    I am not sure what the cause of the slowdown is... it could be "opengl
    array" related issues, like glDrawArrays it could also be glClear it could
    also be glCopyPixels.

    It's somewhat surprising that OpenGL is so slow and GDI so fast.

    OpenGL seems 1000x slower than GDI in these kinds of situations.

    This makes it seem that OpenGL is unsuited as a general graphics purposes
    layer.

    It's a risk for software/application developers.

    Especially since Virtualization is populair.

    Even a modern Windows Professional x64 Virtualized Operating System shows
    the tremendous slow down.

    Either there is a really strange bug in my own application or something
    really weird is going on with OpenGL.

    Anybody have samiliar experiences with OpenGL without graphics drivers
    installed or OpenGL in virtual environments ?!?

    Bye,
    Skybuck.
     
    David, Jul 13, 2011
    #2
    1. Advertising

  3. Skybuck Flying

    fungus Guest

    Re: OpenGL works slow without graphics drivers, and also in VirtualMachines (VMWare) ?

    On Jul 13, 2:07 am, "Skybuck Flying" <>
    wrote:
    > Hello,
    >
    > I suspect OpenGL works very slow without graphics drivers on operating
    > systems and also works very slow in virtual machines like VMWare.
    >


    Oh, RLY?

    > I am not sure what the cause of the slowdown is... it could be "opengl
    > array" related issues, like glDrawArrays it could also be glClear it could
    > also be glCopyPixels.
    >


    LOL! That's a list of all the things that *aren't* causing the
    problem....

    > It's somewhat surprising that OpenGL is so slow and GDI so fast.


    Does GDI do shading/texturing/lighting/depth buffering....?
     
    fungus, Jul 13, 2011
    #3
  4. The OpenGL application is simply clearing the screen and drawing some boxes
    and then flipping it to the screen (copy pixels).

    Yet it's still very slow without a graphics driver.

    Even windows 95 on a 80486 is 1000x faster than the modern computers.

    So something odd is going on.

    Bye,
    Skybuck.
     
    Skybuck Flying, Jul 14, 2011
    #4
  5. I'd rather not.

    My tool should work even when no graphics drivers loaded ;)

    Bye,
    Skybuck.
     
    Skybuck Flying, Jul 14, 2011
    #5
  6. Perhaps it's possible to compile/build the application/my tool in such a way
    that profiling information from a tool like qatime is added.

    Then this executable could be transferred to windows 95 (However I would
    expect qatime code to fail because of old platform).

    Then this executable could be transferred to windows x64 pro virtualized os
    and hopefully get some performance metrics.

    This would then save me quite some time... no need to go add profiling code
    manually, no need to start guessing where the slow down might occur.

    Hopefully qatime modified executable can then collect profiling data, and
    hopefully this can then be transferred back to my debugging/development
    system for a looksy.

    Failing that it would be interesting if windows 7 had a "default graphics
    driver" mode to test my app under default windows 7 conditions.

    Perhaps windows 7 still has safe mode which might work like that ;)

    Bye,
    Skybuck.
     
    Skybuck Flying, Jul 14, 2011
    #6
  7. Re: OpenGL works slow without graphics drivers, and also in VirtualMachines (VMWare) ?

    On Wed, 13 Jul 2011 22:08:15 -0500
    Zootal <> wrote:

    > Are you just trolling us?


    Take a look on his other "contributions" to Usenet and judge for
    yourself.


    Wolfgang
     
    Wolfgang.Draxinger, Jul 15, 2011
    #7
  8. Getting to the bottom of this is probably going to be easier than I thought.

    The virtualized windows x64 pro has delphi 2007 on it which also had qatime
    installed right before it died sorta... now it's revived so it can be used.

    Right now I am getting to the bottom of it. So far it already appears to be
    a problem with opengl.

    Either it's painting too slow, or there is another problem.

    I am now going to split up the paint method to see which part takes the long
    time.

    Then I will report back ;)

    Bye,
    Skybuck.
     
    Skybuck Flying, Jul 17, 2011
    #8
  9. I have profiled the application and this is the opengl call which causes the
    major slowdown:

    glFlush;

    I suspect this function pushes all the previous commands to the opengl
    driver and expects the opengl driver to complete them.

    All other application routines seem to execute just fine.

    So possible conclusion:

    The slow down happens somewhere inside of the opengl driver.

    Therefore further profiling the application itself would be useless.

    Therefore I need some kind of opengl profiler which can profile opengl
    itself/the driver.

    Bye,
    Skybuck.
     
    Skybuck Flying, Jul 17, 2011
    #9
  10. Skybuck Flying

    fungus Guest

    Re: OpenGL works slow without graphics drivers, and also in VirtualMachines (VMWare) ?

    On Jul 17, 9:07 am, "Skybuck Flying" <>
    wrote:
    > I have profiled the application and this is the opengl call which causes the
    > major slowdown:
    >
    > glFlush;
    >


    LOL!

    > I suspect this function pushes all the previous commands to the opengl
    > driver and expects the opengl driver to complete them.
    >


    But you can't possibly read any documentaion
    to confirm/deny your "suspicion", right ...

    .... because reading documentation just isn't the way
    starbucky rolls.
     
    fungus, Jul 17, 2011
    #10
  11. Actually I remember there was only one rectangle being drawn (before that a
    clear) so it's definetly not a case of to much stuff to render, which leaves
    one last possibility, some kind of strange bug in the opengl software driver
    ?! (Or the clear is causing the slow down)

    Bye,
    Skybuck.
     
    Skybuck Flying, Jul 17, 2011
    #11
  12. What makes you believe that the documentation will help me ?

    Bye,
    Skybuck.
     
    Skybuck Flying, Jul 17, 2011
    #12
  13. Ok,

    I took a lazy approach and simply disabled some open api calls which were
    probably queueing opengl commands.

    Then I started to get a hunch for what the problem was:

    It turns out the "double" buffering is causing a major slowdown:

    When mOptionDoubleBufferEnabled is set to true, things become extremely
    slow.

    When mOptionDoubleBufferEnabled is set to false, everything runs faster, but
    the drawing starts to flicker :(

    I don't think GDI would flicker that much... this means opengl software
    driver just sucks compared to gdi.

    // if double buffering is enabled then draw to backbuffer
    if mOptionDoubleBufferEnabled then
    begin
    mOpenGLAPI.glDrawBuffer( GL_BACK );
    end else
    // else draw to front buffer
    begin
    mOpenGLAPI.glDrawBuffer( GL_FRONT );
    end;

    .... opengl draw codes...

    // if double buffering is enabled then we still need to copy it to the
    front buffer
    if mOptionDoubleBufferEnabled then
    begin
    mOpenGLAPI.glReadBuffer( GL_BACK );
    mOpenGLAPI.glDrawBuffer( GL_FRONT );
    mOpenGLAPI.glCopyPixels( 0, 0, ClientWidth, ClientHeight, GL_COLOR);
    end;

    mOpenGLAPI.glFlush;

    Bye,
    Skybuck.
     
    Skybuck Flying, Jul 17, 2011
    #13
  14. A possible solution could be to:

    // glCopyPixels not used this api any more as it seems the cause of the slow
    down.

    // glFlush perhaps also leave this out.

    And instead use:

    SwapBuffers( Canvas.Handle ); // windows api call.

    From what I can remember I didn't like this solution at first because this
    limits the rendering speed of opengl to 60 hz or so... or it adds some
    milliseconds of waiting time.

    As I wanted to use the same code for gpgpu or so.... I didn't want this 60
    hz limitation/retrace limitation.

    But it seems this has to be used for slower systems.

    Swapping the buffers instead of copieing the pixels makes sense... I can
    imagine the swap buffer call to simply swap some pointers here and there.

    The performance is much better, and double buffering can be used so no more
    blinking.

    Even when double buffering is off it seems to work, not yet sure why... and
    no flicker so far.

    It's note worthy to note that previous method was faster for single
    buffering but produced unwanted flicker.

    I am not sure if the ReadBuffer call and the DrawBuffer call are still
    needed. From what I remember these specify the source and dest buffer for
    the glCopyPixels call, so these calls can probably be left out.

    I can vaguely remember SwapBuffers to work with two buffers always... it
    seems to make sense... one offline and one online buffer... so any other
    buffer calls probably not needed when using this api.

    Well now I know how to fix my application so it runs on "default windows"
    with acceptable speed and no flicker...

    Bye,
    Skybuck.
     
    Skybuck Flying, Jul 17, 2011
    #14
  15. Ofcourse I should still make sure GDI is supported as well and can be switch
    to for safe heaven...

    Because ya never know... opengl could have more unpleasent surprises ! ;) =D

    Bye,
    Skybuck =D
     
    Skybuck Flying, Jul 17, 2011
    #15
  16. Skybuck Flying

    Quadibloc Guest

    Re: OpenGL works slow without graphics drivers, and also in VirtualMachines (VMWare) ?

    What you state in the title should come as no surprise.

    OpenGL and Direct X both provide graphics-intensive programs with a
    standardized interface for doing things applicable, for example, to 3D
    animation.

    This replaces having to write those programs only to work with the
    graphics acceleration on one particular video card - or with modules
    for all the different video cards.

    So, if you don't have the drivers, if you are inside a virtual machine
    which has just a plain Super VGA card without acceleration, your
    OpenGL driver has to do all the computational work itself, without
    making use of the graphics acceleration features of your video card.
    As you've observed, this causes a major slowdown.

    Profiling is not the answer. The answer is to either get the drivers,
    or have one's virtualization software pass through the type of video
    card you actually have - select that video card in one's virtual
    machine, and ensure that the virtualization software handles it by a
    pass-through.

    John Savard
     
    Quadibloc, Jul 17, 2011
    #16
  17. Skybuck Flying

    fungus Guest

    Re: OpenGL works slow without graphics drivers, and also in VirtualMachines (VMWare) ?

    On Jul 17, 9:53 am, "Skybuck Flying" <>
    wrote:
    > What makes you believe that the documentation will help me ?
    >


    Well ... It usually helps *me* when I read it (which
    I often do)
     
    fungus, Jul 17, 2011
    #17
  18. Skybuck Flying

    Leclerc Guest

    Re: OpenGL works slow without graphics drivers, and also in VirtualMachines (VMWare) ?

    >> What makes you believe that the documentation will help me ?
    >>

    >
    > Well ... It usually helps *me* when I read it (which
    > I often do)
    >


    I don't know whether it is a rule or exception, but reading docs helps
    me as well ...
     
    Leclerc, Jul 17, 2011
    #18
  19. Skybuck Flying

    David Guest

    "Skybuck Flying" wrote in message
    news:7190d$4e2294fd$5419acc3$1.nb.home.nl...

    What makes you believe that the documentation will help me ?

    Bye,
    Skybuck.

    You see this is why I don't block this guy, some of his comments are
    hilarious.

    Almost worth quoting that one.

    Thanks Skybuck :D
     
    David, Jul 17, 2011
    #19
  20. Skybuck Flying

    fungus Guest

    Re: OpenGL works slow without graphics drivers, and also in VirtualMachines (VMWare) ?

    On Jul 17, 7:06 pm, "David" <> wrote:
    >
    > You see this is why I don't block this guy, some of his comments are
    > hilarious.
    >


    Yep.
     
    fungus, Jul 17, 2011
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Adriano
    Replies:
    1
    Views:
    932
    mark mandel
    Dec 15, 2003
  2. Fogar
    Replies:
    1
    Views:
    707
    Erick
    Jan 17, 2006
  3. Waylon Kenning

    VMware releases a free VMware Player

    Waylon Kenning, Oct 21, 2005, in forum: NZ Computing
    Replies:
    0
    Views:
    580
    Waylon Kenning
    Oct 21, 2005
  4. jpersona
    Replies:
    8
    Views:
    626
    catwalker63
    Apr 12, 2005
  5. karthikbalaguru
    Replies:
    3
    Views:
    1,944
    Shenan Stanley
    Jan 10, 2010
Loading...

Share This Page