Small fixes from windows
This commit is contained in:
parent
420bb37039
commit
b26310439d
4 changed files with 24 additions and 12 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -5,3 +5,5 @@ build*
|
||||||
lib
|
lib
|
||||||
install
|
install
|
||||||
.vscode
|
.vscode
|
||||||
|
out
|
||||||
|
.vs
|
||||||
13
Externals/CMakeLists.txt
vendored
13
Externals/CMakeLists.txt
vendored
|
|
@ -5,8 +5,17 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||||
find_package(GLEW REQUIRED)
|
find_package(GLEW REQUIRED)
|
||||||
set(GLEW_LIB ${GLEW_STATIC_LIBRARY_RELEASE} opengl32.lib PARENT_SCOPE)
|
set(GLEW_LIB ${GLEW_STATIC_LIBRARY_RELEASE} opengl32.lib PARENT_SCOPE)
|
||||||
|
|
||||||
set(PORTAUDIO_INCLUDE_DIR "../../ModulesWindowsLibraries/portaudio/include" PARENT_SCOPE)
|
# Your relative paths
|
||||||
set(PORTAUDIO_LIB "../../ModulesWindowsLibraries/portaudio_build/Debug/portaudio" PARENT_SCOPE)
|
set(RELATIVE_INCLUDE_DIR "../../ModulesWindowsLibraries/portaudio/include")
|
||||||
|
set(RELATIVE_LIB "../../ModulesWindowsLibraries/portaudio_build/Debug/portaudio.lib")
|
||||||
|
|
||||||
|
# Convert to absolute paths
|
||||||
|
get_filename_component(ABSOLUTE_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${RELATIVE_INCLUDE_DIR}" ABSOLUTE)
|
||||||
|
get_filename_component(ABSOLUTE_LIB "${CMAKE_CURRENT_SOURCE_DIR}/${RELATIVE_LIB}" ABSOLUTE)
|
||||||
|
|
||||||
|
# Set absolute paths with respect to the parent scope
|
||||||
|
set(PORTAUDIO_INCLUDE_DIR "${ABSOLUTE_INCLUDE_DIR}" PARENT_SCOPE)
|
||||||
|
set(PORTAUDIO_LIB "${ABSOLUTE_LIB}" PARENT_SCOPE)
|
||||||
else()
|
else()
|
||||||
find_package(GLEW REQUIRED)
|
find_package(GLEW REQUIRED)
|
||||||
set(GLEW_LIB ${GLEW_LIBRARIES} GL PARENT_SCOPE)
|
set(GLEW_LIB ${GLEW_LIBRARIES} GL PARENT_SCOPE)
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
|
|
||||||
#include "Player.hpp"
|
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
|
#include "Player.hpp"
|
||||||
|
|
||||||
// 1) artworks
|
// 1) artworks
|
||||||
// 2) how to easy add more songs?
|
// 2) how to easy add more songs?
|
||||||
// 3) GUi :
|
// 3) GUi :
|
||||||
// - seeker
|
// - seeker
|
||||||
// - song idx
|
// - song idx
|
||||||
// - non existing highlight
|
// - non existing highlight
|
||||||
// - prev next
|
// - prev next
|
||||||
// - remove debug gui
|
// - remove debug gui
|
||||||
|
|
@ -14,19 +14,20 @@
|
||||||
// 5) new database with history
|
// 5) new database with history
|
||||||
|
|
||||||
void runApp() {
|
void runApp() {
|
||||||
|
|
||||||
Player player;
|
Player player;
|
||||||
Library library; library.loadJson(getHome() + "Library.json"); library.checkExisting();
|
Library library;
|
||||||
|
library.loadJson(getHome() + "Library.json");
|
||||||
|
library.checkExisting();
|
||||||
LibraryWidget<tp::Window::Events, tp::Graphics::Canvas> gui(&library, &player);
|
LibraryWidget<tp::Window::Events, tp::Graphics::Canvas> gui(&library, &player);
|
||||||
|
|
||||||
auto window = tp::Window::createWindow(800, 600, "Window 1");
|
auto window = tp::Window::createWindow(800, 600, "Window 1");
|
||||||
|
|
||||||
if (window) {
|
if (window) {
|
||||||
while (!window->shouldClose()) {
|
while (!window->shouldClose()) {
|
||||||
window->processEvents();
|
window->processEvents();
|
||||||
|
|
||||||
auto area = window->getCanvas().getAvaliableArea();
|
auto area = window->getCanvas().getAvaliableArea();
|
||||||
|
|
||||||
gui.proc(window->getEvents(), {}, { area.x, area.y, area.z, area.w });
|
gui.proc(window->getEvents(), {}, { area.x, area.y, area.z, area.w });
|
||||||
gui.draw(window->getCanvas(), {}, { area.x, area.y, area.z, area.w });
|
gui.draw(window->getCanvas(), {}, { area.x, area.y, area.z, area.w });
|
||||||
|
|
||||||
|
|
@ -48,7 +49,7 @@ int main() {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
runApp();
|
runApp();
|
||||||
|
|
||||||
binModule.deinitialize();
|
binModule.deinitialize();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue