[nostalgia] Move GlUtils out of Nostalgia
This commit is contained in:
parent
5c8242490e
commit
8cd2ef2d8b
@ -1,5 +1,8 @@
|
||||
include_directories(".")
|
||||
|
||||
if(NOSTALGIA_BUILD_TYPE STREQUAL "Native")
|
||||
add_subdirectory(glutils)
|
||||
endif()
|
||||
add_subdirectory(keel)
|
||||
add_subdirectory(nostalgia)
|
||||
add_subdirectory(turbine)
|
21
src/glutils/CMakeLists.txt
Normal file
21
src/glutils/CMakeLists.txt
Normal file
@ -0,0 +1,21 @@
|
||||
add_library(
|
||||
GlUtils OBJECT
|
||||
glutils.cpp
|
||||
)
|
||||
|
||||
if(NOT MSVC)
|
||||
target_compile_options(GlUtils PRIVATE -Wsign-conversion)
|
||||
endif()
|
||||
|
||||
target_link_libraries(
|
||||
GlUtils PUBLIC
|
||||
OxStd
|
||||
glad
|
||||
)
|
||||
|
||||
install(
|
||||
FILES
|
||||
glutils.hpp
|
||||
DESTINATION
|
||||
include/glutils
|
||||
)
|
@ -8,7 +8,7 @@
|
||||
|
||||
#include "glutils.hpp"
|
||||
|
||||
namespace nostalgia::glutils {
|
||||
namespace glutils {
|
||||
|
||||
void deleteBuffer(GLuint b) noexcept {
|
||||
glDeleteBuffers(1, &b);
|
@ -4,16 +4,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ox/std/bounds.hpp>
|
||||
#include <ox/std/defines.hpp>
|
||||
|
||||
#include <glad/glad.h>
|
||||
|
||||
#include <ox/std/bounds.hpp>
|
||||
#include <ox/std/error.hpp>
|
||||
#include <ox/std/string.hpp>
|
||||
#include <ox/std/vector.hpp>
|
||||
|
||||
namespace nostalgia::glutils {
|
||||
namespace glutils {
|
||||
|
||||
constexpr auto GlslVersion = "#version 330";
|
||||
|
@ -10,7 +10,6 @@ if(NOSTALGIA_BUILD_PLAYER)
|
||||
endif()
|
||||
|
||||
if(NOSTALGIA_BUILD_TYPE STREQUAL "Native")
|
||||
add_subdirectory(glutils)
|
||||
add_subdirectory(tools)
|
||||
if(NOSTALGIA_BUILD_STUDIO)
|
||||
add_subdirectory(studio)
|
||||
|
@ -7,5 +7,5 @@ target_link_libraries(
|
||||
NostalgiaCore PUBLIC
|
||||
glad
|
||||
imgui
|
||||
NostalgiaGlUtils
|
||||
GlUtils
|
||||
)
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include <ox/std/types.hpp>
|
||||
|
||||
#include <nostalgia/glutils/glutils.hpp>
|
||||
#include <glutils/glutils.hpp>
|
||||
|
||||
#include "gfx.hpp"
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include <keel/media.hpp>
|
||||
|
||||
#include <nostalgia/glutils/glutils.hpp>
|
||||
#include <glutils/glutils.hpp>
|
||||
|
||||
#include <nostalgia/core/context.hpp>
|
||||
#include <nostalgia/core/gfx.hpp>
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#include <turbine/gfx.hpp>
|
||||
|
||||
#include <nostalgia/glutils/glutils.hpp>
|
||||
#include <glutils/glutils.hpp>
|
||||
|
||||
namespace nostalgia::core::renderer {
|
||||
|
||||
|
@ -21,7 +21,6 @@ target_link_libraries(
|
||||
NostalgiaCore-Studio PUBLIC
|
||||
NostalgiaStudio
|
||||
NostalgiaCore
|
||||
NostalgiaGlUtils
|
||||
lodepng
|
||||
)
|
||||
|
||||
|
@ -4,10 +4,12 @@
|
||||
|
||||
#include <imgui.h>
|
||||
|
||||
#include <nostalgia/core/gfx.hpp>
|
||||
#include <keel/media.hpp>
|
||||
#include <ox/std/memory.hpp>
|
||||
|
||||
#include <keel/media.hpp>
|
||||
|
||||
#include <nostalgia/core/gfx.hpp>
|
||||
|
||||
#include "paletteeditor.hpp"
|
||||
#include "paletteeditor-imgui.hpp"
|
||||
|
||||
|
@ -7,7 +7,8 @@
|
||||
#include <ox/model/def.hpp>
|
||||
#include <ox/std/vec.hpp>
|
||||
|
||||
#include <nostalgia/glutils/glutils.hpp>
|
||||
#include <glutils/glutils.hpp>
|
||||
|
||||
#include <nostalgia/studio/studio.hpp>
|
||||
|
||||
#include "tilesheetpixelgrid.hpp"
|
||||
|
@ -7,8 +7,9 @@
|
||||
#include <ox/std/vec.hpp>
|
||||
#include <ox/model/def.hpp>
|
||||
|
||||
#include <glutils/glutils.hpp>
|
||||
|
||||
#include <nostalgia/core/gfx.hpp>
|
||||
#include <nostalgia/glutils/glutils.hpp>
|
||||
#include <nostalgia/studio/studio.hpp>
|
||||
|
||||
#include "tilesheeteditormodel.hpp"
|
||||
|
@ -4,8 +4,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <glutils/glutils.hpp>
|
||||
|
||||
#include <nostalgia/core/gfx.hpp>
|
||||
#include <nostalgia/glutils/glutils.hpp>
|
||||
#include <nostalgia/studio/studio.hpp>
|
||||
|
||||
namespace nostalgia::core {
|
||||
|
@ -6,8 +6,9 @@
|
||||
|
||||
#include <ox/std/vec.hpp>
|
||||
|
||||
#include <glutils/glutils.hpp>
|
||||
|
||||
#include <nostalgia/core/gfx.hpp>
|
||||
#include <nostalgia/glutils/glutils.hpp>
|
||||
#include <nostalgia/studio/studio.hpp>
|
||||
|
||||
namespace nostalgia::core {
|
||||
|
@ -1,21 +0,0 @@
|
||||
add_library(
|
||||
NostalgiaGlUtils OBJECT
|
||||
glutils.cpp
|
||||
)
|
||||
|
||||
if(NOT MSVC)
|
||||
target_compile_options(NostalgiaGlUtils PRIVATE -Wsign-conversion)
|
||||
endif()
|
||||
|
||||
target_link_libraries(
|
||||
NostalgiaGlUtils PUBLIC
|
||||
OxStd
|
||||
glad
|
||||
)
|
||||
|
||||
install(
|
||||
FILES
|
||||
glutils.hpp
|
||||
DESTINATION
|
||||
include/nostalgia/glutils
|
||||
)
|
@ -12,7 +12,6 @@ endif()
|
||||
|
||||
target_link_libraries(
|
||||
NostalgiaScene-Studio PUBLIC
|
||||
NostalgiaGlUtils
|
||||
NostalgiaStudio
|
||||
NostalgiaScene
|
||||
)
|
||||
|
@ -4,8 +4,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <glutils/glutils.hpp>
|
||||
|
||||
#include <nostalgia/core/gfx.hpp>
|
||||
#include <nostalgia/glutils/glutils.hpp>
|
||||
#include <nostalgia/scene/scene.hpp>
|
||||
|
||||
namespace nostalgia::scene {
|
||||
|
Loading…
x
Reference in New Issue
Block a user