void ProgressBar::Render(IRenderer& renderer)
{
    glm::vec3 progStart[2] =
    {
        glm::vec3(m_start,-100.0f),
        glm::vec3(m_pos,-100.0f)
    };

    glm::vec3 progEnd[2] =
    {
        glm::vec3(m_pos,-100.0f),
        glm::vec3(m_end,-100.0f)
    };

    renderer.SetRenderSpace(World);

    renderer.DrawLine(progStart,2,2.0f,glm::vec4(1.0f,0.0f,0.0f,1.0f));
    renderer.DrawLine(progEnd,2,2.0f);
}
void CamRayNode::Apply(IRenderingView* rv) {
    IRenderer* r = rv->GetRenderer();

    // draw camera
    Vector<3,float> col(0.0,0.0,1.0); // blue
    float size = 4;
    r->DrawPoint(cam.GetPosition(), col, size);

    // draw ray
    col = Vector<3,float>(1.0,1.0,0.0); //yellow
    size = 2;
    r->DrawLine(Line(cam.GetPosition(),
                     cursor.GetPosition()),
                col, size);

    // draw sphere position
    col = Vector<3,float>(0.0,0.0,0.0); //yellow
    size = 5;
    r->DrawPoint(Vector<3,float>(0.0,0.0,0.0),col,size);

}
Exemple #3
0
	void Slider::Render(IRenderer& renderer)
	{
		glm::vec3 line[2] =
		{
			glm::vec3(m_start.x,m_start.y,0.0f),
			glm::vec3(m_end.x,m_end.y,0.0f)
		};

		glm::mat4 T = glm::translate(glm::vec3(m_pos.x,m_pos.y,0.0f));
		T = glm::scale(T,glm::vec3(60.0f,40.0f,1.0f));

		std::stringstream stream;
		stream << m_text << ": ";
		stream.precision(m_iPrecision);
		stream << std::fixed << m_fPercentage << std::endl;

		renderer.SetRenderSpace(RenderSpace::Screen);

		renderer.DrawSprite(m_SpriteTexture,T);
		renderer.DrawLine(line,2);
		renderer.DrawString(stream.str().c_str(),glm::vec3(m_start.x,m_end.y - 10.0f,0.0f));

	}