Re:GL_ARB_transpose_matrix extension and VM crashes on Hedgehog

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re:GL_ARB_transpose_matrix extension and VM crashes on Hedgehog

Enrico Spinielli
Hi Bert,
so the "trick" of including
   GL_ARB_transpose_matrix
in the 1.1 list in OpenGL>>extensions did not work
(I also found a little bug there <http://bugs.impara.de/view.php?id=4006>), meaning that GL_ARB_transpose_matrix is really not supported by my driver.

I then changed
   OGLExtManager class>>forwardExtMethod:
   "..."
   fwdCode := String streamContents:[:s|
     s nextPutAll: code.
     s crtab; nextPutAll: '"This method was automatically generated"'.
     s crtab; nextPutAll: '^glExt '; nextPutAll: code.
   ].

to:
   OGLExtManager class>>forwardExtMethod:
   "..."
   fwdCode := self simulatedExtensions includes: code
      ifTrue: [self generateSimulatedMethodForwarder: code]
      ifFalse:[self generatedStraightMethodForwarder: code].
   "..."

The simulated code for OpenGL>>glLoadTransposeMatrixf: and glMultTransposeMatrixf: handling MessageNotUnderstood was not working, so I generated

        ^[glExt glLoadTransposeMatrixf: m] on: Error do: [self glLoadMatrixf: m transposed]

I then regenerated the OpenGL method and all worked, albeit quite slowly (slower than simply substituting 'glLoadTransposeMatrixf: m' with 'glLoadMatrixf: m transposed' whenever called).

It has been fun, but I still get VM crashes on heavier Croquet demos than 'Simple Demo (Master)' or 'MPEG Demo (Master)'

Bye
Enrico