Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Remove direct libGL linkage from OpenGL 3 and OGLES 2 Drivers #232

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/Irrlicht/CIrrDeviceSDL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,8 @@ bool CIrrDeviceSDL::createWindow()
break;
case video::EDT_OPENGL3:
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_COMPATIBILITY);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
break;
case video::EDT_OGLES1:
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 1);
Expand Down
4 changes: 2 additions & 2 deletions source/Irrlicht/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ endif()
if(ENABLE_GLES2)
find_package(OpenGLES2 REQUIRED)
endif()
if(ENABLE_OPENGL OR ENABLE_OPENGL3)
if(ENABLE_OPENGL)
find_package(OpenGL REQUIRED)
endif()
if(USE_SDL2)
Expand Down Expand Up @@ -320,7 +320,7 @@ set(link_libs
"${PNG_LIBRARY}"
"$<$<BOOL:${USE_SDL2}>:${SDL2_LIBRARIES}>"

${OPENGL_LIBRARIES}
"$<$<BOOL:${ENABLE_OPENGL}>:${OPENGL_LIBRARIES}>"
${OPENGLES_LIBRARY}
${OPENGLES2_LIBRARIES}
${EGL_LIBRARY}
Expand Down
6 changes: 4 additions & 2 deletions source/Irrlicht/COGLESCoreExtensionHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include "irrMath.h"
#include "COpenGLCoreFeature.h"

#include <mt_opengl.h>

namespace irr
{
namespace video
Expand Down Expand Up @@ -697,7 +699,7 @@ namespace video
Version = 0;
s32 multiplier = 100;

core::stringc version(glGetString(GL_VERSION));
core::stringc version(GL.GetString(GL.VERSION));

for (u32 i = 0; i < version.size(); ++i)
{
Expand All @@ -718,7 +720,7 @@ namespace video

void getGLExtensions()
{
core::stringc extensions = glGetString(GL_EXTENSIONS);
core::stringc extensions = GL.GetString(GL.EXTENSIONS);
os::Printer::log(extensions.c_str());

// typo in the simulator (note the postfixed s)
Expand Down
Loading