trimming things
This commit is contained in:
parent
596affe488
commit
4063105847
7
Makefile
7
Makefile
@ -64,8 +64,12 @@ LINKS += $(UF_LIBS) $(EXT_LIBS) $(DEPS)
|
|||||||
DEPS +=
|
DEPS +=
|
||||||
FLAGS +=
|
FLAGS +=
|
||||||
|
|
||||||
|
ifneq (,$(findstring -DUF_DEBUG,$(FLAGS)))
|
||||||
|
REQ_DEPS += meshoptimizer toml xatlas curl ffx:fsr cpptrace # ncurses openvr draco discord bullet ultralight-ux
|
||||||
|
FLAGS += -g
|
||||||
|
endif
|
||||||
ifneq (,$(findstring win64,$(ARCH)))
|
ifneq (,$(findstring win64,$(ARCH)))
|
||||||
REQ_DEPS += $(RENDERER) json:nlohmann toml png zlib luajit reactphysics meshoptimizer xatlas simd ctti gltf imgui fmt curl freetype openal ogg ffx:fsr cpptrace # ncurses openvr draco discord bullet ultralight-ux
|
REQ_DEPS += $(RENDERER) json:nlohmann png zlib luajit reactphysics simd ctti gltf imgui fmt freetype openal ogg # meshoptimizer toml xatlas curl ffx:fsr cpptrace # ncurses openvr draco discord bullet ultralight-ux
|
||||||
FLAGS += -DUF_ENV_WINDOWS -DUF_ENV_WIN64 -DWIN32_LEAN_AND_MEAN
|
FLAGS += -DUF_ENV_WINDOWS -DUF_ENV_WIN64 -DWIN32_LEAN_AND_MEAN
|
||||||
DEPS += -lgdi32 -ldwmapi
|
DEPS += -lgdi32 -ldwmapi
|
||||||
LINKS += #-Wl,-subsystem,windows
|
LINKS += #-Wl,-subsystem,windows
|
||||||
@ -122,6 +126,7 @@ ifneq (,$(findstring imgui,$(REQ_DEPS)))
|
|||||||
INCS += -I./dep/include/imgui/backends
|
INCS += -I./dep/include/imgui/backends
|
||||||
endif
|
endif
|
||||||
ifneq (,$(findstring cpptrace,$(REQ_DEPS)))
|
ifneq (,$(findstring cpptrace,$(REQ_DEPS)))
|
||||||
|
FLAGS += -DUF_USE_CPPTRACE
|
||||||
DEPS += -lcpptrace
|
DEPS += -lcpptrace
|
||||||
endif
|
endif
|
||||||
ifneq (,$(findstring json,$(REQ_DEPS)))
|
ifneq (,$(findstring json,$(REQ_DEPS)))
|
||||||
|
|||||||
@ -5,12 +5,10 @@ local metadata = ent:getComponent("Metadata")
|
|||||||
local masterdata = scene:getComponent("Metadata")
|
local masterdata = scene:getComponent("Metadata")
|
||||||
|
|
||||||
local children = {
|
local children = {
|
||||||
mainText = ent:loadChild("./main-text.json",true),
|
|
||||||
circleOut = ent:loadChild("./circle-out.json",true),
|
circleOut = ent:loadChild("./circle-out.json",true),
|
||||||
circleIn = ent:loadChild("./circle-in.json",true),
|
circleIn = ent:loadChild("./circle-in.json",true),
|
||||||
coverBar = ent:loadChild("./yellow-box.json",true),
|
coverBar = ent:loadChild("./yellow-box.json",true),
|
||||||
commandText = ent:loadChild("./command-text.json",true),
|
commandText = ent:loadChild("./command-text.json",true),
|
||||||
tenkouseiOption = ent:loadChild("./tenkousei.json",true),
|
|
||||||
closeOption = ent:loadChild("./close.json",true),
|
closeOption = ent:loadChild("./close.json",true),
|
||||||
quit = ent:loadChild("./quit.json",true),
|
quit = ent:loadChild("./quit.json",true),
|
||||||
}
|
}
|
||||||
@ -43,7 +41,6 @@ destination(children.circleOut, nil, -2, 0)
|
|||||||
destination(children.circleIn, nil, 2, 0)
|
destination(children.circleIn, nil, 2, 0)
|
||||||
destination(children.coverBar, -1.5, nil, 0)
|
destination(children.coverBar, -1.5, nil, 0)
|
||||||
destination(children.commandText, -1.5, nil, 0)
|
destination(children.commandText, -1.5, nil, 0)
|
||||||
destination(children.tenkouseiOption, -1.5, nil, 0)
|
|
||||||
destination(children.closeOption, -1.5, nil, 0)
|
destination(children.closeOption, -1.5, nil, 0)
|
||||||
destination(children.quit, -1.5, nil, 0)
|
destination(children.quit, -1.5, nil, 0)
|
||||||
|
|
||||||
@ -122,16 +119,6 @@ if os.arch() == "Dreamcast" then
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- main text
|
|
||||||
local child = children.mainText
|
|
||||||
if child:uid() > 0 then
|
|
||||||
local transform = child:getComponent("Transform")
|
|
||||||
local speed = 0.5
|
|
||||||
transform.position.y = transform.position.y + time.delta() * speed
|
|
||||||
if transform.position.y > 2 then
|
|
||||||
transform.position.y = -2
|
|
||||||
end
|
|
||||||
end
|
|
||||||
-- circle in
|
-- circle in
|
||||||
if children.circleIn:uid() > 0 then
|
if children.circleIn:uid() > 0 then
|
||||||
local static = Static.get( children.circleIn )
|
local static = Static.get( children.circleIn )
|
||||||
@ -237,17 +224,6 @@ else
|
|||||||
::continue::
|
::continue::
|
||||||
end
|
end
|
||||||
|
|
||||||
-- main text
|
|
||||||
local child = children.mainText
|
|
||||||
if child:uid() > 0 then
|
|
||||||
local transform = child:getComponent("Transform")
|
|
||||||
local metadata = child:getComponent("Metadata")
|
|
||||||
local speed = metadata["hovered"] and 0.75 or 0.5
|
|
||||||
transform.position.y = transform.position.y + time.delta() * speed
|
|
||||||
if transform.position.y > 2 then
|
|
||||||
transform.position.y = -2
|
|
||||||
end
|
|
||||||
end
|
|
||||||
-- circle in
|
-- circle in
|
||||||
if children.circleIn:uid() > 0 then
|
if children.circleIn:uid() > 0 then
|
||||||
local static = Static.get( children.circleIn )
|
local static = Static.get( children.circleIn )
|
||||||
|
|||||||
@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#include <uf/engine/scene/scene.h>
|
#include <uf/engine/scene/scene.h>
|
||||||
|
|
||||||
|
#if UF_USE_CPPTRACE
|
||||||
#include <cpptrace/cpptrace.hpp>
|
#include <cpptrace/cpptrace.hpp>
|
||||||
|
|
||||||
#define VK_REGISTER_HANDLE( handle ) if ( ext::vulkan::settings::validation::checkpoints ) {\
|
#define VK_REGISTER_HANDLE( handle ) if ( ext::vulkan::settings::validation::checkpoints ) {\
|
||||||
VK_VALIDATION_MESSAGE("Registered handle: {}: {}", TYPE_NAME(decltype(handle)), (void*) handle);\
|
VK_VALIDATION_MESSAGE("Registered handle: {}: {}", TYPE_NAME(decltype(handle)), (void*) handle);\
|
||||||
uf::stl::string id = ::fmt::format("{}: {}", cpptrace::generate_trace().to_string(), TYPE_NAME(decltype(*this)));\
|
uf::stl::string id = ::fmt::format("{}: {}", cpptrace::generate_trace().to_string(), TYPE_NAME(decltype(*this)));\
|
||||||
@ -19,6 +19,10 @@
|
|||||||
VK_VALIDATION_MESSAGE("Unregistered handle: {}: {}", TYPE_NAME(decltype(handle)), (void*) handle);\
|
VK_VALIDATION_MESSAGE("Unregistered handle: {}: {}", TYPE_NAME(decltype(handle)), (void*) handle);\
|
||||||
ext::vulkan::Resource<std::remove_cvref_t<decltype(handle)>>::remove( handle );\
|
ext::vulkan::Resource<std::remove_cvref_t<decltype(handle)>>::remove( handle );\
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
#define VK_REGISTER_HANDLE( X ) {};
|
||||||
|
#define VK_UNREGISTER_HANDLE( X ) {};
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace ext {
|
namespace ext {
|
||||||
namespace vulkan {
|
namespace vulkan {
|
||||||
|
|||||||
@ -113,6 +113,7 @@ namespace uf {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if UF_USE_CLASS_OF_PODS
|
||||||
namespace uf {
|
namespace uf {
|
||||||
template<typename T = pod::Math::num_t, std::size_t R = 4, std::size_t C = R>
|
template<typename T = pod::Math::num_t, std::size_t R = 4, std::size_t C = R>
|
||||||
class /*UF_API*/ Matrix {
|
class /*UF_API*/ Matrix {
|
||||||
@ -186,6 +187,7 @@ namespace uf {
|
|||||||
typedef Matrix4t<> Matrix4;
|
typedef Matrix4t<> Matrix4;
|
||||||
typedef Matrix4t<float> Matrix4f;
|
typedef Matrix4t<float> Matrix4f;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
namespace uf {
|
namespace uf {
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
#include "pod.inl"
|
#include "pod.inl"
|
||||||
#include "class.inl"
|
#if UF_USE_CLASS_OF_PODS
|
||||||
|
#include "class.inl"
|
||||||
|
#endif
|
||||||
|
|
||||||
template<typename T, size_t R, size_t C>
|
template<typename T, size_t R, size_t C>
|
||||||
uf::stl::string /*UF_API*/ uf::string::toString( const pod::Matrix<T,R,C>& m ) {
|
uf::stl::string /*UF_API*/ uf::string::toString( const pod::Matrix<T,R,C>& m ) {
|
||||||
|
|||||||
@ -66,6 +66,7 @@ namespace uf {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if UF_USE_CLASS_OF_PODS
|
||||||
namespace uf {
|
namespace uf {
|
||||||
template<typename T = pod::Math::num_t>
|
template<typename T = pod::Math::num_t>
|
||||||
class /*UF_API*/ Quaternion {
|
class /*UF_API*/ Quaternion {
|
||||||
@ -160,7 +161,7 @@ public:
|
|||||||
inline operator const pod_t&() const { return this->m_pod; }
|
inline operator const pod_t&() const { return this->m_pod; }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "quaternion/quaternion.inl"
|
#include "quaternion/quaternion.inl"
|
||||||
#ifdef UF_USE_GLM_TMP
|
#ifdef UF_USE_GLM_TMP
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "pod.inl"
|
#include "pod.inl"
|
||||||
#include "class.inl"
|
#if UF_USE_CLASS_OF_PODS
|
||||||
|
#include "class.inl"
|
||||||
|
#endif
|
||||||
@ -185,7 +185,7 @@ namespace uf {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if UF_USE_CLASS_OF_PODS
|
||||||
namespace uf {
|
namespace uf {
|
||||||
// Provides operations for POD vector
|
// Provides operations for POD vector
|
||||||
template<typename T = pod::Math::num_t, size_t N = 3>
|
template<typename T = pod::Math::num_t, size_t N = 3>
|
||||||
@ -320,6 +320,7 @@ namespace uf {
|
|||||||
typedef Vector4t<float> Vector4f;
|
typedef Vector4t<float> Vector4f;
|
||||||
typedef Vector4t<double> Vector4d;
|
typedef Vector4t<double> Vector4d;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
//#include <uf/utils/string/ext.h>
|
//#include <uf/utils/string/ext.h>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|||||||
@ -618,6 +618,7 @@ pod::Vector<T,4>& pod::Vector<T,4>::operator=( const pod::Vector<U,M>& vector )
|
|||||||
return *this = uf::vector::cast<T,4>(vector);
|
return *this = uf::vector::cast<T,4>(vector);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
#if UF_USE_CLASS_OF_PODS
|
||||||
namespace uf {
|
namespace uf {
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct /*UF_API*/ Vector<T,1> {
|
struct /*UF_API*/ Vector<T,1> {
|
||||||
@ -1971,4 +1972,5 @@ inline bool uf::Vector<T,4>::operator>( const uf::Vector<T,4>& vector ) const {
|
|||||||
template<typename T> // Equality check between two vectors (greater than or equals)
|
template<typename T> // Equality check between two vectors (greater than or equals)
|
||||||
inline bool uf::Vector<T,4>::operator>=( const uf::Vector<T,4>& vector ) const {
|
inline bool uf::Vector<T,4>::operator>=( const uf::Vector<T,4>& vector ) const {
|
||||||
return uf::vector::compareTo(this->m_pod, vector.data() ) >= 0;
|
return uf::vector::compareTo(this->m_pod, vector.data() ) >= 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
@ -1,5 +1,7 @@
|
|||||||
#include "pod.inl"
|
#include "pod.inl"
|
||||||
#include "class.inl"
|
#if UF_USE_CLASS_OF_PODS
|
||||||
|
#include "class.inl"
|
||||||
|
#endif
|
||||||
|
|
||||||
template<typename T, size_t N>
|
template<typename T, size_t N>
|
||||||
uf::stl::string /*UF_API*/ uf::string::toString( const pod::Vector<T,N>& v ) {
|
uf::stl::string /*UF_API*/ uf::string::toString( const pod::Vector<T,N>& v ) {
|
||||||
|
|||||||
@ -361,6 +361,7 @@ if ( meshgrid.grid.divisions.x > 1 || meshgrid.grid.divisions.y > 1 || meshgrid.
|
|||||||
}
|
}
|
||||||
|
|
||||||
// optimize each meshlet if requested
|
// optimize each meshlet if requested
|
||||||
|
#if UF_USE_MESHOPT
|
||||||
if ( meshopt.should ) {
|
if ( meshopt.should ) {
|
||||||
for ( auto& meshlet : meshlets ) {
|
for ( auto& meshlet : meshlets ) {
|
||||||
if ( !ext::meshopt::optimize( meshlet, meshopt.simplify, meshopt.level, meshopt.print ) ) {
|
if ( !ext::meshopt::optimize( meshlet, meshopt.simplify, meshopt.level, meshopt.print ) ) {
|
||||||
@ -368,6 +369,7 @@ if ( meshopt.should ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
{
|
{
|
||||||
size_t indexID = 0;
|
size_t indexID = 0;
|
||||||
|
|||||||
@ -35,7 +35,6 @@ const uf::stl::string ext::vulkan::DeferredRenderMode::getType() const {
|
|||||||
return "Deferred";
|
return "Deferred";
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <cpptrace/cpptrace.hpp>
|
|
||||||
|
|
||||||
void ext::vulkan::DeferredRenderMode::initialize( Device& device ) {
|
void ext::vulkan::DeferredRenderMode::initialize( Device& device ) {
|
||||||
ext::vulkan::RenderMode::initialize( device );
|
ext::vulkan::RenderMode::initialize( device );
|
||||||
|
|||||||
@ -14,11 +14,15 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
|
||||||
|
#if UF_USE_CPPTRACE
|
||||||
#define VK_REGISTER_HANDLE( handle ) if ( ext::vulkan::settings::validation::checkpoints ) {\
|
#define VK_REGISTER_HANDLE( handle ) if ( ext::vulkan::settings::validation::checkpoints ) {\
|
||||||
VK_VALIDATION_MESSAGE("Registered handle: {}: {}", TYPE_NAME(decltype(handle)), (void*) handle);\
|
VK_VALIDATION_MESSAGE("Registered handle: {}: {}", TYPE_NAME(decltype(handle)), (void*) handle);\
|
||||||
uf::stl::string id = cpptrace::generate_trace().to_string();\
|
uf::stl::string id = cpptrace::generate_trace().to_string();\
|
||||||
ext::vulkan::Resource<std::remove_cvref_t<decltype(handle)>>::add( handle, id ); \
|
ext::vulkan::Resource<std::remove_cvref_t<decltype(handle)>>::add( handle, id ); \
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
#define VK_REGISTER_HANDLE( X ) {};
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
struct {
|
struct {
|
||||||
|
|||||||
@ -4,7 +4,7 @@ CC = gcc
|
|||||||
CXX = $(KOS_CCPLUS)
|
CXX = $(KOS_CCPLUS)
|
||||||
RENDERER = opengl
|
RENDERER = opengl
|
||||||
TARGET_EXTENSION = elf
|
TARGET_EXTENSION = elf
|
||||||
OPTIMIZATIONS = -Os -g -ffunction-sections -fdata-sections -Wl,--gc-sections -fstrict-aliasing -ffast-math -fno-unroll-all-loops -fno-optimize-sibling-calls -fschedule-insns2 -fomit-frame-pointer -DUF_NO_EXCEPTIONS -fno-exceptions #-flto
|
OPTIMIZATIONS = -Os -ffunction-sections -fdata-sections -Wl,--gc-sections -fstrict-aliasing -ffast-math -fno-unroll-all-loops -fno-optimize-sibling-calls -fschedule-insns2 -fomit-frame-pointer -DUF_NO_EXCEPTIONS -fno-exceptions # -g # -flto
|
||||||
WARNINGS = -Wno-attributes -Wno-conversion-null
|
WARNINGS = -Wno-attributes -Wno-conversion-null
|
||||||
FLAGS += $(KOS_CPPFLAGS) -std=c++17 $(OPTIMIZATIONS) $(WARNINGS) -fdiagnostics-color=always
|
FLAGS += $(KOS_CPPFLAGS) -std=c++17 $(OPTIMIZATIONS) $(WARNINGS) -fdiagnostics-color=always
|
||||||
INCS += $(KOS_INC_PATHS) -I/opt/dreamcast/sh-elf/sh-elf/include
|
INCS += $(KOS_INC_PATHS) -I/opt/dreamcast/sh-elf/sh-elf/include
|
||||||
|
|||||||
@ -2,6 +2,6 @@ ARCH = win64
|
|||||||
CDIR =
|
CDIR =
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CXX = g++
|
CXX = g++
|
||||||
OPTIMIZATIONS = -O3 -g -fstrict-aliasing -DUF_NO_EXCEPTIONS # -march=native # -flto
|
OPTIMIZATIONS = -O3 -fstrict-aliasing -DUF_NO_EXCEPTIONS # -g # -march=native # -flto
|
||||||
WARNINGS = -Wall -Wno-unknown-pragmas -Wno-unused-function -Wno-unused-variable -Wno-switch -Wno-reorder -Wno-sign-compare -Wno-unused-but-set-variable -Wno-ignored-attributes -Wno-narrowing -Wno-misleading-indentation
|
WARNINGS = -Wall -Wno-unknown-pragmas -Wno-unused-function -Wno-unused-variable -Wno-switch -Wno-reorder -Wno-sign-compare -Wno-unused-but-set-variable -Wno-ignored-attributes -Wno-narrowing -Wno-misleading-indentation
|
||||||
FLAGS += -std=c++2b $(OPTIMIZATIONS) $(WARNINGS) -fdiagnostics-color=always
|
FLAGS += -std=c++2b $(OPTIMIZATIONS) $(WARNINGS) -fdiagnostics-color=always
|
||||||
Loading…
Reference in New Issue
Block a user