|
1 | 1 | #include "stdafx.h" |
2 | 2 | #include "xr_3da/resource.h" |
3 | 3 | #include "SDL.h" |
4 | | - |
5 | 4 | #include "Include/editor/ide.hpp" |
6 | 5 | #include "engine_impl.hpp" |
7 | 6 | #include "xr_input.h" |
@@ -50,8 +49,16 @@ void CRenderDevice::Initialize() |
50 | 49 | const Uint32 flags = SDL_WINDOW_BORDERLESS | SDL_WINDOW_HIDDEN | |
51 | 50 | SDL_WINDOW_RESIZABLE | SDL_WINDOW_OPENGL; |
52 | 51 |
|
53 | | - m_sdlWnd = SDL_CreateWindow("S.T.A.L.K.E.R.: Call of Pripyat", 0, 0, 640, 480, flags); |
| 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 |
54 | 60 |
|
| 61 | + m_sdlWnd = SDL_CreateWindow("S.T.A.L.K.E.R.: Call of Pripyat", 0, 0, 640, 480, flags); |
55 | 62 | R_ASSERT3(m_sdlWnd, "Unable to create SDL window", SDL_GetError()); |
56 | 63 | SDL_SetWindowHitTest(m_sdlWnd, WindowHitTest, nullptr); |
57 | 64 | SDL_SetWindowMinimumSize(m_sdlWnd, 256, 192); |
|
0 commit comments