contextdata.py 'Unhashable type' error with OSMesa

paul mccarthy <[email protected]> Tue, 11 Nov 2014 22:33:27 +0000
Newsgroups gmane.comp.python.opengl.devel
Message-ID <CAD_xh8G4n9Q3yz-mAjEvB94dRrnpOgGY2686tq7YBqKyaf-qnw@mail.gmail.com>
--===============3550880418337528308==
Content-Type: multipart/alternative; boundary=001a113df3fa32ed6105079cdea1

--001a113df3fa32ed6105079cdea1
Content-Type: text/plain; charset=UTF-8

Howdy,

I am using PyOpenGL 3.1.0 with OSMesa for off-screen rendering. This worked
fine until I attempted to use the ARB_fragment_program extension to use a
custom fragment program (please don't question my use of ARB_vertex_program
- I need to support an ancient OpenGL configuration).

When calling OpenGL.GL.ARB.fragment_program.glGenProgramsARB, my program
crashes with an 'Unhashable type' error:

  File "/.../glimage_funcs.py", line 126, in init
    glimg.fragmentProgram = arbfp.glGenProgramsARB(1)
  File "/.../python2.7/site-packages/OpenGL/latebind.py", line 45, in
__call__
    return self._finalCall( *args, **named )
  File "/.../python2.7/site-packages/OpenGL/wrapper.py", line 657, in
wrapperCall
    result = wrappedOperation( *cArguments )
  File "/.../python2.7/site-packages/OpenGL/platform/baseplatform.py", line
401, in __call__
    if self.load():
  File "/.../python2.7/site-packages/OpenGL/platform/baseplatform.py", line
390, in load
    error_checker = self.error_checker,
  File "/.../python2.7/site-packages/OpenGL/platform/baseplatform.py", line
148, in constructFunction
    if (not is_core) and not self.checkExtension( extension ):
  File "/.../python2.7/site-packages/OpenGL/platform/baseplatform.py", line
261, in checkExtension
    set = contextdata.getValue( 'extensions', context=context )
  File "/.../python2.7/site-packages/OpenGL/contextdata.py", line 106, in
getValue
    contextStorage = storage.get( context  )
TypeError: unhashable type


I have tried disabling OpenGL.contextdata with:

    OpenGL.ERROR_ON_COPY = True
    OpenGL.STORE_POINTERS = False

(as detailed in the OpenGL.contextdata module documentation), but this has
no effect.

Any ideas on how to overcome this?

Thanks very much,

Paul McCarthy

--001a113df3fa32ed6105079cdea1
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Howdy,<div><br></div><div>I am using PyOpenGL 3.1.0 with O=
SMesa for off-screen rendering. This worked fine until I attempted to use t=
he ARB_fragment_program extension to use a custom fragment program (please =
don&#39;t question my use of ARB_vertex_program - I need to support an anci=
ent OpenGL configuration).=C2=A0</div><div><br></div><div>When calling Open=
GL.GL.ARB.fragment_program.glGenProgramsARB, my program crashes with an &#3=
9;Unhashable type&#39; error:</div><div><br></div><div><div>=C2=A0 File &qu=
ot;/.../glimage_funcs.py&quot;, line 126, in init</div><div>=C2=A0 =C2=A0 g=
limg.fragmentProgram =3D arbfp.glGenProgramsARB(1)</div><div>=C2=A0 File &q=
uot;/.../python2.7/site-packages/OpenGL/latebind.py&quot;, line 45, in __ca=
ll__</div><div>=C2=A0 =C2=A0 return self._finalCall( *args, **named )</div>=
<div>=C2=A0 File &quot;/.../python2.7/site-packages/OpenGL/wrapper.py&quot;=
, line 657, in wrapperCall</div><div>=C2=A0 =C2=A0 result =3D wrappedOperat=
ion( *cArguments )</div><div>=C2=A0 File &quot;/.../python2.7/site-packages=
/OpenGL/platform/baseplatform.py&quot;, line 401, in __call__</div><div>=C2=
=A0 =C2=A0 if self.load():</div><div>=C2=A0 File &quot;/.../python2.7/site-=
packages/OpenGL/platform/baseplatform.py&quot;, line 390, in load</div><div=
>=C2=A0 =C2=A0 error_checker =3D self.error_checker,</div><div>=C2=A0 File =
&quot;/.../python2.7/site-packages/OpenGL/platform/baseplatform.py&quot;, l=
ine 148, in constructFunction</div><div>=C2=A0 =C2=A0 if (not is_core) and =
not self.checkExtension( extension ):</div><div>=C2=A0 File &quot;/.../pyth=
on2.7/site-packages/OpenGL/platform/baseplatform.py&quot;, line 261, in che=
ckExtension</div><div>=C2=A0 =C2=A0 set =3D contextdata.getValue( &#39;exte=
nsions&#39;, context=3Dcontext )</div><div>=C2=A0 File &quot;/.../python2.7=
/site-packages/OpenGL/contextdata.py&quot;, line 106, in getValue</div></di=
v><div><div>=C2=A0 =C2=A0 contextStorage =3D storage.get( context =C2=A0)</=
div><div>TypeError: unhashable type</div></div><div><br></div><div><br></di=
v><div>I have tried disabling OpenGL.contextdata with:</div><div><br></div>=
<div>=C2=A0 =C2=A0 OpenGL.ERROR_ON_COPY =3D True=C2=A0</div><div>=C2=A0 =C2=
=A0 OpenGL.STORE_POINTERS =3D False=C2=A0</div><div><br></div><div>(as deta=
iled in the OpenGL.contextdata module documentation), but this has no effec=
t.</div><div><br></div><div>Any ideas on how to overcome this?</div><div><b=
r></div><div>Thanks very much,</div><div><br></div><div>Paul McCarthy</div>=
<div><br></div></div>

--001a113df3fa32ed6105079cdea1--


--===============3550880418337528308==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
--===============3550880418337528308==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
_______________________________________________
PyOpenGL-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyopengl-devel

--===============3550880418337528308==--