Fix OpenGL3 driver to compile standalone

also test this configuration in CI
This commit is contained in:
sfan5 2023-04-06 12:07:53 +02:00
parent e850bd102a
commit ca5f005b74
8 changed files with 6 additions and 20 deletions

@ -97,7 +97,7 @@ jobs:
- name: Build
run: |
cmake . -DBUILD_EXAMPLES=1 -DUSE_SDL2=ON -DENABLE_OPENGL3=ON
cmake . -DBUILD_EXAMPLES=1 -DUSE_SDL2=ON -DENABLE_OPENGL=OFF -DENABLE_OPENGL3=ON
make -j2
- name: Test (headless)
@ -124,7 +124,7 @@ jobs:
- name: Build
run: |
cmake . -DBUILD_EXAMPLES=1 -DUSE_SDL2=ON -DENABLE_GLES2=ON
cmake . -DBUILD_EXAMPLES=1 -DUSE_SDL2=ON -DENABLE_OPENGL=OFF -DENABLE_GLES2=ON
make -j2
- name: Test (headless)
@ -135,7 +135,7 @@ jobs:
- name: Test (Xvfb)
run: |
cd bin/Linux
LIBGL_ALWAYS_SOFTWARE=true xvfb-run ./AutomatedTest gles2
LIBGL_ALWAYS_SOFTWARE=true xvfb-run ./AutomatedTest ogles2
win32:
runs-on: ubuntu-20.04

@ -260,7 +260,7 @@ endif()
if(ENABLE_GLES2)
find_package(OpenGLES2 REQUIRED)
endif()
if(ENABLE_OPENGL)
if(ENABLE_OPENGL OR ENABLE_OPENGL3)
set(OpenGL_GL_PREFERENCE "LEGACY")
find_package(OpenGL REQUIRED)
endif()

@ -6,8 +6,6 @@
#define __C_OGLCORE_CACHE_HANDLER_H_INCLUDED__
#if defined(_IRR_COMPILE_WITH_OPENGL_) || defined(_IRR_COMPILE_WITH_OGLES1_) || defined(_IRR_COMPILE_WITH_OGLES2_)
#include "SMaterial.h"
#include "ITexture.h"
@ -643,4 +641,3 @@ protected:
}
#endif
#endif

@ -6,8 +6,6 @@
#define __C_OGLCORE_FEATURE_H_INCLUDED__
#if defined(_IRR_COMPILE_WITH_OPENGL_) || defined(_IRR_COMPILE_WITH_OGLES1_) || defined(_IRR_COMPILE_WITH_OGLES2_)
#include "irrTypes.h"
namespace irr
@ -37,4 +35,3 @@ public:
}
#endif
#endif

@ -6,8 +6,6 @@
#define __C_OGLCORE_RENDER_TARGET_H_INCLUDED__
#if defined(_IRR_COMPILE_WITH_OPENGL_) || defined(_IRR_COMPILE_WITH_OGLES1_) || defined(_IRR_COMPILE_WITH_OGLES2_)
#include "IRenderTarget.h"
#ifndef GL_FRAMEBUFFER_INCOMPLETE_FORMATS
@ -400,4 +398,3 @@ protected:
}
#endif
#endif

@ -6,8 +6,6 @@
#define __C_OGLCORE_TEXTURE_H_INCLUDED__
#if defined(_IRR_COMPILE_WITH_OPENGL_) || defined(_IRR_COMPILE_WITH_OGLES1_) || defined(_IRR_COMPILE_WITH_OGLES2_)
#include "irrArray.h"
#include "SMaterialLayer.h"
#include "ITexture.h"
@ -666,4 +664,3 @@ protected:
}
#endif
#endif

@ -4,7 +4,7 @@
#include "CSDLManager.h"
#if defined(_IRR_COMPILE_WITH_SDL_DEVICE_) && defined(_IRR_COMPILE_WITH_OPENGL_)
#if defined(_IRR_COMPILE_WITH_SDL_DEVICE_)
#include "CIrrDeviceSDL.h"
#include "COpenGLCommon.h"
@ -34,8 +34,6 @@ const SExposedVideoData& CSDLManager::getContext() const
bool CSDLManager::activateContext(const SExposedVideoData& videoData, bool restorePrimaryOnZero)
{
// unclear if this is still needed:
glFrontFace(GL_CW);
return true;
}

@ -6,7 +6,7 @@
#define __C_SDL_MANAGER_H_INCLUDED__
#if defined(_IRR_COMPILE_WITH_SDL_DEVICE_) && defined(_IRR_COMPILE_WITH_OPENGL_)
#if defined(_IRR_COMPILE_WITH_SDL_DEVICE_)
#include "IContextManager.h"