mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-30 05:12:18 -05:00
68e7f2e6c1
* Wii U support * [WiiU] Combined Dockerfile * [WiiU] Combined Dockerfile * [WiiU] Combined Dockerfile * Add Jenkins support * wiiu: fix scissor clamp * wiiu: improve button remapping * wiiu: fix scaling issues * Update Dockerfile after merge * Pull assets before build * Only stop container once * Adjust logging sinks * wiiu: Change button mapping to match PC version * wiiu: Implement controller changes * wiiu: Update BUILDING.md Co-authored-by: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com> Co-authored-by: David Chavez <david@dcvz.io>
67 lines
1.6 KiB
C++
67 lines
1.6 KiB
C++
#include "PR/ultra64/gbi.h"
|
|
#include "Lib/Fast3D/gfx_pc.h"
|
|
#include "Lib/Fast3D/gfx_sdl.h"
|
|
#include "Lib/Fast3D/gfx_dxgi.h"
|
|
#include "Lib/Fast3D/gfx_glx.h"
|
|
#include "Lib/Fast3D/gfx_opengl.h"
|
|
#include "Lib/Fast3D/gfx_direct3d11.h"
|
|
#include "Lib/Fast3D/gfx_direct3d12.h"
|
|
#include "Lib/Fast3D/gfx_wiiu.h"
|
|
#include "Lib/Fast3D/gfx_gx2.h"
|
|
#include "Lib/Fast3D/gfx_window_manager_api.h"
|
|
|
|
#include <string>
|
|
|
|
/*
|
|
* Begin shims for gfx_pc.cpp. Eventually, a file from SOH repo should be moved in here.
|
|
*/
|
|
|
|
/*
|
|
* End empty shims
|
|
*/
|
|
|
|
void SetWindowManager(struct GfxWindowManagerAPI** WmApi, struct GfxRenderingAPI** RenderingApi, const std::string& gfx_backend) {
|
|
// First set default
|
|
#ifdef ENABLE_OPENGL
|
|
*RenderingApi = &gfx_opengl_api;
|
|
#if defined(__linux__) && defined(X11_SUPPORTED)
|
|
// LINUX_TODO:
|
|
// *WmApi = &gfx_glx;
|
|
*WmApi = &gfx_sdl;
|
|
#else
|
|
*WmApi = &gfx_sdl;
|
|
#endif
|
|
#endif
|
|
#ifdef ENABLE_DX12
|
|
*RenderingApi = &gfx_direct3d12_api;
|
|
*WmApi = &gfx_dxgi_api;
|
|
#endif
|
|
#ifdef ENABLE_DX11
|
|
*RenderingApi = &gfx_direct3d11_api;
|
|
*WmApi = &gfx_dxgi_api;
|
|
#endif
|
|
#ifdef __WIIU__
|
|
*RenderingApi = &gfx_gx2_api;
|
|
*WmApi = &gfx_wiiu;
|
|
#endif
|
|
|
|
// Config can override
|
|
#ifdef ENABLE_DX11
|
|
if (gfx_backend == "dx11") {
|
|
*RenderingApi = &gfx_direct3d11_api;
|
|
*WmApi = &gfx_dxgi_api;
|
|
}
|
|
#endif
|
|
#ifdef ENABLE_OPENGL
|
|
if (gfx_backend == "sdl") {
|
|
*RenderingApi = &gfx_opengl_api;
|
|
*WmApi = &gfx_sdl;
|
|
}
|
|
#if defined(__linux__) && defined(X11_SUPPORTED)
|
|
if (gfx_backend == "glx") {
|
|
*RenderingApi = &gfx_opengl_api;
|
|
*WmApi = &gfx_glx;
|
|
}
|
|
#endif
|
|
#endif
|
|
} |