A Computer hardware and components forum. ComputerBanter.com

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ComputerBanter.com forum » Video Cards » Nvidia Videocards
Site Map Home Authors List Search Today's Posts Mark Forums Read Web Partners

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



 
 
Thread Tools Display Modes
  #11  
Old July 17th 11, 08:53 AM posted to alt.comp.lang.borland-delphi,alt.comp.periphs.videocards.nvidia,comp.arch,comp.graphics.api.opengl,microsoft.public.windows.64bit.general
Skybuck Flying[_7_]
external usenet poster
 
Posts: 463
Default OpenGL works slow without graphics drivers, and also in Virtual Machines (VMWare) ?

What makes you believe that the documentation will help me ?

Bye,
Skybuck.
  #12  
Old July 17th 11, 09:14 AM posted to alt.comp.lang.borland-delphi,alt.comp.periphs.videocards.nvidia,comp.arch,comp.graphics.api.opengl,microsoft.public.windows.64bit.general
Skybuck Flying[_7_]
external usenet poster
 
Posts: 463
Default OpenGL works slow without graphics drivers, and also in Virtual Machines (VMWare) ?

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.

  #13  
Old July 17th 11, 09:42 AM posted to alt.comp.lang.borland-delphi,alt.comp.periphs.videocards.nvidia,comp.arch,comp.graphics.api.opengl,microsoft.public.windows.64bit.general
Skybuck Flying[_7_]
external usenet poster
 
Posts: 463
Default OpenGL works slow without graphics drivers, and also in Virtual Machines (VMWare) ?

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.

  #14  
Old July 17th 11, 09:48 AM posted to alt.comp.lang.borland-delphi,alt.comp.periphs.videocards.nvidia,comp.arch,comp.graphics.api.opengl,microsoft.public.windows.64bit.general
Skybuck Flying[_7_]
external usenet poster
 
Posts: 463
Default OpenGL works slow without graphics drivers, and also in Virtual Machines (VMWare) ?

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

  #15  
Old July 17th 11, 01:24 PM posted to alt.comp.lang.borland-delphi,alt.comp.periphs.videocards.nvidia,comp.arch,comp.graphics.api.opengl,microsoft.public.windows.64bit.general
Quadibloc
external usenet poster
 
Posts: 47
Default 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
  #16  
Old July 17th 11, 02:15 PM posted to alt.comp.lang.borland-delphi,alt.comp.periphs.videocards.nvidia,comp.arch,comp.graphics.api.opengl,microsoft.public.windows.64bit.general
fungus
external usenet poster
 
Posts: 17
Default 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)

  #17  
Old July 17th 11, 03:19 PM posted to alt.comp.lang.borland-delphi,alt.comp.periphs.videocards.nvidia,comp.arch,comp.graphics.api.opengl,microsoft.public.windows.64bit.general
Leclerc
external usenet poster
 
Posts: 1
Default 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 ...
  #18  
Old July 17th 11, 06:06 PM posted to alt.comp.lang.borland-delphi,alt.comp.periphs.videocards.nvidia,comp.arch,comp.graphics.api.opengl,microsoft.public.windows.64bit.general
David[_20_]
external usenet poster
 
Posts: 5
Default OpenGL works slow without graphics drivers, and also in Virtual Machines (VMWare) ?

"Skybuck Flying" wrote in message
b.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

  #19  
Old July 17th 11, 09:29 PM posted to alt.comp.lang.borland-delphi,alt.comp.periphs.videocards.nvidia,comp.arch,comp.graphics.api.opengl,microsoft.public.windows.64bit.general
fungus
external usenet poster
 
Posts: 17
Default 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.

  #20  
Old July 18th 11, 02:14 AM posted to alt.comp.lang.borland-delphi,alt.comp.periphs.videocards.nvidia,comp.arch,comp.graphics.api.opengl,microsoft.public.windows.64bit.general
Quadibloc
external usenet poster
 
Posts: 47
Default OpenGL works slow without graphics drivers, and also in VirtualMachines (VMWare) ?

On Jul 17, 11:06*am, "David" wrote:
"Skybuck Flying" *wrote in message
b.home.nl...

What makes you believe that the documentation will help me ?


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


His comment would be _more_ hilarious if the documentation that came
with video cards these days said anything more than "avoid static
electricity when you plug it in".

It is true that, as I noted in my post, some basic understanding of
what OpenGL is and does would clear up the problem. And, if one knows
where to look online, there is a lot of information about OpenGL,
including documentation by the open-source project behind it.

But if one is looking *there*, there is quite a wealth of material
available, and without the basic understanding needed to know *where
to begin looking*, it's entirely possible he would fail to be helped
for another reason.

John Savard
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need OPENGL drivers for an "ATI Rage 128 VR AGP" graphics card Mc Spooney Ati Videocards 2 September 22nd 05 12:03 AM
Question about virtual machines--Apple on Intel [email protected] General 4 June 9th 05 03:06 AM
Radeon 9700: OpenGL crashes, DirectX works Peter Ati Videocards 0 January 29th 05 04:41 PM
EVIL Matrox Graphics Inc , STEALS MGA Settings/VIRTUAL DESKTOPfrom Windows 98, 2000 etc CJT Intel 3 January 3rd 05 06:37 AM
64 bit OpenGL fix for the new beta drivers Augie @64bit Ati Videocards 0 May 26th 04 08:39 AM


All times are GMT +1. The time now is 07:35 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2004-2018 ComputerBanter.com.
The comments are property of their posters.