• Best introduction to OpenGL, preferably through PyQt5?

    From john.ladasky@gmail.com@21:1/5 to All on Sun Oct 9 19:25:45 2016
    Hi there,

    This group looks fairly quiet, but I'll try to ask a question here anyway.

    I'm a fairly experienced Python programmer, with reasonable knowledge of C and a smattering of C++. I have learned to use many scientific computing packages, but I've never had a need to do 3D rendering in one of my own programs until recently.

    I am trying to accomplish this task with my standard toolkit: Python, the Qt GUI, and the PyQt5 bindings. Qt itself has bindings to OpenGL.

    I have a modern computer with a recent GPU. I'm running Linux and the default installation of OpenGL on my computer is also quite recent, version 4.5.

    I am in over my head. There are too many concepts to absorb at once, and all the software I am using is in flux. I have identified three major problems:

    1) I am finding many tutorials on-line which make use of the older "fixed pipeline" versions of OpenGL (< 2.0). I don't think that I can use these examples. Either I have to give up PyQt5, or install a parallel, older version of OpenGL on my machine
    and somehow rebind Qt to that older version, or both.

    2) When I find a C++ example, I have to mentally translate the code I see into the PyQt5-wrapped equivalent. Also, PyQt4 code is still plentiful out there, and it handles the interface to OpenGL differently.

    3) I have found some PyQt/OpenGL examples which are supposed to be simple, but which seem to have inline C++ code for shaders which gets compiled on the fly. Is this really necessary? Shouldn't I have access to at least one default shader which can
    color the vertices of a triangle? Or an even simpler one, which makes a triangle a uniform color?

    I would be happy starting with a dumbed-down, boilerplate interface to OpenGL. I hope I don't have to grasp all the intricacies of the OpenGL flexible pipeline, just to start drawing a few 3D triangles in a window.

    I haven't been this frustrated with a programming task in 13 years. That's when I attempted to learn Java (and quit, when I discovered Python). For your amusement, my woes are documented here:

    https://groups.google.com/forum/#!search/Ladasky$20Ivor$20horton/bionet.software/kk-EGGTHN1M/KWM6WWZ4qJoJ

    Thanks for any advice you can share.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)