mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
drop glu dependency
This commit is contained in:
parent
392412bee7
commit
0da0dddf15
|
@ -454,7 +454,7 @@ endif()
|
||||||
|
|
||||||
if(TARGET_OS STREQUAL "windows")
|
if(TARGET_OS STREQUAL "windows")
|
||||||
set(PLATFORM_CLIENT)
|
set(PLATFORM_CLIENT)
|
||||||
set(PLATFORM_CLIENT_LIBS opengl32 glu32 winmm)
|
set(PLATFORM_CLIENT_LIBS opengl32 winmm)
|
||||||
set(PLATFORM_LIBS ws2_32) # Windows sockets
|
set(PLATFORM_LIBS ws2_32) # Windows sockets
|
||||||
elseif(TARGET_OS STREQUAL "mac")
|
elseif(TARGET_OS STREQUAL "mac")
|
||||||
find_library(CARBON Carbon)
|
find_library(CARBON Carbon)
|
||||||
|
@ -472,7 +472,7 @@ else()
|
||||||
set(PLATFORM_CLIENT)
|
set(PLATFORM_CLIENT)
|
||||||
find_package(OpenGL)
|
find_package(OpenGL)
|
||||||
find_package(X11)
|
find_package(X11)
|
||||||
set(PLATFORM_CLIENT_LIBS ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${X11_X11_LIB})
|
set(PLATFORM_CLIENT_LIBS ${OPENGL_gl_LIBRARY} ${X11_X11_LIB})
|
||||||
set(PLATFORM_CLIENT_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR} ${X11_X11_INCLUDE_PATH})
|
set(PLATFORM_CLIENT_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR} ${X11_X11_INCLUDE_PATH})
|
||||||
if(TARGET_OS STREQUAL "linux")
|
if(TARGET_OS STREQUAL "linux")
|
||||||
set(PLATFORM_LIBS rt) # clock_gettime for glibc < 2.17
|
set(PLATFORM_LIBS rt) # clock_gettime for glibc < 2.17
|
||||||
|
|
|
@ -15,12 +15,7 @@
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include "SDL.h"
|
#include "SDL.h"
|
||||||
#include "SDL_syswm.h"
|
#include "SDL_syswm.h"
|
||||||
#if defined(CONF_PLATFORM_MACOSX)
|
|
||||||
#include "OpenGL/glu.h"
|
|
||||||
#else
|
|
||||||
#include "SDL_opengl.h"
|
#include "SDL_opengl.h"
|
||||||
#include "GL/glu.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(SDL_VIDEO_DRIVER_X11)
|
#if defined(SDL_VIDEO_DRIVER_X11)
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
@ -353,7 +348,8 @@ void CCommandProcessorFragment_OpenGL::Cmd_Texture_Create(const CCommandBuffer::
|
||||||
{
|
{
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST);
|
||||||
gluBuild2DMipmaps(GL_TEXTURE_2D, StoreOglformat, Width, Height, Oglformat, GL_UNSIGNED_BYTE, pTexData);
|
glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);
|
||||||
|
glTexImage2D(GL_TEXTURE_2D, 0, StoreOglformat, Width, Height, 0, Oglformat, GL_UNSIGNED_BYTE, pTexData);
|
||||||
}
|
}
|
||||||
|
|
||||||
// calculate memory usage
|
// calculate memory usage
|
||||||
|
|
Loading…
Reference in a new issue