Re: [PyOpenGL-Devel] Build problems from CVS source on win32
Brought to you by:
mcfletch
From: simon <si...@re...> - 2005-11-10 01:17:18
|
Thanks Charlie, I wasn't sure if I was just using CSV incorrectly or it was a problem with the code... opensource is great but there's always a steep learning curve. To remove dependencies I put on glext.h, I manually added this to 'src/config.h'. This was added to config.h because it is also used in vertex_shader.i. Mabye it should go in util.inc as it's swig counterpart is in there... /* This is from glext.h and used by shader_objects.i and vertex_shader.i */ #ifndef GL_ARB_shader_objects typedef char GLcharARB; typedef unsigned int GLhandleARB; #endif I wonder how GLhandleARB is getting defined on linux. I'm using the GL.h headers provided by SGI. Does your GL.h file define these ? There are a few defines that the shader_objects.i wrapper functions use. I manually added this to shader_objects.i: /* The following defined needed to be declared in the swig generated .inc file because they are used by some of the wrappers functions. */ %{ #ifndef GL_ARB_shader_objects #define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 #define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 #endif %} Macro declaration of glGetShaderSourceARB is incorrect, Line 71. DECLARE_VOID_EXT(glGetglShaderSourceARB, (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source), (obj, maxLength, length, source)) Needs to be: DECLARE_VOID_EXT(glGetShaderSourceARB, (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source), (obj, maxLength, length, source)) I see you also fixed the issue with _glGetObjectParameterivARB and _glGetInfoLogARB calling proc_glGetObjectParameterivARB in the latest CVS, great. In vertex_progam.i line 34. GLboolean is cased incorrectly: DECLARE_EXT(glIsProgramARB, Glboolean, 0, (GLuint program), (program)) Needs to be: DECLARE_EXT(glIsProgramARB, GLboolean, 0, (GLuint program), (program)) Finally, it compiles and runs! The only change I needed to make to my python GL code was with glutCreateWindow. It gave an error saying it only accepted char* and I was passing a unicode string read from XML. This worked with the binary release of PyOpenGL, oh well. Simple fix on my part but I'm wondering if I need to compile PyOpenGL with unicode for this to work? On to the reason I'm compiling from CSV in the first place, using GLSL... Thanks, -Simon Charles Moad wrote: > I committed your fixes to cvs, but it looks like the cvs is in > kinda bad shape right now. Typically I have no problems with the > linux build, but that's not the case now. I don't have a windows > build environment unfortunately. The shader related wrappers compile > fine for me with linux now though. > > Thanks, > Charlie > > simon wrote: > >> Hello, >> I'm new to both CVS and SWIG so bare with me. (familiar with >> boost.python extension programming for whatever it's worth) >> >> I'm trying to build the latest PyOpenGL from CVS on win32 with VC7.1. >> I'm getting the following error when generating the swig wrappers: >> interface\GL\ARB\shader_objects.i(73): Error: Syntax error in input. >> >> The problem seems to be with the line: >> /* turn the exception handler on */ >> GL_EXCEPTION_HANDLER() >> >> I replaced this line with what all the other interface files use...: >> %include py_exception_handler.inc >> >> This needed to be done in the following files: (shader_objects.i, >> vertex_program.i, vertex_shader.i, EXT\framebuffer_object.i) >> >> It seems shader_objects.i is using the wrong define here: >> #if !EXT_DEFINES_PROTO || !defined(GL_EXT_framebuffer_object) >> should be: >> #if !EXT_DEFINES_PROTO || !defined(GL_ARB_shader_objects) >> >> The macro declaration of glGetActiveUniformARB also has a wrong >> parameter type for 'index', uGLint needs to be changed to GLuint >> otherwise you get a compile error. >> DECLARE_VOID_EXT(glGetActiveUniformARB, (GLhandleARB programObj, >> uGLint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum >> *type, GLcharARB *name), (programObj, index, maxLength, length, size, >> type, name)) >> >> Once I got to compiling, more problems with the shader_object stuff. >> I needed to include 'glext.h' in my config.h to get a bunch of >> typedefs and defines needed. >> On to linking in which of course I don't have win32 libs for using >> shader objects so I get link unresolved externals for >> _glGetShaderSourceARB... >> >> Has anyone ever got this to work on win32 ? any help would be greatly >> appreciated. >> >> Thanks, >> Simon Feltman >> REZN8 Productions >> www.rezn8.com >> >> >> >> >> >> ------------------------------------------------------- >> SF.Net email is sponsored by: >> Tame your development challenges with Apache's Geronimo App Server. >> Download >> it for free - -and be entered to win a 42" plasma tv or your very own >> Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php >> _______________________________________________ >> PyOpenGL Homepage >> http://pyopengl.sourceforge.net >> _______________________________________________ >> PyOpenGL-Devel mailing list >> PyO...@li... >> https://lists.sourceforge.net/lists/listinfo/pyopengl-devel > > |