Removed support for GLU.

This commit is contained in:
binary1248 2015-01-12 18:15:11 +01:00
parent 97bdf72ce1
commit e2420dfe76
6 changed files with 11 additions and 12 deletions

View File

@ -4,7 +4,7 @@ set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/X11)
# all source files
set(SRC ${SRCROOT}/X11.cpp)
# find OpenGL, GLU and X11
# find OpenGL and X11
find_package(OpenGL REQUIRED)
include_directories(${OPENGL_INCLUDE_DIR})
find_package(X11 REQUIRED)

View File

@ -4,10 +4,10 @@
////////////////////////////////////////////////////////////
#include <SFML/Window.hpp>
#include <SFML/System/Err.hpp>
#include <SFML/OpenGL.hpp>
#include <X11/Xlib-xcb.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <iostream>
#include <cmath>
////////////////////////////////////////////////////////////
@ -33,7 +33,9 @@ void initialize(sf::Window& window)
// Setup a perspective projection
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(90.f, 1.f, 1.f, 500.f);
static const double pi = 3.141592654;
GLdouble extent = std::tan(90.0 * pi / 360.0);
glFrustum(-extent, extent, -extent, extent, 1.0, 500.0);
}
////////////////////////////////////////////////////////////

View File

@ -4,7 +4,7 @@ set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/opengl)
# all source files
set(SRC ${SRCROOT}/OpenGL.cpp)
# find OpenGL and GLU
# find OpenGL
find_package(OpenGL REQUIRED)
include_directories(${OPENGL_INCLUDE_DIR})
set(ADDITIONAL_LIBRARIES ${OPENGL_LIBRARIES})

View File

@ -53,9 +53,9 @@ int main()
return EXIT_FAILURE;
glGenTextures(1, &texture);
glBindTexture(GL_TEXTURE_2D, texture);
gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA, image.getSize().x, image.getSize().y, GL_RGBA, GL_UNSIGNED_BYTE, image.getPixelsPtr());
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image.getSize().x, image.getSize().y, 0, GL_RGBA, GL_UNSIGNED_BYTE, image.getPixelsPtr());
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
}
// Enable Z-buffer read and write

View File

@ -4,7 +4,7 @@ set(SRCROOT ${PROJECT_SOURCE_DIR}/examples/window)
# all source files
set(SRC ${SRCROOT}/Window.cpp)
# find OpenGL and GLU
# find OpenGL
find_package(OpenGL REQUIRED)
include_directories(${OPENGL_INCLUDE_DIR})
set(ADDITIONAL_LIBRARIES ${OPENGL_LIBRARIES})

View File

@ -33,7 +33,7 @@
////////////////////////////////////////////////////////////
/// This file just includes the OpenGL (GL and GLU) headers,
/// This file just includes the OpenGL headers,
/// which have actually different paths on each system
////////////////////////////////////////////////////////////
#if defined(SFML_SYSTEM_WINDOWS)
@ -44,7 +44,6 @@
#endif
#include <GL/gl.h>
#include <GL/glu.h>
#elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD)
@ -53,13 +52,11 @@
#include <GLES/glext.h>
#else
#include <GL/gl.h>
#include <GL/glu.h>
#endif
#elif defined(SFML_SYSTEM_MACOS)
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#elif defined (SFML_SYSTEM_IOS)