add glext.h, remove GLU dependency

This commit is contained in:
Eduardo Bart 2011-11-22 22:21:33 -02:00
parent b50cb35734
commit 18c122c71e
4 changed files with 11491 additions and 7 deletions

View File

@ -27,8 +27,7 @@
#include <framework/platform/platform.h> #include <framework/platform/platform.h>
#include <GL/gl.h> #include <GL/gl.h>
#include <GL/glu.h> #include <framework/thirdparty/glext.h>
#include <GL/glext.h>
PFNGLGENFRAMEBUFFERSPROC oglGenFramebuffers = 0; PFNGLGENFRAMEBUFFERSPROC oglGenFramebuffers = 0;
PFNGLBINDFRAMEBUFFERPROC oglBindFramebuffer = 0; PFNGLBINDFRAMEBUFFERPROC oglBindFramebuffer = 0;
@ -99,7 +98,7 @@ void FrameBuffer::bind()
glViewport(0, 0, m_texture->getWidth(), m_texture->getHeight()); glViewport(0, 0, m_texture->getWidth(), m_texture->getHeight());
glMatrixMode(GL_PROJECTION); glMatrixMode(GL_PROJECTION);
glLoadIdentity(); glLoadIdentity();
gluOrtho2D(0.0f, m_texture->getWidth(), 0, m_texture->getHeight()); glOrtho(0.0f, m_texture->getWidth(), 0, m_texture->getHeight(), -1, 1);
// back to model view // back to model view
glMatrixMode(GL_MODELVIEW); glMatrixMode(GL_MODELVIEW);

View File

@ -26,8 +26,7 @@
#include <framework/graphics/texture.h> #include <framework/graphics/texture.h>
#include <GL/gl.h> #include <GL/gl.h>
#include <GL/glu.h> #include <framework/thirdparty/glext.h>
#include <GL/glext.h>
Graphics g_graphics; Graphics g_graphics;
@ -113,7 +112,7 @@ void Graphics::restoreViewport()
// setup view region like above // setup view region like above
glMatrixMode(GL_PROJECTION); glMatrixMode(GL_PROJECTION);
glLoadIdentity(); glLoadIdentity();
gluOrtho2D(0.0f, width, height, 0.0f); glOrtho(0.0f, width, height, 0.0f, -1, 1);
// back to model view // back to model view
glMatrixMode(GL_MODELVIEW); glMatrixMode(GL_MODELVIEW);

View File

@ -24,7 +24,7 @@
#include "graphics.h" #include "graphics.h"
#include <GL/gl.h> #include <GL/gl.h>
#include <GL/glext.h> #include <framework/thirdparty/glext.h>
Texture::Texture() Texture::Texture()
{ {

11486
src/framework/thirdparty/glext.h vendored Normal file

File diff suppressed because it is too large Load Diff