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

Thread: gluBuild2DMipmaps

  1. #1
    Intern Newbie
    Join Date
    May 2000
    Location
    Mesa, Arizona USA
    Posts
    30

    gluBuild2DMipmaps

    I've used gluBuild2DMipmaps successfully numerous times in the past, but I've run into something I've never seen before. I've always mipmapped with 256x256 textures (Voodoo3...) and had no problems. But because of some tesselation requirments of my geometry, I've recently had to pre-tesselate some of my images and pass gluBuild2DMipmaps textures which are 128x128 or 64x64 pixels. The 256x256 work with no problem, but the smaller ones cause an immediate Access Violation at address...in module 'GLU32.DLL'...

    I am running on Windows 2000 (yea... I know...) and developing with Borland CBuilder 5.0.

    If it helps is a snippet of code (verbatim):

    BYTE* rgba=(BYTE*)GI->Image->ScanLine[0];
    glBindTexture(GL_TEXTURE_2D,TextureNames[i]);
    int Failure = gluBuild2DMipmaps (GL_TEXTURE_2D,4,GI->Image->Width,GI->Image->Height,GL_RGBA,GL_UNSIGNED_BYTE,rgba);

    Any suggestions?
    Thanks in advance!

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

    Re: gluBuild2DMipmaps

    Put a breakpoint on the call that crashes, and double-check (and triple-check) that the values you are passing in are indeed correct.
    "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
  •