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 4 of 4

Thread: Weird CVA Problem

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2002
    Location
    Las Vegas, NV, USA
    Posts
    9

    Weird CVA Problem

    I've discovered some weird behavior coming from the combined use of glLock/UnlockArraysEXT and glDrawElements.

    First of all, let me point out that this is happening on a Voodoo 3 on an XP machine (it's the only video card I have available at work), and I understand these drivers aren't even supported or anything, but I'm just wondering if anyone else has encountered this and has any better solutions.

    What's happening is when I use glLockArraysEXT to lock my arrays, and then use glDrawElements, my program crashes out with an access violation.

    It does _NOT_ crash if:
    - I call glDrawElements without calling glLockArraysEXT first.
    - I replace the GL_TRIANGLES in the glDrawElements call with GL_POINTS.
    - When I loop through the indexes manually and do glArrayElement for each one (with GL_TRIANGLES).

    Here's the really weird thing: I noticed that it seems to have something to do with calling glClear. If I re-enable my arrays (glEnableClientState) after each time I clear the buffers, it doesn't crash. I don't see that as a very elegant solution, though.

    Any information would be helpful.


    Nathan Ostgard

  2. #2
    Junior Member Newbie
    Join Date
    Dec 2002
    Location
    Las Vegas, NV, USA
    Posts
    9

    Re: Weird CVA Problem

    In case anyone else has this problem, I found that setting a maximum of 3034 vertexes in my array seems to prevent it from crashing.

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

    Re: Weird CVA Problem

    There's probably a "fast path" in the drivers which bombs out if you give it too many vertices at the same time. Or if you give it bad data (i e, you try to lock fewer vertices than you then actually use).
    "If you can't afford to do something right,
    you'd better make sure you can afford to do it wrong!"

  4. #4
    Junior Member Newbie
    Join Date
    Dec 2002
    Location
    Las Vegas, NV, USA
    Posts
    9

    Re: Weird CVA Problem

    Yeah, that's what it looks like. It has to be bombing because of the number of vertexes... I know I'm not using more than I'm locking, and it stops working as soon as I increase the allowable amount to 3035.

    It's such a weird number, though...

Posting Permissions

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