Difficulty with the shaders tutorial

Derakon <[email protected]>
Newsgroups gmane.comp.python.opengl.user
Message-ID <CA+Qo5j7iHHpjYxxFhoYxXmv51EYZri=ckQx8m+tgHvULO5QN+Q@mail.gmail.com>
I'm trying to figure out OpenGL 3. Well, really I'm trying to figure
out fragment shaders so I can do a false-color filter for my
monochrome camera displays, but the fragment shader tutorial is also
an OpenGL 3 tutorial, so it's off the deep end I go. I took a look at
the shaders tutorial:
http://pyopengl.sourceforge.net/context/tutorials/shader_1.xhtml

The first problem I run into is literally a context problem: I have no
idea what the high-level structure of the tutorial is because it's
broken up into chunks of a few lines at a time separated by
explanatory text. That'd be fine if the script were repeated without
those interruptions at some point, or if the chunks of program were
bigger, but as it stands the code part of the tutorial is very hard to
read.

The second problem I have is also a context problem: OpenGLContext
doesn't exist for me. I have a standard Windows Python 2.7 / PyOpenGL
/ numpy install. Fortunately I have some prior experience with OpenGL
and guess that I can work around this by using WX rendering contexts
instead. So I adapt the tutorial script to this standalone program:
http://pastebin.com/KWwi1Ahi

However, when I run this, I get the following error when the first
call to shaders.compileShader is made:
OpenGL.error.NullFunctionError: Attempt to call an undefined alternate
function (glCreateShader, glCreateShaderObjectARB), check for
bool(glCreateShader) before calling

Amusingly, calling glGetBoolean(glCreateShader) throws *another* error:
KeyError: ('Unknown specifier
<OpenGL.platform.baseplatform.glCreateShader object at
0x00000000031360F0>', 'Failure in cConverter
<OpenGL.converters.SizedOutput object at 0x0000000002E27748>',
(<OpenGL.platform.baseplatform.glCreateShader object at
0x00000000031360F0>,), 1, <OpenGL.wrapper.glGetIntegerv object at
0x000000000305D4C8>)

-Chris

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.