Skip to main content
GameDev.net gamedev.net
🔒 Locked

Weird Problem

Started by Budoken01 May 30, 2002 at 1:53 PM 2 replies 250+ views
Original Post
Budoken01
Budoken01
First of all, I am trying to create a third person demo. I loaded a md2 model, and gave keyboard commands to it. However, when I try to include a polygon for any reason, it isnt showing up. Any help would be appreciated.
  
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	glLoadIdentity();
	gluLookAt(0, 1.5f, 100,  0.0f, 0.5f, 0.0f,  0, 1, 0);
	glBegin(GL_QUADS);
		glVertex3f(-1.0f, 2.5f, 0.0f);
		glVertex3f(-1.0f, 2.5f, 0.0f);
		glVertex3f( 1.0f, 0.5f, 0.0f);
		glVertex3f( 1.0f, 0.5f, 0.0f);
	glEnd();
	Animate(&md2Model[0]);
	SwapBuffers(g_hDC);
  
yakuza
yakuza
First off, you''re not actually drawing a quad with those vertex coordinates, you''re drawing a line.

Also, what''s your gluPerspective look like? You could be outside your viewing area...
----------------Amusing quote deleted at request of owner
Budoken01
Budoken01
Oops, i meant:

  
glBegin(GL_QUADS);
glVertex3f(-1.0f, 2.5f, 0.0f);
glVertex3f( 1.0f, 2.5f, 0.0f);
glVertex3f( 1.0f, 0.5f, 0.0f);
glVertex3f(-1.0f, 0.5f, 0.0f);
glEnd();


and my perspective is:
gluPerspective(45.0f,(GLfloat)width/(GLfloat)height, .5f ,150.0f);

Thanks.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.