Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: VAR parameter question

Hybrid View

  1. #1
    Intern Contributor
    Join Date
    Sep 2000
    Posts
    69

    VAR parameter question

    Hello there,

    coding some VAR stuff and it does not seem to work. Ok, can anyone give me a hint with the exact initialization sequence? The one I'm using and does not work as expected is:

    bigarray=wglAllocateMemoryNV(BUFFERSIZE*NUMBUFFERS ,0,0,1);
    glVertexArrayRangeNV(BUFFERSIZE*NUMBUFFERS,bigarra y);
    glEnableClientState(GL_VERTEX_ARRAY_RANGE_NV);
    glEnableClientState(GL_VERTEX_ARRAY);
    glEnableClientState(GL_COLOR_ARRAY);
    // I use only vertex and color

    For some unknown reason the only way to get decent performance is to change the second line to something like:

    glVertexArrayRangeNV(8000000,bigarray);

    Notice that, even with this change (BUFFERSIZE*NUMBUFFERS is << 8M), performance is around 2Mtris/sec on a 1.3Ghz Athlon with a GF3

    As for painting, I more or less do:

    if (!glTestFenceNV.....)
    glFinishFence(....)

    // here I initialize the data arrays
    glVertexPointer(3, GL_FLOAT, 6*sizeof(float),v);
    glColorPointer(3, GL_FLOAT, 6*sizeof(float),v+3);
    glDrawArrays(...)

    glSetFence(...)

    Ok, I know I could use strips, or maybe even indexed stuff, but that's not the point really, as I need ot render stuff this way: isn't 2Mtris just too low even for regular arrays?

    cheers

  2. #2
    Intern Contributor
    Join Date
    Aug 2002
    Posts
    88

    Re: VAR parameter question

    have you tried dropping priority to 0.5?
    you are allocating in video memory, not AGP, if you set priority = 1.

    if you are going to write to the arrays every frame, put them in AGP memory. also, copy ALL the vertices in in one large chunk - write the WHOLE VAR range at once. else it will be SLOOOOOW.


    [This message has been edited by vshader (edited 09-19-2002).]

  3. #3
    Intern Contributor
    Join Date
    Sep 2000
    Posts
    69

    Re: VAR parameter question

    Ok, so now comes the fun part: I'm trying to get this to work on a laptop as well as on a desktop... laptop sports a GF4MX, so the extension is there.. Still, if I try to lower to 0.5 the call fails... why?

    have you tried dropping priority to 0.5?
    you are allocating in video memory, not AGP, if you set priority = 1.

    if you are going to write to the arrays every frame, put them in AGP memory. also, copy ALL the vertices in in one large chunk - write the WHOLE VAR range at once. else it will be SLOOOOOW.


    [This message has been edited by vshader (edited 09-19-2002).]
    [/QUOTE]

  4. #4
    Intern Contributor
    Join Date
    Aug 2002
    Posts
    88

    Re: VAR parameter question

    Originally posted by aphex:
    Still, if I try to lower to 0.5 the call fails... why?
    ]
    AGP support is busted?

    look in the driver nvidia properties (under advanced on the settings page). does it say AGP? if it says PCI or AGP(PCI mode) then AGP has a problem.

  5. #5
    Intern Contributor
    Join Date
    Sep 2000
    Posts
    69

    Re: VAR parameter question

    You're right again... no AGP on this little buster. Dell's page (inspiron 8200 with a Gf4 440 Go) says it's AGP4x compliant but i can't find any switch in the bios and it does say AGP(PCI mode).

    Originally posted by vshader:
    AGP support is busted?

    look in the driver nvidia properties (under advanced on the settings page). does it say AGP? if it says PCI or AGP(PCI mode) then AGP has a problem.


  6. #6
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    2,704

    Re: VAR parameter question

    You need new drivers; probably chip set drivers. If Dell's download site doesn't have it, try the Intel web site; I think that Dell has an i830 in it (though I'm not sure).

    Also, if Dell has a graphics driver update, install that, too.
    "If you can't afford to do something right,
    you'd better make sure you can afford to do it wrong!"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •