Results 1 to 4 of 4

Thread: extensions

  1. #1
    Guest

    extensions

    how do I use extensions, do I have to download something else or no?

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: extensions

    Depends on what platform you are coding for, but generaly, no, you don't have to download anything, except a document or two that explains how to use the extension if you want them. Tell me whan platform you are using and maybe i can tell you how.

  3. #3
    Guest

    Re: extensions

    I am working on all platforms actually, that is except macintosh, but mainly on wnt4

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: extensions

    In Win32 version of gl.h there are some macros defined (almost in the bottom of the file) called PFN*PROC, these macros defines a functionpointer you can use to access extensions. An example:

    PFNGLARRAYELEMENTEXTPROC glArrayElementPtr;
    glArrayElementPtr=(PFNGLARRAYELEMENTEXTPROC)wglGet ProcAddress("glArrayElementEXT");

    Then you have to check if we got a proper poiner, like this:
    if(!glArrayElementPtr) exit(1)

    If this passed, you can now use your extension like this:
    (*glArrayElementPtr)(i);
    Maybe even like a standar function too, not sure, glArrayElementPtr(i);

    You have to check out your copy of gl.h to see what extensions are predefined. If you are looking for other extensions, just have alook at the extension registry ( http://oss.sgi.com/projects/ogl-sample/registry/ ) and look at the extesion you want. There you can find the exact prototype of all extension aswell as a description of them.

    Using extesion under UNIX is nothing I know about, but keep on asking and you will get an answer.

Similar Threads

  1. Extensions in Mac OS/Qt
    By Nychold in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 09-18-2006, 10:56 AM
  2. ATI Extensions
    By xeropunk63 in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 10-05-2003, 03:45 PM
  3. Using Extensions
    By imported_Anders in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 02-11-2002, 12:52 PM
  4. extensions
    By qwert in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 08-29-2001, 04:40 AM
  5. How to use extensions ?
    By Antoche in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-25-2000, 12:26 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