Skip to content

Commit f32fbe2

Browse files
committed
Revert "Force 4.5 OpenGL usage"
This reverts commit abdf664.
1 parent 3f99790 commit f32fbe2

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

src/Layers/xrRenderGL/glHW.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ void CHW::CreateDevice(SDL_Window* hWnd)
5959
return;
6060
}
6161

62+
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
63+
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
64+
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
65+
6266
// Initialize OpenGL Extension Wrangler
6367
if (glewInit() != GLEW_OK)
6468
{

src/xrEngine/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "
3535
cotire(${PROJECT_NAME})
3636

3737
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
38-
target_link_libraries(${PROJECT_NAME} xrCore xrMiscMath luabind xrAPI xrSound GLEW xrScriptEngine xrNetServer ${LUA_LIBRARIES} ${THEORA_LIBRARY} ${OGG_LIBRARIES} xrCDB xrPhysics ${FREEIMAGE_LIBRARY} openal ${LOCKFILE_LIBRARIES} ${SDL_LIBRARIES})
38+
target_link_libraries(${PROJECT_NAME} xrCore xrMiscMath luabind xrAPI xrSound xrScriptEngine xrNetServer ${LUA_LIBRARIES} ${THEORA_LIBRARY} ${OGG_LIBRARIES} xrCDB xrPhysics ${FREEIMAGE_LIBRARY} openal ${LOCKFILE_LIBRARIES} ${SDL_LIBRARIES})
3939
xr_install(${PROJECT_NAME})
4040

src/xrEngine/Device_Initialize.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "stdafx.h"
22
#include "xr_3da/resource.h"
33
#include "SDL.h"
4+
45
#include "Include/editor/ide.hpp"
56
#include "engine_impl.hpp"
67
#include "xr_input.h"
@@ -49,16 +50,8 @@ void CRenderDevice::Initialize()
4950
const Uint32 flags = SDL_WINDOW_BORDERLESS | SDL_WINDOW_HIDDEN |
5051
SDL_WINDOW_RESIZABLE | SDL_WINDOW_OPENGL;
5152

52-
#ifdef USE_OGL
53-
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
54-
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4);
55-
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 5);
56-
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
57-
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
58-
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
59-
#endif
60-
6153
m_sdlWnd = SDL_CreateWindow("S.T.A.L.K.E.R.: Call of Pripyat", 0, 0, 640, 480, flags);
54+
6255
R_ASSERT3(m_sdlWnd, "Unable to create SDL window", SDL_GetError());
6356
SDL_SetWindowHitTest(m_sdlWnd, WindowHitTest, nullptr);
6457
SDL_SetWindowMinimumSize(m_sdlWnd, 256, 192);

0 commit comments

Comments
 (0)