Re: How to call glMultMatrix passing an instance of KFbxXMatrix?
Ian Mallett <[email protected]>
| Newsgroups | gmane.comp.python.opengl.user |
|---|---|
| Message-ID | <CAG4NV=vGkZdUto8_XD_W2uZ8KwbV01KKrpZDDnA5=zD_fJra_g@mail.gmail.com> |
On Sun, Sep 11, 2011 at 5:49 PM, Mark Laff <[email protected]>wrote: > ** > Newb to both Python and OpenGL, so this may be a trivial question. > > I have C > C++ > sample code which looks like: > > void GlDrawCrossHair(KFbxXMatrix& pGlobalPosition) > { > glColor3f(1.0, 1.0, 1.0); > glLineWidth(1.0); > > glPushMatrix(); > glMultMatrixd((double*) pGlobalPosition); > ... > > but when I try to write, in Python: > > > def DrawCrosshair(pGlobalPosition): > glColor3f(1.0,1.0,1.0) > glLineWidth(1.0) > > glPushMatrix() > glMultMatrixd(pGlobalPosition) > > In your C++ code, class KFbxXMatrix probably has some specified way to convert to an array of type double. You'll need to do whatever the equivalent is in Python; i.e., glMultMatrixd(*pGlobalPosition.getArray()) or whatever. Ian ------------------------------------------------------------------------------ Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ _______________________________________________ PyOpenGL Homepage http://pyopengl.sourceforge.net _______________________________________________ PyOpenGL-Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pyopengl-users