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

Thread: 128X128 texture causes CRASH!

  1. #1
    Junior Member Regular Contributor
    Join Date
    Oct 2000
    Location
    Donetsk,Ukraine
    Posts
    120

    128X128 texture causes CRASH!

    Hi
    I use NVidia Riva 128 card.
    When I call glTexImage2D(GL_TEXTURE_2D, 0, 4, 128, 128, 0, GL_RGBA, GL_UNSIGNED_BYTE, PPBits^);
    It crashes in NV3OGL.DLL - access violation,read. In Software it crashes too.
    But OpenGL says about 1024 when I do glGet(GL_MAX_TEXTURE_SIZE).
    When I call it with 128X64 size all is ok(and even fast).
    Cant I determine real Max texture size without crash?

    Randy

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Apr 2000
    Posts
    748

    Re: 128X128 texture causes CRASH!

    I can't believe a such bug could exist in a driver for a such card and never been reported before. IMO you are doing something wrong. Check out the pointer to the texture pixels you're passing in arguments.

    Y.

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Sep 2000
    Location
    Santa Clara, CA
    Posts
    1,463

    Re: 128X128 texture causes CRASH!

    Well, this is the RIVA 128 we're talking about now.

    But no, we should easily be able to handle a 128x128 image, I would think...

    - Matt

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    3,115

    Re: 128X128 texture causes CRASH!

    Maybe you have't allocated enough memory for your image, and the driver tries to read outside the allocated space, causing an access violation.

  5. #5
    Senior Member OpenGL Guru Humus's Avatar
    Join Date
    Mar 2000
    Location
    Stockholm, Sweden
    Posts
    2,444

    Re: 128X128 texture causes CRASH!

    Even though this shouldn't cause a crasch I'd suggest that you replace that "4" with your internal format of choise (for example RGB8).

  6. #6
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,797

    Re: 128X128 texture causes CRASH!

    In my experience, crashes are most likely the result of accessing memory that you shouldn't be accessing. Like going over the bounds on a dynamically created array. You should definitely take Bob's advice and check that you have memory allocated for the pointer you're passing in.

    ***edit note***
    Oops.. meant to say crashes are the "result" not the "cause"

    [This message has been edited by Deiussum (edited 01-16-2001).]
    Deiussum
    Software Engineer and OpenGL enthusiast

  7. #7
    Junior Member Regular Contributor
    Join Date
    Oct 2000
    Location
    Donetsk,Ukraine
    Posts
    120

    Re: 128X128 texture causes CRASH!

    Fixed. I passed invalid pointer. It was working only when texture was resized.
    BTW Riva 128 can render 1024X1024 - with 5.83 fps.(when changing texture each time).

    Randy

    P.S Indirect3D is alife! I've written its concepts at www.geocities.com/udodenko/ind3d.html

    P.P.S Is anybody interested in writting his own 3D file manager visualization? We've implemented 3d filemanager core, so if somebody needs...

    [This message has been edited by RandyU (edited 01-16-2001).]

Posting Permissions

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