It's so much nicer when you can *see* progress (Get OpenGL-ctypes to the point where something shows up on-screen)


My primary interest in computers is graphics. Comes right down to it, I like computers because they let you create virtual worlds, and while a simple cube floating in space isn't much of a virtual world, it's just enough of a reward to make me happy :) . Basically I'm just loading the PyGame context from OpenGL context. No errors as long as I don't move the mouse over the screen (the glRenderMode function is one of those heavily wrapped functions that require lots of extra work to make them look Pythonic).

Not much luck with the GLUT operations. For some reason I'm getting segfaults with any attempt to call glutInit. That's annoying, as the code is exactly the same as some sample code that apparently works fine. Possibly it's a problem with the loading of the GLUT DLL (though the glutSolidCube function seems to work fine).

Anyway, I think that's enough OpenGL for tonight.

Comments

  1. Thomas Heller

    Thomas Heller on 07/07/2005 5:19 a.m. #


    There's something special with glutInit on Windows. The header file has this:<br />
    <br />
    #if defined(_WIN32) &amp;&amp; !defined(GLUT_DISABLE_ATEXIT_HACK)<br />
    GLUTAPI void APIENTRY __glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int));<br />
    #ifndef GLUT_BUILDING_LIB<br />
    static void APIENTRY glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); }<br />
    #define glutInit glutInit_ATEXIT_HACK<br />
    #endif<br />
    <br />
    If you're interested I can send you a code snippet handling this on windows by email.

Comments are closed.

Pingbacks

Pingbacks are closed.