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