Ext & VAR ?

hi all,

the original post is in unix forum. let’s see where it gonna be threated !!
i’m not an expert, nor an advanced opengl programmer. but i hope this will help me choose my way.

i use nvidia, and i wonder (i’ve seen it around) what are the difference btw these & which one is best ?
Vertex Array Range 1&2, Vertex Programm, and Compute Vertex Array.
i think that it’s var the best as many are using it, but it’s maybe because it’s the more easier…

what are the advantages ? what are the advantages to use texture extension too ?

at the end, opengl is transformed to openglext, isn’t it ?

thank you all for the friendly.

what are the difference btw these & which one is best ?
Vertex Array Range 1&2, Vertex Programm, and Compute Vertex Array.

VAR are for storing geometry (vertexes) in the video card memory, in order not to have to send them to the 3d card each time we use it. The difference between 1 and 2 is that the first version can give some (performance/graphic) problems when enabled while using classic VA. Huge performance improvement in most of the cases.

CAV are used to says to the graphic card: “This VA will not be altered, but will be used many time, so keep it in your cache”. Give some performanece improvement only for quite small arrays.

Vertex program are small asm-like program to make special effects. This has nothing in common with the previous extensions.

yeh thanks a lot !!

so VAR2 is best as VAR1 because it’s less problematic when using huge scenes (if i understood well).

So; if i have around 20000 faces for an object, i could use CVA to improve my scene, or is it limited to some maximum faces ? all my vertices are just static (i prefer).

more, i think it depends on your hardware. i have a geforce 2 mx with 32Mo DDR in AGP (well, in PCI for now). so if I have AGP, i could use these extensions to improve my renderer ?

i may be a little bit too much curious as it’s an advanced post as it’s seems…

If I remember correctly, VAR2 just adds 1 additional enumerant to the original VAR spec that avoids a flush when disabling VAR (useful when you want to use VAR and other rendering paths together).

As far as CVA goes, there is no ‘maximum faces limit’. Every call to glLockArrays will succeed, but the driver is free to do whatever it wants. So if you ask 20000 triangles to be locked, the driver can very well ignore the lock and fall back to regular VA. It’s your job to find out what is the best number of vertices to lock at once (hint : this varies from one graphics card to another, and possibly from one driver version to another ).

If your vertices are static, why not use a display list? It is likely to be the fastest path on most hardware (ok, you can get better results with VAR, but still display lists are way easier to use, and are a core feature of OpenGL ).

[This message has been edited by kehziah (edited 05-16-2002).]

thanks a lot ! But it’s a little bit hard for me now. just wait and see.
But if I could get more performance with
©VA, i think i’d have to use this way.

Anyway, even if my vertices are static, i want to use more powerful (or at least quickest) ways to render. So, i think i could increase well the framerate of my rendering.
So, i think i will use VAR2 (because some of my graphics are still display list), and maybe change it to VAR when it’s been all transformed.
When you say that CVA is good for static datas, i don’t see very well why. As all the memory allocated are done just once for all the application. So, (i think in fact), that they stay in the graphic memory, as well if i were using CVA. (hope that i’m understandable) because CVA stocks the data in a place in the VRAM and VAR do the same as i don’t change a lot my graphisms.

Now, is it important, when using ©VA®(2)
, to use texture fonctionnalities with extensions (as we can see it’s possible when typing glxinfo) ?

Anyway thanx you a lot and hope this help not just me.

My order of preference would be:
*cva: in most of my test, no performance improvement. This gives result only for small, well ordered arrays.

thanx !

hé ! do you think that it’s the same both for Windows & Linux ? (i supposed it is).

Sure. I’m coding mainly under Linux, by the way.


but if i’m not wrong , i could not use the glx under windows . it sounds it’s wgl.
as the agp too. it’s different i think.

Ok, renaming glxfunction to wglfnction is not a big deal.
When you are looking for a function, you are asking for the function named “glXsomething” right?
So just make a macro looking like:
#ifdef linux
#define pre “wgl”
#define pre “glX”

#define FUNC_NAME(s) pre s

and in your program, askopengl for the function named FUNC_NAME(“something”)