Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/application
diff options
context:
space:
mode:
Diffstat (limited to 'source/application')
-rw-r--r--source/application/StarMainApplication_sdl.cpp4
-rw-r--r--source/application/StarRenderer_opengl.cpp6
2 files changed, 7 insertions, 3 deletions
diff --git a/source/application/StarMainApplication_sdl.cpp b/source/application/StarMainApplication_sdl.cpp
index 6b0ca4c..557e02d 100644
--- a/source/application/StarMainApplication_sdl.cpp
+++ b/source/application/StarMainApplication_sdl.cpp
@@ -314,10 +314,12 @@ public:
int height;
SDL_GetWindowSize(m_sdlWindow, &width, &height);
m_windowSize = Vec2U(width, height);
-
+
+#ifdef __APPLE__
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
+#endif
m_sdlGlContext = SDL_GL_CreateContext(m_sdlWindow);
if (!m_sdlGlContext)
diff --git a/source/application/StarRenderer_opengl.cpp b/source/application/StarRenderer_opengl.cpp
index 0c9e7ec..9d0d717 100644
--- a/source/application/StarRenderer_opengl.cpp
+++ b/source/application/StarRenderer_opengl.cpp
@@ -107,8 +107,10 @@ OpenGlRenderer::OpenGlRenderer() {
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glDisable(GL_DEPTH_TEST);
- //glEnable(GL_DEBUG_OUTPUT);
- //glDebugMessageCallback(GlMessageCallback, this);
+ if (GLEW_VERSION_4_3) {
+ //glEnable(GL_DEBUG_OUTPUT);
+ //glDebugMessageCallback(GlMessageCallback, this);
+ }
m_whiteTexture = createGlTexture(Image::filled({1, 1}, Vec4B(255, 255, 255, 255), PixelFormat::RGBA32),
TextureAddressing::Clamp,