I am new to opengl and i am trying to draw a triangle on the ZY plane. I am using gluLookAt to view my model but i am seeing only part of it. Everytime i put a value greater than 1 in the eye coordinates i get a black screen. Please help!!!
Here are my codes:
using namespace std;
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
gluLookAt(1.0,0.0,0.0,0.0,0.0,0.0,0.0,1.0,0.0); glBegin(GL_TRIANGLES); glVertex3f(0.0,0.0,0.0); glVertex3f(0.0,2.0,2.0); glVertex3f(0.0,0.0,4.0); glEnd(); glutSwapBuffers();
int main(int argc, char **argv)
glutDisplayFunc(draw); glutMainLoop(); return 0;