Results 1 to 2 of 2

Thread: Extensions wrapper...

  1. #1
    Member Contributor
    Join Date
    Jun 2001
    Posts
    74

    Extensions wrapper...

    Morning,

    Has anyone got any suggestions for an extension system wrapper class?

    i was messing around last night and got a quick solution but i'm not happy with it.

    basically it was (used in conjunction with my singleton code) (not actually called X )

    class X
    {
    X{}
    ~X{}
    bool IsExtensionAvailable(const char *pExtension)

    void ResolveExtensionFuncPtrs(void)
    LockFuncPtr GetLockArraysEXTFunc(void)
    UnLockFuncPtr GetUnlockArraysEXTFunc(void)
    }

    as you can see not very nice (and totally specific to the GL_EXT_compiled_vertex_array extension - but this is just an example)

    Since the pointers are function pointers is it still considered poor coding practice to have globals?

    Anybody have any ideas for a generic / tidier implementation?

    Cheers,

    Allan

  2. #2
    Member Contributor
    Join Date
    Jun 2001
    Posts
    74

    Re: Extensions wrapper...

    Should have added that class X contained:

    LockFuncPtr m_LockFuncPtr;
    UnlockFuncPtr m_UnlockFuncPtr;

    which are returned by the appropriate functions...

    LockFuncPtr / UnlockFuncPtr are the typedefs in glext.h for the GL_EXT_compiled_vertex_array extension...

    Cheers

Similar Threads

  1. I need a C# wrapper
    By A_COOL_NOOB in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 12-25-2015, 03:31 AM
  2. Cg wrapper?
    By chuuwang in forum OpenGL ES
    Replies: 0
    Last Post: 03-04-2010, 11:58 PM
  3. C++ wrapper?
    By David Doria in forum OpenGL: General
    Replies: 3
    Last Post: 09-15-2008, 01:46 AM
  4. Looking for an OpenGL Wrapper.
    By Vozy in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 04-11-2005, 01:12 PM
  5. C++ Wrapper class for GLX
    By arjenw in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-02-2004, 10:59 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