Hey Shilo
Thanks for trying to help.
So in the constructor I initialize a member variable:
_baseEffect = [[SPBaseEffect alloc] init];
then my render function is this:
- (void)render:(SPRenderSupport *)support
{
[support finishQuadBatch]; // finish previously batched quads
[support addDrawCalls:1]; // update stats display
_baseEffect.mvpMatrix = support.mvpMatrix;
_baseEffect.alpha = support.alpha;
[SPBlendMode applyBlendFactorsForBlendMode:support.blendMode
premultipliedAlpha:NO];
//get the frame definition for the current frame
ArchiveableFrameDefinition *frame = [[_movie frames] objectAtIndex:_currentFrame];
//render the placed objects at this frame
[self renderPlacedObjects:frame.placedObjects];
}
In the renderPlacedObjects function is where I calculate triangles for primitive openGL drawing. Right before I call buffer and draw commands I do call:
[_baseEffect prepareToDraw];
I believe I got the _baseEffect and other stuff from a sample provided by Daniel or maybe even you! I don't know what that stuff does.