Re: Display problems in Vista



On Oct 11, 10:34 pm, "John A. Byerly" <jbye...@xxxxxxxxxxxxxxxxxx>
wrote:
But how much computational time is eaten up by telling the system to draw a
red line, 1 pixel wide, from point A to point B?

Not much, processing overhead for a glDrawArrays, glDrawElements and
similar is in class of thousands of clock cycles (not millions, unless
updating something).

Example:

glDrawArrays(...)

If you are using VBO, and you should, this mostly chooses which VBO's
to use (enabled arrays) and creates a packed of data into the command
buffer. Very small overhead. If the data is in GPU local memory, only
the command packet needs to be transfered. If your render states
changed a lot since previous drawing call, this invokes setting
command packet describing the register writes required to implement
the state changes in the render context.

This should amount to the "class of thousands of clock cycles", the
range jumps into millions when you are transfering large amounts of
actual vertex data across the bus. Try to avoid it.

The small overhead adds up quickly. If you really do a draw command
per primitive, you're doing things wrong.


That is what I do, times
10 million. That is my static image. My dynamic image is slightly more
complicated, but not much. I don't use, nor need, shading, lighting,
blending, or fog.

Granted. To me, the question is whether I need all of that powerful
graphics hardware.

For drawing graphics that is usually a good aproach. :)



Does "one draw command" equal one glBegin/glEnd pair?

Yes. If you do that *per line*, no wonder the performance is bad.
GeForce 8800 GTS for example is able to draw tens of millions of lines
at 100+ frames per second. I shit you not.

If you get 10 fps with only few million of lines, you are something
close to 50 times too slow from what this hardware for example could
do.

You might be interested to know about "shaders"; the OpenGL has
extensions for nVidia hardware to generate primitives inside the
graphics processor. The graphics processors these days are
programmable, if you can afford to target for OpenGL 2.0 or 2.1, you
can use this functionality. I don't go in too much detail because I
don't know if you are interested at all.


If so, I am doing
that as much as I can. The lines describing the image are fed to the
viewport and cached in a model class. When the image is completely loaded,
the whole model is displayed in the viewport. That is my static image.

OK; so the static data doesn't change, only the view into the data
changes (eg. you can pan, zoom, rotate etc.) This can be encoded into
4x4 MVP matrix so that part is alright.

I am using display lists. The performance is just too choppy if I don't. I
investigated using vertex arrays, but I can't, due to the information I am
trying to display. To give you an idea of the problem, in some cases, I
have to display a line that is x pixels wide at any zoom level.
I can't
simply store the vertices I use for the thick line (which for the 3D view is
actually a square tube).
To make matters worse, for some parts of the
dynamic display the thickness of the line must be insensitive to zoom, but
in other places it must vary with the zoom. Display lists don't help with
this, but seem to be the best solution for all other issues.

What primitives are you currently using? GL_LINE*, or GL_TRIANGLES..
or..? I don't understand the problem from your description because
what you are doing sounds straightforward. The biggest issue from
technical side is that you might exceed the performance suggestion
limits for number of vertices, but it isn't the critical detail sounds
like you have more serious problems somewhere if 2-4 M lines is ~10
fps.

.



Relevant Pages

  • Re: Anyone remember DOS?
    ... Trying to see if anyone knows the command I'm looking for without ... and *) can be used to specify groups of files. ... When you use the DIR command, it will display all files that match the ... To display only files with the .TXT filename extension on the current ...
    (rec.music.artists.springsteen)
  • Re: using the command prompt
    ... Is there a tutorial on using the command prompt to complete ... That will display a list of all ... CD Change Directory - move to a specific Folder. ... DSACLs Active Directory ACLs ...
    (microsoft.public.windowsxp.general)
  • Re: Read Only / Thanks Keith.
    ... >'attrib' without any parameters will display a directory ... >The full syntax of the command follows (pasted from Help ... Used without parameters, attrib displays ... xcopy command uses archive attributes. ...
    (microsoft.public.windowsxp.general)
  • Problem linking two list boxes
    ... mode, but Access does not allow this, so I have an unbound form with two ... I want to display data in the second list box which is filtered from the ... query using the common field. ... I have a command button on the form that launches a separate modal ...
    (microsoft.public.access.formscoding)
  • Re: Need WMI script
    ... Dim strDomainName, strNodeText, strXmlBuilder ... ' Retrieve values and display. ... However, if you use the cscript host, ... you can use a command similar to below at a command prompt: ...
    (microsoft.public.windows.server.scripting)