using othographic projection now

This commit is contained in:
2011-06-20 22:06:35 +02:00
parent 419ebc8783
commit 0d78fc5ece
7 changed files with 57 additions and 12 deletions
+4 -4
View File
@@ -163,10 +163,10 @@ void draw_sprite_helper (float u_start, float u_end, float width, float height)
*/
glBegin(GL_QUADS);
glTexCoord2f (u_start, 0.f); glColor3f (1.f, 0.f, 0.f); glVertex3f (0.f, 0.f, 0.f);
glTexCoord2f (u_end, 0.f); glColor3f (0.f, 1.f, 0.f); glVertex3f (0.f, 0.f, height);
glTexCoord2f (u_end, 1.f); glColor3f (0.f, 0.f, 1.f); glVertex3f (width, 0.f, height);
glTexCoord2f (u_start, 1.f); glColor3f (1.f, 0.f, 1.f); glVertex3f (width, 0.f,0.f);
glTexCoord2f (u_start, 0.f); glVertex3f (0.f, 0.f, 0.f);
glTexCoord2f (u_end, 0.f); glVertex3f (0.f, 0.f, height);
glTexCoord2f (u_end, 1.f); glVertex3f (width, 0.f, height);
glTexCoord2f (u_start, 1.f); glVertex3f (width, 0.f,0.f);
glEnd();
}
+2 -2
View File
@@ -681,7 +681,7 @@ void ViewBase::DrawOBJModelShaded (OBJModelPtr obj_model) {
texture = iter->second;
} else {
LogMessage ("Disabling textures");
// LogMessage ("Disabling textures");
}
glActiveTexture(GL_TEXTURE0);
@@ -1003,7 +1003,7 @@ void ViewBase::Resize (int width, int height) {
glViewport(0, 0, width, height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(mCamera->GetFOVY (), float (width) / float (height), 0.1, 100);
gluPerspective(mCamera->GetFOVY (), float (width) / float (height), 0., 100);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity ();
+1 -1
View File
@@ -29,7 +29,7 @@ class ViewBase : public Module{
virtual ~ViewBase() {};
/** \brief Resizes the View */
void Resize (int width, int height);
virtual void Resize (int width, int height);
/** \brief Switches to fullscreen */
void SetFullscreen (bool fullscreen);
bool GetIsFullscreen () { return mDrawFullscreen; };