model rendering is working :)

This commit is contained in:
Andreas Ortmann 2016-09-28 13:38:31 +02:00
parent 85b8139872
commit 722e9f53cd

View file

@ -9,8 +9,8 @@ namespace endofthejedi {
{
std::cout<<"setup 3d" << std::endl;
//m_atomicBomb = new PolygonModel("../data/mesh/small_atomic_bomb.stl");
m_atomicBomb = new PolygonModel("../data/mesh/quad_screen_coords.stl");
m_atomicBomb = new PolygonModel("../data/mesh/small_atomic_bomb.stl");
//m_atomicBomb = new PolygonModel("../data/mesh/quad_screen_coords.stl");
m_atomicBomb->import();
m_atomicBomb->uploadToOpenGl();
@ -45,16 +45,16 @@ namespace endofthejedi {
(void) state;
//m_atomicBomb->bind();
//m_atomicBomb->render();
m_atomicBomb->bind();
m_atomicBomb->render();
glColor3f(1.0, 0.0, 0.0);
glBegin(GL_QUADS);
glVertex2f(-1.0f, -1.0f);
glVertex2f(1.0f, -1.0f);
glVertex2f(1.0f, 1.0f);
glVertex2f(-1.0f, 1.0f);
glEnd();
//glColor3f(1.0, 0.0, 0.0);
//glBegin(GL_QUADS);
//glVertex2f(-1.0f, -1.0f);
//glVertex2f(1.0f, -1.0f);
//glVertex2f(1.0f, 1.0f);
//glVertex2f(-1.0f, 1.0f);
//glEnd();
//std::cout<<"render 3d" << std::endl;
}