Hi,
I use opengl to draw surfaces. I use
glBegin(GL_POLYGON) ,..... and use it to draw meshes in the order of 2000 *
2000.

But it goes very slow when my arrays are in this order.

Is there any way to speed it up ?



Thanks a lot,

Behzad

Re: opengl so slow with large meshes by WTH

WTH
Sat Sep 23 09:42:25 CDT 2006

Behzad <b@y.c> loquated like no one had ever loquated before with:

> Hi,
> I use opengl to draw surfaces. I use
> glBegin(GL_POLYGON) ,..... and use it to draw meshes in the order of
> 2000 * 2000.
>
> But it goes very slow when my arrays are in this order.
>
> Is there any way to speed it up ?
>
>
>
> Thanks a lot,
>
> Behzad

Have you looked at display lists and/or vertex buffers? (Is your data
relatively static?)

It isn't likely that OpenGL is slow, it is likely because you are handing it
the same data over and over again rather than telling OpenGL to draw the
same thing it did last time (unless of course you're chaning things.)

Plus, aren't you in the wrong ng? ;)

WTH

--
"A game of football is never a nuisance" - Gérard Houllier



Re: opengl so slow with large meshes by legalize+jeeves

legalize+jeeves
Sat Sep 23 11:58:26 CDT 2006

[Please do not mail me a copy of your followup]

"Behzad" <b@y.c> spake the secret code
<#7Keuwx3GHA.600@TK2MSFTNGP05.phx.gbl> thusly:

>I use opengl to draw surfaces. [...]

You should ask in an OpenGL newsgroup; this newsgroup is for DirectX.

Try comp.graphics.api.opengl
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://www.xmission.com/~legalize/book/download/index.html>
Pilgrimage 2006, Saturday September 23rd: <http://pilgrimage.scene.org>
North America's Longest Running Demoparty

Re: opengl so slow with large meshes by Andrew

Andrew
Sun Sep 24 03:46:48 CDT 2006

Use glDrawArrays.

"Behzad" <b@y.c> wrote in message
news:%237Keuwx3GHA.600@TK2MSFTNGP05.phx.gbl...
> Hi,
> I use opengl to draw surfaces. I use
> glBegin(GL_POLYGON) ,..... and use it to draw meshes in the order of 2000
> * 2000.
>
> But it goes very slow when my arrays are in this order.
>
> Is there any way to speed it up ?



Re: opengl so slow with large meshes by Behzad

Behzad
Mon Sep 25 16:33:13 CDT 2006


Hi,
Thank for your reply.

It is mainly slow on its 1st run drawing. It's much better when I redraw it.

The main problem is from
" glEndList() " that takes 5 6 seconds to run.
Thanks,

Behzad




"WTH" <spamsucks@Ih8it.com> wrote in message
news:lJbRg.8974$zF5.6702@bignews1.bellsouth.net...
> Behzad <b@y.c> loquated like no one had ever loquated before with:
>
>> Hi,
>> I use opengl to draw surfaces. I use
>> glBegin(GL_POLYGON) ,..... and use it to draw meshes in the order of
>> 2000 * 2000.
>>
>> But it goes very slow when my arrays are in this order.
>>
>> Is there any way to speed it up ?
>>
>>
>>
>> Thanks a lot,
>>
>> Behzad
>
> Have you looked at display lists and/or vertex buffers? (Is your data
> relatively static?)
>
> It isn't likely that OpenGL is slow, it is likely because you are handing
> it the same data over and over again rather than telling OpenGL to draw
> the same thing it did last time (unless of course you're chaning things.)
>
> Plus, aren't you in the wrong ng? ;)
>
> WTH
>
> --
> "A game of football is never a nuisance" - Gérard Houllier
>
>



Re: opengl so slow with large meshes by WTH

WTH
Tue Sep 26 07:25:24 CDT 2006


Behzad <b@y.c> loquated like no one had ever loquated before with:

> Hi,
> Thank for your reply.
>
> It is mainly slow on its 1st run drawing. It's much better when I
> redraw it.
> The main problem is from
> " glEndList() " that takes 5 6 seconds to run.
> Thanks,
>
> Behzad

That's the way display lists work. When you call glEndList the list is
compiled and associated with the list name and depending upon the driver
potentially many optimizations then occur (related to location usually)
which take a few seconds to run.

After that you have a compiled display list which should run relatively
fast.

You should try vertex arrays next (it is good experience to learn how to use
them in addition to display lists.)

You really need to move this to the comp.graphics.api.opengl newsgroup.

WTH

--
"I'm not prejudiced you know. I'll support anyone ... I dont' care who
beats Manchester United." - Ken Dodd