mirror of https://github.com/AxioDL/boo.git
Update glslang; fix BOO_HAS_GL on Windows
This commit is contained in:
parent
ae07fcba0b
commit
42cedb77f0
|
@ -408,6 +408,10 @@ if(NOT NX)
|
||||||
function(glslang_set_link_args TARGET)
|
function(glslang_set_link_args TARGET)
|
||||||
endfunction(glslang_set_link_args)
|
endfunction(glslang_set_link_args)
|
||||||
|
|
||||||
|
# Disable PCH for now
|
||||||
|
function(glslang_pch SRCS PCHCPP)
|
||||||
|
endfunction(glslang_pch)
|
||||||
|
|
||||||
set(ENABLE_SPVREMAPPER On)
|
set(ENABLE_SPVREMAPPER On)
|
||||||
add_definitions("-DENABLE_OPT=0")
|
add_definitions("-DENABLE_OPT=0")
|
||||||
add_subdirectory(glslang/glslang)
|
add_subdirectory(glslang/glslang)
|
||||||
|
|
2
glslang
2
glslang
|
@ -1 +1 @@
|
||||||
Subproject commit c374030e80604ab5c2a516b3f9dd1e85b05898e4
|
Subproject commit 9f46e3dd5e11febbfbed971e74e10ed638e6578d
|
|
@ -102,9 +102,11 @@ public:
|
||||||
m_3dCtx.m_ctx11.m_sampleCount = samples;
|
m_3dCtx.m_ctx11.m_sampleCount = samples;
|
||||||
m_3dCtx.m_ctx11.m_anisotropy = anisotropy;
|
m_3dCtx.m_ctx11.m_anisotropy = anisotropy;
|
||||||
m_3dCtx.m_ctx11.m_fbFormat = deepColor ? DXGI_FORMAT_R16G16B16A16_FLOAT : DXGI_FORMAT_R8G8B8A8_UNORM;
|
m_3dCtx.m_ctx11.m_fbFormat = deepColor ? DXGI_FORMAT_R16G16B16A16_FLOAT : DXGI_FORMAT_R8G8B8A8_UNORM;
|
||||||
|
#if BOO_HAS_GL
|
||||||
m_3dCtx.m_ctxOgl.m_glCtx.m_sampleCount = samples;
|
m_3dCtx.m_ctxOgl.m_glCtx.m_sampleCount = samples;
|
||||||
m_3dCtx.m_ctxOgl.m_glCtx.m_anisotropy = anisotropy;
|
m_3dCtx.m_ctxOgl.m_glCtx.m_anisotropy = anisotropy;
|
||||||
m_3dCtx.m_ctxOgl.m_glCtx.m_deepColor = deepColor;
|
m_3dCtx.m_ctxOgl.m_glCtx.m_deepColor = deepColor;
|
||||||
|
#endif
|
||||||
#if BOO_HAS_VULKAN
|
#if BOO_HAS_VULKAN
|
||||||
g_VulkanContext.m_sampleCountColor = samples;
|
g_VulkanContext.m_sampleCountColor = samples;
|
||||||
g_VulkanContext.m_sampleCountDepth = samples;
|
g_VulkanContext.m_sampleCountDepth = samples;
|
||||||
|
@ -264,6 +266,7 @@ public:
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if BOO_HAS_GL
|
||||||
/* Finally try OpenGL */
|
/* Finally try OpenGL */
|
||||||
{
|
{
|
||||||
/* Obtain DXGI Factory */
|
/* Obtain DXGI Factory */
|
||||||
|
@ -274,6 +277,7 @@ public:
|
||||||
Log.report(logvisor::Info, FMT_STRING("initialized OpenGL renderer"));
|
Log.report(logvisor::Info, FMT_STRING("initialized OpenGL renderer"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
Log.report(logvisor::Fatal, FMT_STRING("system doesn't support Vulkan, D3D11, or OpenGL"));
|
Log.report(logvisor::Fatal, FMT_STRING("system doesn't support Vulkan, D3D11, or OpenGL"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,8 +45,9 @@ struct OGLContext {
|
||||||
int m_fsCountDown = 0;
|
int m_fsCountDown = 0;
|
||||||
};
|
};
|
||||||
std::unordered_map<const boo::IWindow*, Window> m_windows;
|
std::unordered_map<const boo::IWindow*, Window> m_windows;
|
||||||
|
#if BOO_HAS_GL
|
||||||
boo::GLContext m_glCtx;
|
boo::GLContext m_glCtx;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !WINDOWS_STORE
|
#if !WINDOWS_STORE
|
||||||
|
|
|
@ -7,8 +7,11 @@
|
||||||
#include "boo/IWindow.hpp"
|
#include "boo/IWindow.hpp"
|
||||||
|
|
||||||
#include "boo/audiodev/IAudioVoiceEngine.hpp"
|
#include "boo/audiodev/IAudioVoiceEngine.hpp"
|
||||||
|
#include "boo/graphicsdev/IGraphicsCommandQueue.hpp"
|
||||||
#include "boo/graphicsdev/D3D.hpp"
|
#include "boo/graphicsdev/D3D.hpp"
|
||||||
|
#if BOO_HAS_GL
|
||||||
#include "boo/graphicsdev/GL.hpp"
|
#include "boo/graphicsdev/GL.hpp"
|
||||||
|
#endif
|
||||||
#include "boo/graphicsdev/glew.h"
|
#include "boo/graphicsdev/glew.h"
|
||||||
#include "boo/graphicsdev/wglew.h"
|
#include "boo/graphicsdev/wglew.h"
|
||||||
|
|
||||||
|
@ -34,8 +37,10 @@ static logvisor::Module Log("boo::WindowWin32");
|
||||||
std::unique_ptr<IGraphicsCommandQueue> _NewD3D11CommandQueue(D3D11Context* ctx, D3D11Context::Window* windowCtx,
|
std::unique_ptr<IGraphicsCommandQueue> _NewD3D11CommandQueue(D3D11Context* ctx, D3D11Context::Window* windowCtx,
|
||||||
IGraphicsContext* parent);
|
IGraphicsContext* parent);
|
||||||
std::unique_ptr<IGraphicsDataFactory> _NewD3D11DataFactory(D3D11Context* ctx, IGraphicsContext* parent);
|
std::unique_ptr<IGraphicsDataFactory> _NewD3D11DataFactory(D3D11Context* ctx, IGraphicsContext* parent);
|
||||||
|
#if BOO_HAS_GL
|
||||||
std::unique_ptr<IGraphicsCommandQueue> _NewGLCommandQueue(IGraphicsContext* parent, GLContext* glCtx);
|
std::unique_ptr<IGraphicsCommandQueue> _NewGLCommandQueue(IGraphicsContext* parent, GLContext* glCtx);
|
||||||
std::unique_ptr<IGraphicsDataFactory> _NewGLDataFactory(IGraphicsContext* parent, GLContext* glCtx);
|
std::unique_ptr<IGraphicsDataFactory> _NewGLDataFactory(IGraphicsContext* parent, GLContext* glCtx);
|
||||||
|
#endif
|
||||||
#if BOO_HAS_VULKAN
|
#if BOO_HAS_VULKAN
|
||||||
std::unique_ptr<IGraphicsCommandQueue> _NewVulkanCommandQueue(VulkanContext* ctx, VulkanContext::Window* windowCtx,
|
std::unique_ptr<IGraphicsCommandQueue> _NewVulkanCommandQueue(VulkanContext* ctx, VulkanContext::Window* windowCtx,
|
||||||
IGraphicsContext* parent);
|
IGraphicsContext* parent);
|
||||||
|
@ -122,6 +127,7 @@ public:
|
||||||
IGraphicsDataFactory* getLoadContextDataFactory() override { return m_dataFactory.get(); }
|
IGraphicsDataFactory* getLoadContextDataFactory() override { return m_dataFactory.get(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if BOO_HAS_GL
|
||||||
struct GraphicsContextWin32GL : GraphicsContextWin32 {
|
struct GraphicsContextWin32GL : GraphicsContextWin32 {
|
||||||
std::unique_ptr<IGraphicsDataFactory> m_dataFactory;
|
std::unique_ptr<IGraphicsDataFactory> m_dataFactory;
|
||||||
std::unique_ptr<IGraphicsCommandQueue> m_commandQueue;
|
std::unique_ptr<IGraphicsCommandQueue> m_commandQueue;
|
||||||
|
@ -333,6 +339,7 @@ public:
|
||||||
return m_dataFactory.get();
|
return m_dataFactory.get();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
#if BOO_HAS_VULKAN
|
#if BOO_HAS_VULKAN
|
||||||
struct GraphicsContextWin32Vulkan : GraphicsContextWin32 {
|
struct GraphicsContextWin32Vulkan : GraphicsContextWin32 {
|
||||||
|
@ -871,11 +878,13 @@ public:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
IGraphicsContext::EGraphicsAPI api = IGraphicsContext::EGraphicsAPI::D3D11;
|
IGraphicsContext::EGraphicsAPI api = IGraphicsContext::EGraphicsAPI::D3D11;
|
||||||
|
#if BOO_HAS_GL
|
||||||
if (b3dCtx.m_ctxOgl.m_dxFactory) {
|
if (b3dCtx.m_ctxOgl.m_dxFactory) {
|
||||||
m_gfxCtx.reset(new GraphicsContextWin32GL(IGraphicsContext::EGraphicsAPI::OpenGL3_3, this, m_hwnd, b3dCtx));
|
m_gfxCtx.reset(new GraphicsContextWin32GL(IGraphicsContext::EGraphicsAPI::OpenGL3_3, this, m_hwnd, b3dCtx));
|
||||||
m_openGL = true;
|
m_openGL = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
m_gfxCtx.reset(new GraphicsContextWin32D3D(api, this, m_hwnd, b3dCtx));
|
m_gfxCtx.reset(new GraphicsContextWin32D3D(api, this, m_hwnd, b3dCtx));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue