Unable to implement OES_matrix_palette

Posts: 23
Joined: 2010.08
Post: #1
I've lately been trying to implement the OES_matrix_palette extension in my project. Sadly I am unable to get my test of vertex skinning working Sad

I've started a new OpenGL ES template in XCode - forcing it to use OpenGL ES 1 by default. I've used the example code at the end of the OES_matrix_palette extension description for implementation details.

I try to add the following code to the drawFrame() method:
//For my test-case we only have one "bone" - and try to use GL_MATRIX_PALETTE_OES to transform the vertices, rather than GL_MODELVIEW.
static const float squareWeights[] = {1, 1, 1, 1};
static const GLubyte squareMatrixIndices[] = {0, 0, 0, 0};

//Set up the additional pointers for matrix skinning of the template's cube
glWeightPointerOES (1, GL_FLOAT, 0, squareWeights);
glMatrixIndexPointerOES (1, GL_UNSIGNED_BYTE, 0, squareMatrixIndices);

//Transfer the GL_MODELVIEW matrix to PaletteMatrix 0

//Flush the GL_MODELVIEW matrix to make sure it does not have any influence over the vertex transform

My goal with the test-case is to have the cube move in the same pattern as the template - but using GL_MATRIX_PALETTE_OES to achieve the translation.

The cube is drawn in my test but without any translation applied! I'm obviously misunderstanding something about the extension - but what am I missing?

Thank you for your help.
Doh... found the answer after reading the "fine print" in the extension description. Don't they know we only look at the examples Wink

Naturally you have to enable the feature by calling glEnable (GL_MATRIX_PALETTE_OES) for vertex skinning to take effect!

Thank you for reading.

The Monkey Hustle - Now available on the App Store!
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Unable to load textures wademcgillis 15 12,136 Apr 9, 2010 03:37 PM
Last Post: Macmenace
  implement water flow through OPENGL IphoneDev 0 4,326 Mar 18, 2009 12:26 AM
Last Post: IphoneDev
  unable to locate a suitable developer disk image Parystec 16 18,003 Oct 7, 2008 10:25 AM
Last Post: mamweb