mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 15:55:31 +01:00
fix windows build
add the GL include (back) to Base.props use a similar technique to GLX.cpp (by Sonic) in WGL.cpp to get wglSwapIntervalEXT without the WGLEW check Conflicts: Source/Core/VideoBackends/OGL/OGL.vcxproj Source/Core/VideoBackends/OGL/OGL.vcxproj.filters Source/VSProps/Base.props
This commit is contained in:
parent
10bd61a9d2
commit
f4bd7bdef0
@ -14,9 +14,13 @@
|
|||||||
static HDC hDC = NULL; // Private GDI Device Context
|
static HDC hDC = NULL; // Private GDI Device Context
|
||||||
static HGLRC hRC = NULL; // Permanent Rendering Context
|
static HGLRC hRC = NULL; // Permanent Rendering Context
|
||||||
|
|
||||||
|
// typedef from wglext.h
|
||||||
|
typedef BOOL(WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
|
||||||
|
static PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = NULL;
|
||||||
|
|
||||||
void cInterfaceWGL::SwapInterval(int Interval)
|
void cInterfaceWGL::SwapInterval(int Interval)
|
||||||
{
|
{
|
||||||
if (WGLEW_EXT_swap_control)
|
if (wglSwapIntervalEXT)
|
||||||
wglSwapIntervalEXT(Interval);
|
wglSwapIntervalEXT(Interval);
|
||||||
else
|
else
|
||||||
ERROR_LOG(VIDEO, "No support for SwapInterval (framerate clamped to monitor refresh rate).");
|
ERROR_LOG(VIDEO, "No support for SwapInterval (framerate clamped to monitor refresh rate).");
|
||||||
@ -71,6 +75,7 @@ bool cInterfaceWGL::Create(void *&window_handle)
|
|||||||
Host_SysMessage("failed to create window");
|
Host_SysMessage("failed to create window");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)GLInterface->GetProcAddress("wglSwapIntervalEXT");
|
||||||
|
|
||||||
// Show the window
|
// Show the window
|
||||||
EmuWindow::Show();
|
EmuWindow::Show();
|
||||||
@ -97,7 +102,7 @@ bool cInterfaceWGL::Create(void *&window_handle)
|
|||||||
0, 0, 0 // Layer Masks Ignored
|
0, 0, 0 // Layer Masks Ignored
|
||||||
};
|
};
|
||||||
|
|
||||||
GLuint PixelFormat; // Holds The Results After Searching For A Match
|
int PixelFormat; // Holds The Results After Searching For A Match
|
||||||
|
|
||||||
if (!(hDC=GetDC(EmuWindow::GetWnd()))) {
|
if (!(hDC=GetDC(EmuWindow::GetWnd()))) {
|
||||||
PanicAlert("(1) Can't create an OpenGL Device context. Fail.");
|
PanicAlert("(1) Can't create an OpenGL Device context. Fail.");
|
||||||
|
@ -5,7 +5,9 @@
|
|||||||
#include "GLExtensions.h"
|
#include "GLExtensions.h"
|
||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
|
|
||||||
|
#if defined(__linux__)
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
#endif
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
// gl_1_2
|
// gl_1_2
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
// Licensed under GPLv2
|
// Licensed under GPLv2
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include <GL/gl.h>
|
||||||
|
#include <GL/glext.h>
|
||||||
|
|
||||||
#ifndef GLAPIENTRY
|
#ifndef GLAPIENTRY
|
||||||
#define GLAPIENTRY
|
#define GLAPIENTRY
|
||||||
#endif
|
#endif
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="FramebufferManager.cpp" />
|
<ClCompile Include="FramebufferManager.cpp" />
|
||||||
|
<ClCompile Include="GLExtensions\GLExtensions.cpp" />
|
||||||
<ClCompile Include="GLUtil.cpp" />
|
<ClCompile Include="GLUtil.cpp" />
|
||||||
<ClCompile Include="main.cpp" />
|
<ClCompile Include="main.cpp" />
|
||||||
<ClCompile Include="NativeVertexFormat.cpp" />
|
<ClCompile Include="NativeVertexFormat.cpp" />
|
||||||
@ -63,6 +64,34 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="FramebufferManager.h" />
|
<ClInclude Include="FramebufferManager.h" />
|
||||||
|
<ClInclude Include="GLExtensions\ARB_blend_func_extended.h" />
|
||||||
|
<ClInclude Include="GLExtensions\ARB_buffer_storage.h" />
|
||||||
|
<ClInclude Include="GLExtensions\ARB_debug_output.h" />
|
||||||
|
<ClInclude Include="GLExtensions\ARB_draw_elements_base_vertex.h" />
|
||||||
|
<ClInclude Include="GLExtensions\ARB_ES2_compatibility.h" />
|
||||||
|
<ClInclude Include="GLExtensions\ARB_framebuffer_object.h" />
|
||||||
|
<ClInclude Include="GLExtensions\ARB_get_program_binary.h" />
|
||||||
|
<ClInclude Include="GLExtensions\ARB_map_buffer_range.h" />
|
||||||
|
<ClInclude Include="GLExtensions\ARB_sampler_objects.h" />
|
||||||
|
<ClInclude Include="GLExtensions\ARB_sample_shading.h" />
|
||||||
|
<ClInclude Include="GLExtensions\ARB_sync.h" />
|
||||||
|
<ClInclude Include="GLExtensions\ARB_uniform_buffer_object.h" />
|
||||||
|
<ClInclude Include="GLExtensions\ARB_vertex_array_object.h" />
|
||||||
|
<ClInclude Include="GLExtensions\ARB_viewport_array.h" />
|
||||||
|
<ClInclude Include="GLExtensions\GLExtensions.h" />
|
||||||
|
<ClInclude Include="GLExtensions\gl_1_1.h" />
|
||||||
|
<ClInclude Include="GLExtensions\gl_1_2.h" />
|
||||||
|
<ClInclude Include="GLExtensions\gl_1_3.h" />
|
||||||
|
<ClInclude Include="GLExtensions\gl_1_4.h" />
|
||||||
|
<ClInclude Include="GLExtensions\gl_1_5.h" />
|
||||||
|
<ClInclude Include="GLExtensions\gl_2_0.h" />
|
||||||
|
<ClInclude Include="GLExtensions\gl_3_0.h" />
|
||||||
|
<ClInclude Include="GLExtensions\gl_3_1.h" />
|
||||||
|
<ClInclude Include="GLExtensions\gl_3_2.h" />
|
||||||
|
<ClInclude Include="GLExtensions\gl_common.h" />
|
||||||
|
<ClInclude Include="GLExtensions\KHR_debug.h" />
|
||||||
|
<ClInclude Include="GLExtensions\NV_framebuffer_multisample_coverage.h" />
|
||||||
|
<ClInclude Include="GLExtensions\NV_primitive_restart.h" />
|
||||||
<ClInclude Include="Globals.h" />
|
<ClInclude Include="Globals.h" />
|
||||||
<ClInclude Include="GLUtil.h" />
|
<ClInclude Include="GLUtil.h" />
|
||||||
<ClInclude Include="main.h" />
|
<ClInclude Include="main.h" />
|
||||||
|
@ -13,6 +13,9 @@
|
|||||||
<Filter Include="Render">
|
<Filter Include="Render">
|
||||||
<UniqueIdentifier>{696df73b-378e-4399-8f21-999b65d78dcd}</UniqueIdentifier>
|
<UniqueIdentifier>{696df73b-378e-4399-8f21-999b65d78dcd}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter Include="GLExtensions">
|
||||||
|
<UniqueIdentifier>{4366f285-ded5-48c9-9464-03fb46174526}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="NativeVertexFormat.cpp">
|
<ClCompile Include="NativeVertexFormat.cpp">
|
||||||
@ -54,6 +57,9 @@
|
|||||||
<ClCompile Include="main.cpp" />
|
<ClCompile Include="main.cpp" />
|
||||||
<ClCompile Include="SamplerCache.cpp" />
|
<ClCompile Include="SamplerCache.cpp" />
|
||||||
<ClCompile Include="stdafx.cpp" />
|
<ClCompile Include="stdafx.cpp" />
|
||||||
|
<ClCompile Include="GLExtensions\GLExtensions.cpp">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="VertexManager.h">
|
<ClInclude Include="VertexManager.h">
|
||||||
@ -94,6 +100,90 @@
|
|||||||
<ClInclude Include="SamplerCache.h" />
|
<ClInclude Include="SamplerCache.h" />
|
||||||
<ClInclude Include="VideoBackend.h" />
|
<ClInclude Include="VideoBackend.h" />
|
||||||
<ClInclude Include="stdafx.h" />
|
<ClInclude Include="stdafx.h" />
|
||||||
|
<ClInclude Include="GLExtensions\ARB_blend_func_extended.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\ARB_buffer_storage.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\ARB_debug_output.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\ARB_draw_elements_base_vertex.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\ARB_ES2_compatibility.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\ARB_framebuffer_object.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\ARB_get_program_binary.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\ARB_map_buffer_range.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\ARB_sample_shading.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\ARB_sampler_objects.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\ARB_sync.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\ARB_uniform_buffer_object.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\ARB_vertex_array_object.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\ARB_viewport_array.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\gl_1_1.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\gl_1_2.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\gl_1_3.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\gl_1_4.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\gl_1_5.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\gl_2_0.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\gl_3_0.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\gl_3_1.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\gl_3_2.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\gl_common.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\GLExtensions.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\NV_framebuffer_multisample_coverage.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\NV_primitive_restart.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="GLExtensions\KHR_debug.h">
|
||||||
|
<Filter>GLExtensions</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Text Include="CMakeLists.txt" />
|
<Text Include="CMakeLists.txt" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user