Ejemplo n.º 1
0
void Laser::OnNewProgram()
{
    if(!myTexture.Empty())
        ProgramState().SetUniform("Texture", myTexture);
    ProgramState().SetUniform("FrameCount", VectorI2(8,16));
    ProgramState().SetUniform("Length", Length.Get());
    FixedGeometry::OnNewProgram();
}
Ejemplo n.º 2
0
void Laser::OnPropertyChanged(const PropertyInfo *info, bool implicit)
{
    if(info == &LengthProperty)
    {
        if(HasProgram())
        {
            ProgramState().SetUniform("Length", Length.Get());
        }
    }
    FixedGeometry::OnPropertyChanged(info, implicit);
}
Ejemplo n.º 3
0
 void Nametag::OnNewProgram()
 {
     ProgramState().SetUniform("Flip", VectorF2(0,1));
     Billboard::OnNewProgram();
 }
Ejemplo n.º 4
0
void Meteor::OnNewProgram()
{
    ProgramState().SetUniform("FrameCount", VectorI2(16,1));
    Sprite::OnNewProgram();
}
Ejemplo n.º 5
0
*
*  @brief Contains the function implementations for the program state. The 
*   program state includes whether the file is is wireframe or not, and 
*   determines the type of shading used, and if texture mapping is used.
*   It also keeps track of the wirefram resolution, and takes care of 
*   speeding up and slowing down the planetary motion. Also it can pause the 
*   program and takes a single step. 
***************************************************************************/

//includes 
#include "ProgramStateFunctions.h"

/*!
* @brief the state of the program
*/
ProgramState State = ProgramState();

/**************************************************************************//**
* @author Paul Blasi 
* 
* Description: Toggles if the wireframe represenation if on or off 
*
*****************************************************************************/
void ToggleWireframe()
{
	State.Wireframe = !State.Wireframe;
}

/**************************************************************************//**
* @author Paul Blasi 
*