Exemplo n.º 1
0
FrameGraphRenderable::FrameGraphRenderable(uint16_t frames, uint16_t resolution)
    : mNumFrames(frames), mResolution(resolution), mLastLine(0), mSmallerScaling(0), mCurrentScaling(1.0f)
{
    mlastTimes = new TimeGraphLine[mNumFrames];

    // use identity projection and view matrices
    mUseIdentityProjection = true;
    mUseIdentityView = true;

    mNumVertices = mNumFrames * 8;
    mLineSpace = (2.0f / (mNumFrames));

    mRenderOp.vertexData = new Ogre::VertexData();

    mRenderOp.indexData = 0;
    mRenderOp.vertexData->vertexCount = mNumVertices;
    mRenderOp.vertexData->vertexStart = 0;
    mRenderOp.operationType = Ogre::RenderOperation::OT_LINE_LIST;
    mRenderOp.useIndexes = false;

    // Set the vertex declarations
    mRenderOp.vertexData->vertexDeclaration->addElement(0, 0, Ogre::VET_FLOAT3, Ogre::VES_POSITION);
    mRenderOp.vertexData->vertexDeclaration->addElement(1, 0, Ogre::VET_COLOUR, Ogre::VES_DIFFUSE);

    createHardwareBuffers();
    fillHardwareBuffers();
}
Exemplo n.º 2
0
    void DynamicLines::update()
    {
        if(!mDirty) return;

        setRenderQueueGroup(mUse2D ? Ogre::RENDER_QUEUE_OVERLAY : Ogre::RENDER_QUEUE_MAIN);
        fillHardwareBuffers();
    }
Exemplo n.º 3
0
void NxLine::update()
{
	if (mDirty) fillHardwareBuffers();
}
//------------------------------------------------------------------------------------------------
void PhysicsDynamicLines::update()
{
	if (mDirty) fillHardwareBuffers();
}
Exemplo n.º 5
0
//------------------------------------------------------------------------------------------------
void DynamicLines::update()
{
	if (m_bDirty) fillHardwareBuffers();
}