OpenGL 2.1 manual sources are integrated... (Khronos) has made the OpenGL 2.1 docbook source files available, so the PyOpenGL 3.x documentation can now cover up to OpenGL 2.1 (and when 3.0 docs are out adding that should be relatively trivial).  I've also updated the OpenGLContext shaderobject test/demo to use a new feature in OpenGL.extensions which allows you to create functions with "alternative" implementations.  Here's what it looks like:
from OpenGL.GL import *
from OpenGL.GL.ARB.shader_objects import *
from OpenGL.GL.ARB.fragment_shader import *
from OpenGL.GL.ARB.vertex_shader import *
from OpenGL.extensions import alternate

glCreateShader = alternate( 'glCreateShader', glCreateShader, glCreateShaderObjectARB )
glShaderSource = alternate( 'glShaderSource', glShaderSource, glShaderSourceARB)
glCompileShader = alternate( 'glCompileShader', glCompileShader, glCompileShaderARB)
glCreateProgram = alternate( 'glCreateProgram', glCreateProgram, glCreateProgramObjectARB)
glAttachShader = alternate( 'glAttachShader', glAttachShader,glAttachObjectARB )
glValidateProgram = alternate( 'glValidateProgram',glValidateProgram,glValidateProgramARB )
glLinkProgram = alternate( 'glLinkProgram',glLinkProgram,glLinkProgramARB )
glDeleteShader = alternate( 'glDeleteShader', glDeleteShader,glDeleteObjectARB )
glUseProgram = alternate('glUseProgram',glUseProgram,glUseProgramObjectARB )

Here we're creating alternate entry points for the standard-in-2.0 ARB shader extension.  In theory this could cause issues if e.g. enum constants were to change between an extension and the standard implementation, but I don't think that happens very often.

Also integrated a number of contributed NeHe conversions into the PyOpenGL Demo.


  1. Izuver Ivan

    Izuver Ivan on 09/16/2008 7:42 p.m. #

    fix link ti "PyOpenGL 3.x documentation ", now its looks like file:///home/mcfletch/OpenGL-dev/directdocs/manual-3.0/index.xhtml

  2. Mike Fletcher

    Mike Fletcher on 09/16/2008 10:52 p.m. #

    Sorry about that, should be fixed now.

Comments are closed.


Pingbacks are closed.