Results 1 to 6 of 6

Thread: glTexImage3D crashing

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2005
    Posts
    17

    glTexImage3D crashing

    Not sure why but my program crashes when I try to use the glTexImage3D function.

    Code :
     //Load the volume texture into the gfx card
        glTexImage3D(GL_TEXTURE_3D,
    		 0,
    		 GL_RGBA,
    		 getWidth(),
    		 getHeight(),
    		 getDepth(),
    		 0,
    		 GL_RGBA,
    		 GL_UNSIGNED_BYTE,
    		 mv_pGradientNScalar);
    When it gets to hear it gives me a memory violation error. (mv_pGradietnNScalar is manually generated with 4 components)

    This is running on ATI X700, any ideas?

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Jan 2003
    Location
    Virginia
    Posts
    586

    Re: glTexImage3D crashing

    What are the dimensions of the texture? And how much memory does the ATI X700 have? And how much physical memory and swap/virual memory do you have?

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2005
    Posts
    17

    Re: glTexImage3D crashing

    Hi,

    the texture is fairly small, 64x64x8
    the x700 is 256MB and 1G of RAM in the system.

    I dont think i'm going over my memory limits here but any ideas greatly appreciated

  4. #4
    Guest

    Re: glTexImage3D crashing

    The memory violation error is most likely due to the mv_pGradietnNScalar array being too small. The driver tried to read it past the end.

    How do you create/malloc it ? what values are returned by getWidth(),
    getHeight(),
    getDepth(), ?

  5. #5
    Junior Member Newbie
    Join Date
    Feb 2005
    Posts
    17

    Re: glTexImage3D crashing

    Fixed the problem now, thx for the help, it turns out that it wasnt linking properly to the functions so doing it manually fixed it.

    i.e..
    Code :
    glTexImage3D=(PFNGLTEXIMAGE3DEXTPROC)wglGetProcAddress("glTexImage3D");

  6. #6
    Guest

    Re: glTexImage3D crashing

    Use glew
    it will get all the function pointers for you and it's up to date.

    glew.sourceforge.com

Similar Threads

  1. Problem with glTexImage3D
    By The Lily in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-06-2012, 02:34 PM
  2. Out of memory with glTexImage3D
    By gsvLgnepo in forum OpenGL: Advanced Coding
    Replies: 8
    Last Post: 02-03-2011, 07:28 AM
  3. how to use glTexImage3D???
    By MichaelDing in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 02-17-2003, 03:11 PM
  4. how to use glTexImage3D???
    By MichaelDing in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 02-17-2003, 08:28 AM
  5. glTexImage3d
    By kpestka in forum OpenGL: User Software
    Replies: 0
    Last Post: 12-22-2001, 06:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean