mirror of https://github.com/auygun/kaliber.git
Move asset loaders to engine/asset
This commit is contained in:
parent
709029f22c
commit
615c39a4fe
|
@ -61,16 +61,18 @@ add_library(kaliber SHARED
|
||||||
../../../src/demo/sky_quad.cc
|
../../../src/demo/sky_quad.cc
|
||||||
../../../src/engine/animatable.cc
|
../../../src/engine/animatable.cc
|
||||||
../../../src/engine/animator.cc
|
../../../src/engine/animator.cc
|
||||||
|
../../../src/engine/asset/font.cc
|
||||||
|
../../../src/engine/asset/image.cc
|
||||||
|
../../../src/engine/asset/mesh.cc
|
||||||
|
../../../src/engine/asset/shader_source.cc
|
||||||
|
../../../src/engine/asset/sound.cc
|
||||||
../../../src/engine/audio/audio_bus.cc
|
../../../src/engine/audio/audio_bus.cc
|
||||||
../../../src/engine/audio/audio_mixer.cc
|
../../../src/engine/audio/audio_mixer.cc
|
||||||
../../../src/engine/audio/audio_sink_oboe.cc
|
../../../src/engine/audio/audio_sink_oboe.cc
|
||||||
../../../src/engine/audio/sinc_resampler.cc
|
../../../src/engine/audio/sinc_resampler.cc
|
||||||
../../../src/engine/drawable.cc
|
../../../src/engine/drawable.cc
|
||||||
../../../src/engine/engine.cc
|
../../../src/engine/engine.cc
|
||||||
../../../src/engine/font.cc
|
|
||||||
../../../src/engine/image_quad.cc
|
../../../src/engine/image_quad.cc
|
||||||
../../../src/engine/image.cc
|
|
||||||
../../../src/engine/mesh.cc
|
|
||||||
../../../src/engine/persistent_data.cc
|
../../../src/engine/persistent_data.cc
|
||||||
../../../src/engine/platform/asset_file_android.cc
|
../../../src/engine/platform/asset_file_android.cc
|
||||||
../../../src/engine/platform/asset_file.cc
|
../../../src/engine/platform/asset_file.cc
|
||||||
|
@ -86,10 +88,8 @@ add_library(kaliber SHARED
|
||||||
../../../src/engine/renderer/vulkan/renderer_vulkan.cc
|
../../../src/engine/renderer/vulkan/renderer_vulkan.cc
|
||||||
../../../src/engine/renderer/vulkan/vulkan_context_android.cc
|
../../../src/engine/renderer/vulkan/vulkan_context_android.cc
|
||||||
../../../src/engine/renderer/vulkan/vulkan_context.cc
|
../../../src/engine/renderer/vulkan/vulkan_context.cc
|
||||||
../../../src/engine/shader_source.cc
|
|
||||||
../../../src/engine/solid_quad.cc
|
../../../src/engine/solid_quad.cc
|
||||||
../../../src/engine/sound_player.cc
|
../../../src/engine/sound_player.cc
|
||||||
../../../src/engine/sound.cc
|
|
||||||
../../../src/third_party/android/gl3stub.c
|
../../../src/third_party/android/gl3stub.c
|
||||||
../../../src/third_party/android/GLContext.cpp
|
../../../src/third_party/android/GLContext.cpp
|
||||||
../../../src/third_party/glslang/glslang/GenericCodeGen/CodeGen.cpp
|
../../../src/third_party/glslang/glslang/GenericCodeGen/CodeGen.cpp
|
||||||
|
|
|
@ -94,16 +94,18 @@ $(BASE_LIB): $(BASE_OBJS)
|
||||||
ENGINE_SRC := \
|
ENGINE_SRC := \
|
||||||
$(SRC_ROOT)/engine/animatable.cc \
|
$(SRC_ROOT)/engine/animatable.cc \
|
||||||
$(SRC_ROOT)/engine/animator.cc \
|
$(SRC_ROOT)/engine/animator.cc \
|
||||||
|
$(SRC_ROOT)/engine/asset/font.cc \
|
||||||
|
$(SRC_ROOT)/engine/asset/image.cc \
|
||||||
|
$(SRC_ROOT)/engine/asset/mesh.cc \
|
||||||
|
$(SRC_ROOT)/engine/asset/shader_source.cc \
|
||||||
|
$(SRC_ROOT)/engine/asset/sound.cc \
|
||||||
$(SRC_ROOT)/engine/audio/audio_bus.cc \
|
$(SRC_ROOT)/engine/audio/audio_bus.cc \
|
||||||
$(SRC_ROOT)/engine/audio/audio_mixer.cc \
|
$(SRC_ROOT)/engine/audio/audio_mixer.cc \
|
||||||
$(SRC_ROOT)/engine/audio/audio_sink_alsa.cc \
|
$(SRC_ROOT)/engine/audio/audio_sink_alsa.cc \
|
||||||
$(SRC_ROOT)/engine/audio/sinc_resampler.cc \
|
$(SRC_ROOT)/engine/audio/sinc_resampler.cc \
|
||||||
$(SRC_ROOT)/engine/drawable.cc \
|
$(SRC_ROOT)/engine/drawable.cc \
|
||||||
$(SRC_ROOT)/engine/engine.cc \
|
$(SRC_ROOT)/engine/engine.cc \
|
||||||
$(SRC_ROOT)/engine/font.cc \
|
|
||||||
$(SRC_ROOT)/engine/image_quad.cc \
|
$(SRC_ROOT)/engine/image_quad.cc \
|
||||||
$(SRC_ROOT)/engine/image.cc \
|
|
||||||
$(SRC_ROOT)/engine/mesh.cc \
|
|
||||||
$(SRC_ROOT)/engine/persistent_data.cc \
|
$(SRC_ROOT)/engine/persistent_data.cc \
|
||||||
$(SRC_ROOT)/engine/platform/asset_file_linux.cc \
|
$(SRC_ROOT)/engine/platform/asset_file_linux.cc \
|
||||||
$(SRC_ROOT)/engine/platform/asset_file.cc \
|
$(SRC_ROOT)/engine/platform/asset_file.cc \
|
||||||
|
@ -119,10 +121,8 @@ ENGINE_SRC := \
|
||||||
$(SRC_ROOT)/engine/renderer/vulkan/renderer_vulkan.cc \
|
$(SRC_ROOT)/engine/renderer/vulkan/renderer_vulkan.cc \
|
||||||
$(SRC_ROOT)/engine/renderer/vulkan/vulkan_context_linux.cc \
|
$(SRC_ROOT)/engine/renderer/vulkan/vulkan_context_linux.cc \
|
||||||
$(SRC_ROOT)/engine/renderer/vulkan/vulkan_context.cc \
|
$(SRC_ROOT)/engine/renderer/vulkan/vulkan_context.cc \
|
||||||
$(SRC_ROOT)/engine/shader_source.cc \
|
|
||||||
$(SRC_ROOT)/engine/solid_quad.cc \
|
$(SRC_ROOT)/engine/solid_quad.cc \
|
||||||
$(SRC_ROOT)/engine/sound_player.cc \
|
$(SRC_ROOT)/engine/sound_player.cc
|
||||||
$(SRC_ROOT)/engine/sound.cc
|
|
||||||
|
|
||||||
ENGINE_LIB := $(BUILD_DIR)/libengine.a
|
ENGINE_LIB := $(BUILD_DIR)/libengine.a
|
||||||
ENGINE_OBJS := $(call objs_from_src, $(ENGINE_SRC))
|
ENGINE_OBJS := $(call objs_from_src, $(ENGINE_SRC))
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
#include "base/log.h"
|
#include "base/log.h"
|
||||||
#include "base/vecmath.h"
|
#include "base/vecmath.h"
|
||||||
#include "demo/demo.h"
|
#include "demo/demo.h"
|
||||||
|
#include "engine/asset/font.h"
|
||||||
|
#include "engine/asset/image.h"
|
||||||
#include "engine/engine.h"
|
#include "engine/engine.h"
|
||||||
#include "engine/font.h"
|
|
||||||
#include "engine/image.h"
|
|
||||||
#include "engine/input_event.h"
|
#include "engine/input_event.h"
|
||||||
|
|
||||||
using namespace base;
|
using namespace base;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include "base/closure.h"
|
#include "base/closure.h"
|
||||||
#include "engine/animator.h"
|
#include "engine/animator.h"
|
||||||
#include "engine/font.h"
|
#include "engine/asset/font.h"
|
||||||
#include "engine/game.h"
|
#include "engine/game.h"
|
||||||
#include "engine/persistent_data.h"
|
#include "engine/persistent_data.h"
|
||||||
#include "engine/solid_quad.h"
|
#include "engine/solid_quad.h"
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
#include "base/collusion_test.h"
|
#include "base/collusion_test.h"
|
||||||
#include "base/interpolation.h"
|
#include "base/interpolation.h"
|
||||||
#include "base/log.h"
|
#include "base/log.h"
|
||||||
|
#include "engine/asset/font.h"
|
||||||
|
#include "engine/asset/image.h"
|
||||||
#include "engine/engine.h"
|
#include "engine/engine.h"
|
||||||
#include "engine/font.h"
|
|
||||||
#include "engine/image.h"
|
|
||||||
#include "engine/renderer/geometry.h"
|
#include "engine/renderer/geometry.h"
|
||||||
|
|
||||||
#include "demo/demo.h"
|
#include "demo/demo.h"
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
#include "base/interpolation.h"
|
#include "base/interpolation.h"
|
||||||
#include "base/log.h"
|
#include "base/log.h"
|
||||||
#include "base/vecmath.h"
|
#include "base/vecmath.h"
|
||||||
|
#include "engine/asset/font.h"
|
||||||
|
#include "engine/asset/image.h"
|
||||||
#include "engine/engine.h"
|
#include "engine/engine.h"
|
||||||
#include "engine/font.h"
|
|
||||||
#include "engine/image.h"
|
|
||||||
|
|
||||||
#include "demo/demo.h"
|
#include "demo/demo.h"
|
||||||
|
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
#include "base/collusion_test.h"
|
#include "base/collusion_test.h"
|
||||||
#include "base/interpolation.h"
|
#include "base/interpolation.h"
|
||||||
#include "base/log.h"
|
#include "base/log.h"
|
||||||
|
#include "engine/asset/font.h"
|
||||||
|
#include "engine/asset/image.h"
|
||||||
|
#include "engine/asset/sound.h"
|
||||||
#include "engine/engine.h"
|
#include "engine/engine.h"
|
||||||
#include "engine/font.h"
|
|
||||||
#include "engine/image.h"
|
|
||||||
#include "engine/input_event.h"
|
#include "engine/input_event.h"
|
||||||
#include "engine/renderer/renderer.h"
|
#include "engine/renderer/renderer.h"
|
||||||
#include "engine/sound.h"
|
|
||||||
|
|
||||||
#include "demo/demo.h"
|
#include "demo/demo.h"
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
#include "base/interpolation.h"
|
#include "base/interpolation.h"
|
||||||
#include "base/log.h"
|
#include "base/log.h"
|
||||||
|
#include "engine/asset/font.h"
|
||||||
#include "engine/engine.h"
|
#include "engine/engine.h"
|
||||||
#include "engine/font.h"
|
|
||||||
#include "engine/input_event.h"
|
#include "engine/input_event.h"
|
||||||
|
|
||||||
#include "demo/demo.h"
|
#include "demo/demo.h"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include "engine/font.h"
|
#include "engine/asset/font.h"
|
||||||
|
|
||||||
#include <codecvt>
|
#include <codecvt>
|
||||||
#include <locale>
|
#include <locale>
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#define STB_TRUETYPE_IMPLEMENTATION
|
#define STB_TRUETYPE_IMPLEMENTATION
|
||||||
#define STBTT_STATIC
|
#define STBTT_STATIC
|
||||||
#include "../third_party/stb/stb_truetype.h"
|
#include "third_party/stb/stb_truetype.h"
|
||||||
|
|
||||||
namespace eng {
|
namespace eng {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef ENGINE_FONT_H
|
#ifndef ENGINE_ASSET_FONT_H
|
||||||
#define ENGINE_FONT_H
|
#define ENGINE_ASSET_FONT_H
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
@ -51,4 +51,4 @@ class Font {
|
||||||
|
|
||||||
} // namespace eng
|
} // namespace eng
|
||||||
|
|
||||||
#endif // ENGINE_FONT_H
|
#endif // ENGINE_ASSET_FONT_H
|
|
@ -1,4 +1,4 @@
|
||||||
#include "engine/image.h"
|
#include "engine/asset/image.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
// This 3rd party library is written in C and uses malloc, which means that we
|
// This 3rd party library is written in C and uses malloc, which means that we
|
||||||
// have to do the same.
|
// have to do the same.
|
||||||
#include "../third_party/stb/stb_image.h"
|
#include "third_party/stb/stb_image.h"
|
||||||
|
|
||||||
using namespace base;
|
using namespace base;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef ENGINE_IMAGE_H
|
#ifndef ENGINE_ASSET_IMAGE_H
|
||||||
#define ENGINE_IMAGE_H
|
#define ENGINE_ASSET_IMAGE_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -56,4 +56,4 @@ class Image {
|
||||||
|
|
||||||
} // namespace eng
|
} // namespace eng
|
||||||
|
|
||||||
#endif // ENGINE_IMAGE_H
|
#endif // ENGINE_ASSET_IMAGE_H
|
|
@ -1,4 +1,4 @@
|
||||||
#include "engine/mesh.h"
|
#include "engine/asset/mesh.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef ENGINE_MESH_H
|
#ifndef ENGINE_ASSET_MESH_H
|
||||||
#define ENGINE_MESH_H
|
#define ENGINE_ASSET_MESH_H
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -51,4 +51,4 @@ class Mesh {
|
||||||
|
|
||||||
} // namespace eng
|
} // namespace eng
|
||||||
|
|
||||||
#endif // ENGINE_MESH_H
|
#endif // ENGINE_ASSET_MESH_H
|
|
@ -1,4 +1,4 @@
|
||||||
#include "engine/shader_source.h"
|
#include "engine/asset/shader_source.h"
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef ENGINE_SHADER_CODE_H
|
#ifndef ENGINE_ASSET_SHADER_CODE_H
|
||||||
#define ENGINE_SHADER_CODE_H
|
#define ENGINE_ASSET_SHADER_CODE_H
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -38,4 +38,4 @@ class ShaderSource {
|
||||||
|
|
||||||
} // namespace eng
|
} // namespace eng
|
||||||
|
|
||||||
#endif // ENGINE_SHADER_CODE_H
|
#endif // ENGINE_ASSET_SHADER_CODE_H
|
|
@ -1,4 +1,4 @@
|
||||||
#include "engine/sound.h"
|
#include "engine/asset/sound.h"
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef ENGINE_SOUND_H
|
#ifndef ENGINE_ASSET_SOUND_H
|
||||||
#define ENGINE_SOUND_H
|
#define ENGINE_ASSET_SOUND_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
@ -43,4 +43,4 @@ class Sound final : public AudioBus {
|
||||||
|
|
||||||
} // namespace eng
|
} // namespace eng
|
||||||
|
|
||||||
#endif // ENGINE_SOUND_H
|
#endif // ENGINE_ASSET_SOUND_H
|
|
@ -3,15 +3,17 @@
|
||||||
#include "base/log.h"
|
#include "base/log.h"
|
||||||
#include "base/task_runner.h"
|
#include "base/task_runner.h"
|
||||||
#include "engine/animator.h"
|
#include "engine/animator.h"
|
||||||
|
#include "engine/asset/font.h"
|
||||||
|
#include "engine/asset/image.h"
|
||||||
|
#include "engine/asset/mesh.h"
|
||||||
|
#include "engine/asset/shader_source.h"
|
||||||
|
#include "engine/asset/sound.h"
|
||||||
#include "engine/audio/audio_mixer.h"
|
#include "engine/audio/audio_mixer.h"
|
||||||
#include "engine/drawable.h"
|
#include "engine/drawable.h"
|
||||||
#include "engine/font.h"
|
|
||||||
#include "engine/game.h"
|
#include "engine/game.h"
|
||||||
#include "engine/game_factory.h"
|
#include "engine/game_factory.h"
|
||||||
#include "engine/image.h"
|
|
||||||
#include "engine/image_quad.h"
|
#include "engine/image_quad.h"
|
||||||
#include "engine/input_event.h"
|
#include "engine/input_event.h"
|
||||||
#include "engine/mesh.h"
|
|
||||||
#include "engine/platform/platform.h"
|
#include "engine/platform/platform.h"
|
||||||
#include "engine/renderer/geometry.h"
|
#include "engine/renderer/geometry.h"
|
||||||
#include "engine/renderer/opengl/renderer_opengl.h"
|
#include "engine/renderer/opengl/renderer_opengl.h"
|
||||||
|
@ -19,8 +21,6 @@
|
||||||
#include "engine/renderer/shader.h"
|
#include "engine/renderer/shader.h"
|
||||||
#include "engine/renderer/texture.h"
|
#include "engine/renderer/texture.h"
|
||||||
#include "engine/renderer/vulkan/renderer_vulkan.h"
|
#include "engine/renderer/vulkan/renderer_vulkan.h"
|
||||||
#include "engine/shader_source.h"
|
|
||||||
#include "engine/sound.h"
|
|
||||||
#include "third_party/texture_compressor/texture_compressor.h"
|
#include "third_party/texture_compressor/texture_compressor.h"
|
||||||
|
|
||||||
using namespace base;
|
using namespace base;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "engine/renderer/geometry.h"
|
#include "engine/renderer/geometry.h"
|
||||||
|
|
||||||
#include "engine/mesh.h"
|
#include "engine/asset/mesh.h"
|
||||||
#include "engine/renderer/renderer.h"
|
#include "engine/renderer/renderer.h"
|
||||||
|
|
||||||
namespace eng {
|
namespace eng {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#include "engine/renderer/opengl/render_command.h"
|
#include "engine/renderer/opengl/render_command.h"
|
||||||
|
|
||||||
#include "engine/image.h"
|
#include "engine/asset/image.h"
|
||||||
#include "engine/mesh.h"
|
#include "engine/asset/mesh.h"
|
||||||
#include "engine/shader_source.h"
|
#include "engine/asset/shader_source.h"
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#define RENDER_COMMAND_IMPL(NAME, GLOBAL) \
|
#define RENDER_COMMAND_IMPL(NAME, GLOBAL) \
|
||||||
|
|
|
@ -13,13 +13,13 @@
|
||||||
#ifdef THREADED_RENDERING
|
#ifdef THREADED_RENDERING
|
||||||
#include "base/task_runner.h"
|
#include "base/task_runner.h"
|
||||||
#endif // THREADED_RENDERING
|
#endif // THREADED_RENDERING
|
||||||
#include "engine/image.h"
|
#include "engine/asset/image.h"
|
||||||
#include "engine/mesh.h"
|
#include "engine/asset/mesh.h"
|
||||||
|
#include "engine/asset/shader_source.h"
|
||||||
#include "engine/renderer/geometry.h"
|
#include "engine/renderer/geometry.h"
|
||||||
#include "engine/renderer/opengl/render_command.h"
|
#include "engine/renderer/opengl/render_command.h"
|
||||||
#include "engine/renderer/shader.h"
|
#include "engine/renderer/shader.h"
|
||||||
#include "engine/renderer/texture.h"
|
#include "engine/renderer/texture.h"
|
||||||
#include "engine/shader_source.h"
|
|
||||||
|
|
||||||
using namespace base;
|
using namespace base;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "engine/renderer/shader.h"
|
#include "engine/renderer/shader.h"
|
||||||
|
|
||||||
|
#include "engine/asset/shader_source.h"
|
||||||
#include "engine/renderer/renderer.h"
|
#include "engine/renderer/renderer.h"
|
||||||
#include "engine/shader_source.h"
|
|
||||||
|
|
||||||
using namespace base;
|
using namespace base;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include "engine/renderer/texture.h"
|
#include "engine/renderer/texture.h"
|
||||||
|
|
||||||
#include "base/log.h"
|
#include "base/log.h"
|
||||||
#include "engine//image.h"
|
#include "engine/asset/image.h"
|
||||||
#include "engine/renderer/renderer.h"
|
#include "engine/renderer/renderer.h"
|
||||||
|
|
||||||
namespace eng {
|
namespace eng {
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
|
|
||||||
#include "base/log.h"
|
#include "base/log.h"
|
||||||
#include "base/vecmath.h"
|
#include "base/vecmath.h"
|
||||||
#include "engine/image.h"
|
#include "engine/asset/image.h"
|
||||||
#include "engine/mesh.h"
|
#include "engine/asset/mesh.h"
|
||||||
|
#include "engine/asset/shader_source.h"
|
||||||
#include "engine/renderer/geometry.h"
|
#include "engine/renderer/geometry.h"
|
||||||
#include "engine/renderer/shader.h"
|
#include "engine/renderer/shader.h"
|
||||||
#include "engine/renderer/texture.h"
|
#include "engine/renderer/texture.h"
|
||||||
#include "engine/shader_source.h"
|
|
||||||
#include "third_party/glslang/SPIRV/GlslangToSpv.h"
|
#include "third_party/glslang/SPIRV/GlslangToSpv.h"
|
||||||
#include "third_party/glslang/glslang/Include/ResourceLimits.h"
|
#include "third_party/glslang/glslang/Include/ResourceLimits.h"
|
||||||
#include "third_party/glslang/glslang/Include/Types.h"
|
#include "third_party/glslang/glslang/Include/Types.h"
|
||||||
|
|
Loading…
Reference in New Issue