Skip to content

Commit

Permalink
Add extension 'DrawNodeEx' aka 'DrawNode v2' (#1568)
Browse files Browse the repository at this point in the history
  • Loading branch information
aismann authored Jan 4, 2024
1 parent 4f0e18a commit 70fa887
Show file tree
Hide file tree
Showing 14 changed files with 3,337 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- AX_ENABLE_EXT_EFFEKSEER: the effekseer extension, default: `FALSE`
- AX_ENABLE_EXT_JSONDEFAULT: the UserDefault based on json, default: `FALSE`
- AX_ENABLE_EXT_LUA: the lua extension, default: `TRUE`
- AX_ENABLE_EXT_DRAWNODEEX: the DrawNodeEx extension, default: `TRUE`
- AX_WITH_XXX: usually user don't need care it
- AX_VS_DEPLOYMENT_TARGET: specify windows store deploy target, default: `10.0.17763.0`
- AX_USE_COMPAT_GL: whether use compat gl as renderer backend, default: win32: `TRUE`, others: `FALSE`
Expand Down
2 changes: 2 additions & 0 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ option(AX_DISABLE_GLES2 "Whether disable GLES2 support" OFF)

option(AX_ENABLE_EXT_JSONDEFAULT "Build extension JSONDefault" ON)

option(AX_ENABLE_EXT_DRAWNODEEX "Build extension DrawNodeEx" ON)

if(XCODE)
# set(CMAKE_BUILD_WITH_INSTALL_RPATH YES)
# set(CMAKE_INSTALL_RPATH "@executable_path/Frameworks")
Expand Down
3 changes: 3 additions & 0 deletions core/base/Types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ Color4F operator/(Color4F lhs, float rhs)
* Color constants
*/


const Color3B Color3B::WHITE(255, 255, 255);
const Color3B Color3B::YELLOW(255, 255, 0);
const Color3B Color3B::GREEN(0, 255, 0);
Expand All @@ -263,6 +264,7 @@ const Color4B Color4B::MAGENTA(255, 0, 255, 255);
const Color4B Color4B::BLACK(0, 0, 0, 255);
const Color4B Color4B::ORANGE(255, 127, 0, 255);
const Color4B Color4B::GRAY(166, 166, 166, 255);
const Color4B Color4B::AX_TRANSPARENT(0, 0, 0, 0);

const Color4F Color4F::WHITE(1, 1, 1, 1);
const Color4F Color4F::YELLOW(1, 1, 0, 1);
Expand All @@ -273,6 +275,7 @@ const Color4F Color4F::MAGENTA(1, 0, 1, 1);
const Color4F Color4F::BLACK(0, 0, 0, 1);
const Color4F Color4F::ORANGE(1, 0.5f, 0, 1);
const Color4F Color4F::GRAY(0.65f, 0.65f, 0.65f, 1);
const Color4F Color4F::AX_TRANSPARENT(0, 0, 0, 0);

HSV::HSV() {}

Expand Down
2 changes: 2 additions & 0 deletions core/base/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ struct AX_DLL Color4B
static const Color4B BLACK;
static const Color4B ORANGE;
static const Color4B GRAY;
static const Color4B AX_TRANSPARENT; // TRANSPARENT is defined on wingdi.h /*Background Modes*/
};

/**
Expand Down Expand Up @@ -158,6 +159,7 @@ struct AX_DLL Color4F
static const Color4F BLACK;
static const Color4F ORANGE;
static const Color4F GRAY;
static const Color4F AX_TRANSPARENT; // TRANSPARENT is defined on wingdi.h /*Background Modes*/
};

Color4F& operator+=(Color4F& lhs, const Color4F& rhs);
Expand Down
4 changes: 4 additions & 0 deletions extensions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,8 @@ if(AX_ENABLE_EXT_JSONDEFAULT)
add_subdirectory(JSONDefault)
endif()

if(AX_ENABLE_EXT_DRAWNODEEX)
add_subdirectory(DrawNodeEx)
endif()

message(STATUS "Enabled ${_AX_CORE_LIB} extensions:${_AX_EXTENSION_LIBS}")
7 changes: 7 additions & 0 deletions extensions/DrawNodeEx/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
set(target_name DrawNodeEx)

FILE(GLOB DRAWNODEEX_SOURCES *.h;*.cpp;./**/*.h;./**/*.cpp)

add_library(${target_name} ${DRAWNODEEX_SOURCES})

setup_ax_extension_config(${target_name})
Loading

0 comments on commit 70fa887

Please sign in to comment.