Results 1 to 2 of 2

Thread: OpenGL defines

  1. #1
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default OpenGL defines

    In the stencil example, I had to add:

    Code:
    	if (glClampColor)
    	{
    #ifdef GL_CLAMP_READ_COLOR
    		glClampColor(GL_CLAMP_READ_COLOR, GL_FALSE);
    #else
    		glClampColor(clan::GL_CLAMP_READ_COLOR, GL_FALSE);
    #endif
    }

    This is because Linux #defines GL_CLAMP_READ_COLOR, and windows does not

    Note, if the stencil example uses the clan namespace, this would not be required.

    Solution for this hack....
    1) Change the example to use the clan namespace (via the using namespace directive)
    2) Change ClanLib\Sources\API\GL\opengl_defines.h to #undef all opengl defines
    3) Change GL_ prefix to CL_
    4) Change the enum to #define
    5) Ignore the problem

    I vote, in order of preference 5, 1, 2
    I am not even voting for 2 and 3, I shudder even thinking about it.

  2. #2

    Default

    I do not know if it's important but another file that uses the constant is
    Code:
    Sources/GL/GL3/gl3_graphic_context_provider.cpp:454

Similar Threads

  1. OpenGL 4.3
    By rombust in forum Official ClanLib SDK Forums
    Replies: 3
    Last Post: 08-11-2012, 07:15 PM
  2. Updated the OpenGL defines to the 3.3 specification
    By rombust in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 03-30-2010, 09:36 AM
  3. OpenGL ES?
    By NovaLaw in forum Official ClanLib SDK Forums
    Replies: 3
    Last Post: 10-19-2009, 07:20 PM
  4. OpenGL 2.0
    By madmark in forum Official ClanLib SDK Forums
    Replies: 5
    Last Post: 06-17-2009, 04:21 PM
  5. SDL V's OPENGL
    By babyvegas in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 07-30-2008, 10:07 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •