Making window demo graphics API-specific.

This commit is contained in:
Ben Vanik
2015-11-07 10:53:07 -08:00
parent f065872241
commit 91229de429
4 changed files with 76 additions and 45 deletions

View File

@@ -21,3 +21,43 @@ project("xenia-ui-gl")
project_root.."/build_tools/third_party/gflags/src",
})
local_platform_files()
removefiles({"*_demo.cc"})
group("demos")
project("xenia-ui-window-gl-demo")
uuid("e0a687e5-d1f4-4c18-b2f7-012c53ec1ee4")
kind("WindowedApp")
language("C++")
links({
"elemental-forms",
"gflags",
"glew",
"imgui",
"xenia-base",
"xenia-core",
"xenia-ui",
"xenia-ui-gl",
})
flags({
"WinMain", -- Use WinMain instead of main.
})
defines({
"GLEW_STATIC=1",
"GLEW_MX=1",
})
includedirs({
project_root.."/third_party/elemental-forms/src",
project_root.."/build_tools/third_party/gflags/src",
})
files({
"../window_demo.cc",
"window_gl_demo.cc",
project_root.."/src/xenia/base/main_"..platform_suffix..".cc",
})
files({
project_root.."/third_party/elemental-forms/resources.rc",
})
resincludedirs({
project_root,
project_root.."/third_party/elemental-forms",
})

View File

@@ -0,0 +1,30 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2015 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include <string>
#include <vector>
#include "xenia/base/main.h"
#include "xenia/ui/gl/gl_context.h"
#include "xenia/ui/window.h"
namespace xe {
namespace ui {
int window_demo_main(const std::vector<std::wstring>& args);
std::unique_ptr<GraphicsContext> CreateDemoContext(Window* window) {
return xe::ui::gl::GLContext::Create(window);
}
} // namespace ui
} // namespace xe
DEFINE_ENTRY_POINT(L"xenia-ui-window-gl-demo", L"xenia-ui-window-gl-demo",
xe::ui::window_demo_main);