Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualMr_PoP

Posted 05 November 2012 - 02:41 PM

  • What does camera() do? Are you sure you are setting up ModelView and Projection matrices properly.
  • Can you check in debugger or using debug printout how many quads it adds to your list?
  • You are setting vertex coordinates twice instead of vertex+normal, but this should not be your problem.

1-
[source lang="cpp"]void camera (void) { glRotatef(xrot,1.0,0.0,0.0); //rotate our camera on teh x-axis (left and right) glRotatef(yrot,0.0,1.0,0.0); //rotate our camera on the y-axis (up and down) glTranslated(-xpos,-ypos,-zpos); //translate the screen to the position of our camera}[/source]
so I can walk through the whole scene! and yes am setting up ModelView and Projection matrices properly.

2- I can but idk how to do it Posted Image

3-fixed it

#2Mr_PoP

Posted 05 November 2012 - 02:41 PM

  • What does camera() do? Are you sure you are setting up ModelView and Projection matrices properly.
  • Can you check in debugger or using debug printout how many quads it adds to your list?
  • You are setting vertex coordinates twice instead of vertex+normal, but this should not be your problem.

1-
[source lang="cpp"]void camera (void) { glRotatef(xrot,1.0,0.0,0.0); //rotate our camera on teh x-axis (left and right) glRotatef(yrot,0.0,1.0,0.0); //rotate our camera on the y-axis (up and down) glTranslated(-xpos,-ypos,-zpos); //translate the screen to the position of our camera}[/source]
so I can walk through the whole scene! and yes am setting up ModelView and Projection matrices properly.

2- I can but idk how to do it Posted Image

3-fixed it

#1Mr_PoP

Posted 05 November 2012 - 02:40 PM

  • What does camera() do? Are you sure you are setting up ModelView and Projection matrices properly.
  • Can you check in debugger or using debug printout how many quads it adds to your list?
  • You are setting vertex coordinates twice instead of vertex+normal, but this should not be your problem.

1-
[source lang="cpp"]void camera (void) { glRotatef(xrot,1.0,0.0,0.0); //rotate our camera on teh x-axis (left and right) glRotatef(yrot,0.0,1.0,0.0); //rotate our camera on the y-axis (up and down) glTranslated(-xpos,-ypos,-zpos); //translate the screen to the position of our camera}[/source]
so I can walk through the whole scene!

2- I can but idk how to do it Posted Image

3-fixed it

PARTNERS