using othographic projection now
This commit is contained in:
+4
-4
@@ -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
@@ -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
@@ -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; };
|
||||
|
||||
Reference in New Issue
Block a user