Code review comment for lp:~mcfletch/python-examples/fixes

Revision history for this message
Mike C. Fletcher (mcfletch) wrote :

On 06/06/2014 10:15 AM, Oliver Marks wrote:
> Thanks for the suggestion i will have a look later and change it to use the
> none raw struct maybe that will fix it.
The merge won't fix anything other than allowing you to import the
module on PyOpenGL 3.1.

> I have got it working now but i dont understand the why exactly.
>
> Basically turning on double buffering in the glx context makes the zbuffer
> work so its like single buffered displays dont have a z buffer for the
> depth.
Single-buffered contexts are pretty rarely used (essentially never), so
I wouldn't be too surprised to find them not working particularly well.

Good luck,
Mike

> On Fri, Jun 6, 2014 at 3:05 PM, Mike C. Fletcher <email address hidden>
> wrote:
>
>> Mike C. Fletcher has proposed merging lp:~mcfletch/python-examples/fixes
>> into lp:~oly/python-examples/trunk.
>>
>> Requested reviews:
>> Oliver Marks (oly)
>>
>> For more details, see:
>> https://code.launchpad.net/~mcfletch/python-examples/fixes/+merge/222326
>>
>> Trivial fix to allow import of the GLX structure on 3.1. Can't test beyond
>> that as the glade GUI doesn't run on my Kubuntu machine.
>> --
>> https://code.launchpad.net/~mcfletch/python-examples/fixes/+merge/222326
>> You are requested to review the proposed merge of
>> lp:~mcfletch/python-examples/fixes into lp:~oly/python-examples/trunk.
>>
>> === modified file 'python-examples/gtk3/tut15/tut15-opengl-touch-app-01.py'
>> --- python-examples/gtk3/tut15/tut15-opengl-touch-app-01.py 2014-06-06
>> 08:09:32 +0000
>> +++ python-examples/gtk3/tut15/tut15-opengl-touch-app-01.py 2014-06-06
>> 14:04:31 +0000
>> @@ -15,7 +15,10 @@
>> from OpenGL.GLU import gluPerspective, gluLookAt
>> from OpenGL.arrays import vbo
>> from OpenGL import GLX
>> -from OpenGL.raw._GLX import struct__XDisplay
>> +try:
>> + from OpenGL.GLX import struct__XDisplay
>> +except ImportError as err:
>> + from OpenGL.raw._GLX import struct__XDisplay
>> from OpenGL.GL import GL_VERTEX_SHADER, GL_FRAGMENT_SHADER
>> from OpenGL.GL import shaders, glGetUniformLocation
>>
>>
>>
>>

--
________________________________________________
   Mike C. Fletcher
   Designer, VR Plumber, Coder
   http://www.vrplumber.com
   http://blog.vrplumber.com

« Back to merge proposal