#include "viewOverrideSimple.h"
viewOverrideSimple::viewOverrideSimple(
const MString & name )
: MRenderOverride( name )
, mUIName("Simple VP2 Override")
, mCurrentOperation(-1)
{
mOperations[0] = mOperations[1] = mOperations[2] = NULL;
mOperationNames[0] = "viewOverrideSimple_Scene";
mOperationNames[1] = "viewOverrideSimple_HUD";
mOperationNames[2] = "viewOverrideSimple_Present";
}
viewOverrideSimple::~viewOverrideSimple()
{
for (unsigned int i=0; i<3; i++)
{
if (mOperations[i])
{
delete mOperations[i];
mOperations[i] = NULL;
}
}
}
{
}
bool viewOverrideSimple::startOperationIterator()
{
mCurrentOperation = 0;
return true;
}
viewOverrideSimple::renderOperation()
{
if (mCurrentOperation >= 0 && mCurrentOperation < 3)
{
if (mOperations[mCurrentOperation])
{
return mOperations[mCurrentOperation];
}
}
return NULL;
}
bool
viewOverrideSimple::nextRenderOperation()
{
mCurrentOperation++;
if (mCurrentOperation < 3)
{
return true;
}
return false;
}
{
if (!theRenderer)
if (!mOperations[0])
{
}
if (!mOperations[0] ||
!mOperations[1] ||
!mOperations[2])
{
}
}
MStatus viewOverrideSimple::cleanup()
{
mCurrentOperation = -1;
}
simpleViewRenderSceneRender::simpleViewRenderSceneRender(
const MString &name)
: MSceneRender( name )
{
}
simpleViewRenderSceneRender::clearOperation()
{
float c1[4] = { color1[0], color1[1], color1[2], 1.0f };
float c2[4] = { color2[0], color2[1], color2[2], 1.0f };
mClearOperation.setClearColor( c1 );
mClearOperation.setClearColor2( c2 );
mClearOperation.setClearGradient( gradient);
return mClearOperation;
}