Having problems with OpenGL and extensions.

This is a discussion on Having problems with OpenGL and extensions. within the Game Programming forums, part of the General Programming Boards category; I'm trying to do an example with Buffer objects which were intdocued in 1.5, meaning I have to access them ...

  1. #1
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901

    Having problems with OpenGL and extensions.

    I'm trying to do an example with Buffer objects which were intdocued in 1.5, meaning I have to access them with extensions. I am using the glew library and it says I have support for opengl 20. Whenever I try to call glGenBuffers() it just doesn't work. After I call glIsBuffer() on the GLuint I passed to glGenBuffers() it doesn't come out at all. Do I have to do something else with the extension to get it to work? I tried to check to see if it was supported but can't seem to find it in the mass of enumerated variables for the extensions.

  2. #2
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,070
    Make sure your GLuint is a pointer passed by reference (that is what it's called, right? ie glGenBuffers(1, &myBuffer)) to glGenBuffers. You could also try using glGenBuffersARB(), just in case. Although I'm pretty sure GLEW should be getting the 1.5 version.
    Memorial University of Newfoundland
    Computer Science

    Mac and OpenGL evangelist.

  3. #3
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    I did that, I called it like
    Code:
        GLuint buffer;
        glGenBuffers(1, &buffer);
    
        if(glIsBuffer(buffer) != GL_TRUE)
        {
            std::cout << "buffer did not initiate" << std::endl;
            glfwTerminate();
            return 1;
        }
    Do I have to enable something first?

    edit: I also tried glGenBuffersARB with no avail.

    Do I have to do any of the function pointer stuff with glew?
    Last edited by indigo0086; 08-19-2007 at 07:20 AM.

  4. #4
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,070
    Nope, GLEW should handle the function pointer stuff. The only thing you have to make sure you do is call glewInit().

    If GLEW wasn't getting the function properly, you'd probably be crashing with an access violation.

    What graphics card is this running on?
    Memorial University of Newfoundland
    Computer Science

    Mac and OpenGL evangelist.

  5. #5
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    Radeon x1950 Pro. Though I'm not using catalyst drivers, as they render all my opengl Applications useless (they crash while OS gets the window context). I'm using the Omega Drivers. They've since released 7.8, but I don't even want to go through the hasstle as I've been over tech support over a week and they were useless. I can skip over the buffer example, but I just am worried how other extensions will be handled when I meet them.
    Last edited by indigo0086; 08-19-2007 at 10:36 AM.

  6. #6
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    Ahh, I need to read more carefully, glIsBuffer returns true if buffer object has been bound.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OpenGL Quesiton: Does Windows XP, Vista still at OpenGL 1.1?
    By indigo0086 in forum Game Programming
    Replies: 8
    Last Post: 05-21-2007, 12:18 PM
  2. Choosing a compiler
    By pushingsquares in forum Game Programming
    Replies: 27
    Last Post: 12-14-2006, 10:33 AM
  3. so many open gl extensions...
    By Raven Arkadon in forum Game Programming
    Replies: 15
    Last Post: 08-25-2006, 03:28 PM
  4. Graphics Programming :: Approach and Books
    By kuphryn in forum Windows Programming
    Replies: 4
    Last Post: 05-11-2004, 09:33 PM
  5. OpenGL .dll vs video card dll
    By Silvercord in forum Game Programming
    Replies: 14
    Last Post: 02-12-2003, 07:57 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21