void Laser::OnNewProgram() { if(!myTexture.Empty()) ProgramState().SetUniform("Texture", myTexture); ProgramState().SetUniform("FrameCount", VectorI2(8,16)); ProgramState().SetUniform("Length", Length.Get()); FixedGeometry::OnNewProgram(); }
void Laser::OnPropertyChanged(const PropertyInfo *info, bool implicit) { if(info == &LengthProperty) { if(HasProgram()) { ProgramState().SetUniform("Length", Length.Get()); } } FixedGeometry::OnPropertyChanged(info, implicit); }
void Nametag::OnNewProgram() { ProgramState().SetUniform("Flip", VectorF2(0,1)); Billboard::OnNewProgram(); }
void Meteor::OnNewProgram() { ProgramState().SetUniform("FrameCount", VectorI2(16,1)); Sprite::OnNewProgram(); }
* * @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 *