Skip to content

Working in-progress v3 #2387

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 58 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
3aa13c3
Bump 3.0.0
halx99 Oct 4, 2024
21f21a9
Remove deprecated stubs
halx99 Oct 4, 2024
4bfa3c8
Implement drawArraysInstanced and make instanced draw more common use
halx99 Oct 4, 2024
7d96bd8
Mark DrawNode::clear as virtual function
halx99 Oct 4, 2024
b3b8901
Make box2d 3.0 works and remove all chipmunk related
halx99 Oct 4, 2024
e046c6b
Change underlaying color type to Color4F aka ax::Color
halx99 Oct 5, 2024
3fc9fd7
Improve DrawNode, don't create backend::Buffer always
halx99 Oct 5, 2024
e3c031c
Fix ci
halx99 Oct 5, 2024
f30e222
Improve code style
halx99 Oct 5, 2024
eef1b8e
Fix assetion fail in drawOrder enabled
halx99 Oct 5, 2024
67d3ce4
Make DrawNodeTest CandyMixEffect behavior same with 2.x
halx99 Oct 5, 2024
ccbfcac
Tidy vertex format
halx99 Oct 5, 2024
dcc2ce7
All typo: ax::Color4F ==> ax::Color
halx99 Oct 9, 2024
62f32ed
Fix LayerGradient not adapte float4 color format
halx99 Oct 13, 2024
6d5a021
Delete unused files
halx99 Oct 19, 2024
4512d41
Fix preprocessor checks
halx99 Dec 2, 2024
0f01490
Update openal-soft to 1.24.1
halx99 Dec 2, 2024
2a508e7
Fix #2254
halx99 Dec 5, 2024
cd389f3
Rename all XXX_C4F_T2F_XXX to XXX_T2F_C4F_XXX
halx99 Dec 5, 2024
7e6d64b
Still use V3F_T2F_C4B for sprite render
halx99 Dec 14, 2024
fb70a96
Update lua bindings
halx99 Dec 27, 2024
1458119
Merge axmol dev into 3.x
halx99 Jan 5, 2025
daf8aeb
Update Android & iOS minmal OS support
halx99 Jan 7, 2025
6d963c4
AxmolActivity will extend AppCompatActivity
rh101 Jan 6, 2025
161bdc1
Update simdjson to v3.11.4
halx99 Jan 8, 2025
47049fe
Remove dependency rapidjson for JsonWriter
halx99 Jan 10, 2025
59f0d4d
Update openal-soft to 1.24.2
halx99 Jan 14, 2025
0bd89ef
Update simdjson to v3.11.5
halx99 Jan 14, 2025
52b6855
Fix #2330 and improve code style
halx99 Jan 14, 2025
2965e38
Improve code style
halx99 Jan 14, 2025
d88e445
Fix linux link error
halx99 Jan 14, 2025
1a8f85a
Rename Color4B to Color32
halx99 Jan 15, 2025
5fc9c59
Fix wasm64 build
halx99 Jan 15, 2025
e500278
Fix wasm64 runtime exception for imgui glfw backend
halx99 Jan 17, 2025
334bf06
Add wasm64 build to ci
halx99 Jan 17, 2025
584b819
Improve Console::Utility::trim and move to StringUtils
halx99 Jan 17, 2025
ed5f7b1
Add lib: fast_float
halx99 Jan 18, 2025
ecb87e7
Improve c3t, c3b load
halx99 Jan 19, 2025
6ba5323
Fix android appcompat not set in template project
halx99 Feb 5, 2025
8e0e9ac
Fix wasm compiling warnigs and errors
halx99 Feb 5, 2025
120209f
Update simdjson and fast_float
halx99 Feb 9, 2025
52f8317
Fixup merge issue cause compile errors
halx99 Feb 11, 2025
723b323
Improve type Color32
halx99 Mar 7, 2025
bb284e2
Improve FileUtils removeDirectory implementation, see #2208
halx99 Apr 4, 2025
c0bf125
Update openal-soft to 1.24.3
halx99 Apr 4, 2025
e2f9e35
Update codebase to c++23
halx99 Apr 27, 2025
2e2b47b
[WIP] Implement Physics2D with box2d-v3
halx99 Feb 27, 2025
c01102d
Fix possibile conflict
halx99 May 7, 2025
5b3b70d
Update simdjson: 3.12.0 => 3.13.0
halx99 Jun 5, 2025
8b19027
Update fast_float: 8.0.0 => 8.0.2
halx99 Jun 7, 2025
f0caf7b
Fix box2d-v3 shape instancing draw for metal render backend
halx99 Jun 12, 2025
5ed13a7
Catch Bundle3D binary read exception
halx99 Jun 18, 2025
bf38435
Fix LayerGradient color
halx99 Jun 18, 2025
d1c3e5a
Remove the default pixel format, fix rendering of grayscale PNGs (#2573)
j-jorge Jun 23, 2025
aa27ead
Fix merging issues due to imgui updated to 1.92.0
halx99 Jul 6, 2025
58082a2
Update plainlua to 5.5.0-beta
halx99 Jul 10, 2025
51f9f53
Update luabindings
halx99 Jul 13, 2025
f1956b5
Fix luabindings for physics2d
halx99 Jul 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 10 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ on:
env:
__1K_CXXSTD: '${{ inputs.cxxstd }}'

run-name: 'build@c++${{ inputs.cxxstd || 20 }}'
run-name: 'build@c++${{ inputs.cxxstd || 23 }}'

jobs:
win32:
Expand Down Expand Up @@ -180,3 +180,12 @@ jobs:
token: ${{ secrets.AX_TRIGGER_SITE_TOKEN }}
repository: axmolengine/axmol.dev
event-type: forward-push
wasm64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build
shell: pwsh
run: ./tools/cmdline/axmol -p wasm64 -xc '-DAX_ENABLE_EXT_EFFEKSEER=ON,-DAX_WASM_THREADS=8' -j2 -t 'cpp-tests,fairygui-tests,lua-tests'
4 changes: 2 additions & 2 deletions 1k/build.profiles
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ cmdlinetools=19.0
# - https://developer.android.google.cn/about/versions/15/behavior-changes-all?hl=zh-cn#16-kb
# In China Mainland, please download from https://pan.baidu.com/s/1neJydxOGTT7aCQvLLwbicw?pwd=qqiq
# to $AX_ROOT/cache/, then run `setup.ps1 -p android`
ndk=r23d
ndk=r27c

# The android target sdk version, @gradle
# as latest as possible
target_sdk=36

# The android min sdk version, @gradle
# as min as possible
min_sdk=17
min_sdk=21

# The gradle version, @setup.ps1
# as latest as possible
Expand Down
2 changes: 1 addition & 1 deletion 1k/ios.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if(NOT DEFINED DEPLOYMENT_TARGET)
if (XCODE_VERSION LESS "14.3.0")
set(DEPLOYMENT_TARGET "11.0" CACHE STRING "" FORCE)
else() # xcode 14.3+ require 12.0 for c++ std::get
set(DEPLOYMENT_TARGET "12.0" CACHE STRING "" FORCE)
set(DEPLOYMENT_TARGET "13.0" CACHE STRING "" FORCE)
endif()
endif()
elseif (PLAT STREQUAL "tvOS")
Expand Down
20 changes: 2 additions & 18 deletions 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,22 +156,6 @@ if(AX_ENABLE_PHYSICS)
ax_add_3rd(box2d OPTIONS ${box2d_opts})
endif()

if(AX_ENABLE_PHYSICS)
ax_add_3rd(chipmunk OPTIONS
"CP_BUILD_SHARED OFF"
"CP_BUILD_STATIC ON"
"CP_BUILD_DEMOS OFF"
"CP_INSTALL_STATIC OFF"
)
set_target_properties(chipmunk PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/chipmunk/include"
)

# !important axmol not use double precision
target_compile_definitions(chipmunk PUBLIC CP_USE_CGTYPES=0)
target_compile_definitions(chipmunk PUBLIC CP_USE_DOUBLES=0)
endif()

ax_add_3rd(freetype OPTIONS
"DISABLE_FORCE_DEBUG_POSTFIX ON"
"SKIP_INSTALL_ALL TRUE"
Expand Down Expand Up @@ -288,11 +272,11 @@ if (AX_ENABLE_AUDIO)
set(ALSOFT_CPPWINRT_VERSION ${AX_CPPWINRT_VERSION} CACHE STRING "" FORCE)
endif()

ax_add_3rd(openal EXCLUDE_FROM_ALL TARGETS alcommon;OpenAL OPTIONS ${alsoft_opts})
ax_add_3rd(openal EXCLUDE_FROM_ALL TARGETS OpenAL;alsoft.common OPTIONS ${alsoft_opts})

target_include_directories(3rdparty INTERFACE openal)
target_compile_definitions(3rdparty INTERFACE AX_USE_ALSOFT=1)
set_target_properties(OpenAL alcommon PROPERTIES CXX_STANDARD ${_AX_CXX_STD})
set_target_properties(OpenAL alsoft.common PROPERTIES CXX_STANDARD ${_AX_CXX_STD})

if (AX_USE_ALSOFT_STATIC)
target_compile_definitions(3rdparty INTERFACE AL_LIBTYPE_STATIC=1)
Expand Down
25 changes: 12 additions & 13 deletions 3rdparty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

## Box2D
- [![Upstream](https://img.shields.io/github/v/release/erincatto/box2d?label=Upstream)](https://github.com/erincatto/box2d)
- Version: 2.4.2
- Version: 3.1.1
- License: MIT

## Bullet
Expand All @@ -25,11 +25,6 @@
- Version: 1.34.5
- License: MIT

## Chipmunk2D
- [![Upstream](https://img.shields.io/github/v/tag/slembcke/Chipmunk2D?label=Upstream)](https://github.com/slembcke/Chipmunk2D)
- Version: git 7.0.3-0cb05e7 {until Dec 16, 2021}
- License: MIT

## Clipper2
- [![Upstream](https://img.shields.io/github/v/tag/AngusJohnson/Clipper2?label=Upstream)](https://github.com/AngusJohnson/Clipper2)
- Version: 1.5.4
Expand Down Expand Up @@ -60,6 +55,11 @@
- Version: git 344eb40 (121)
- License: MIT

## fast_float
- [![Upstream](https://img.shields.io/github/v/release/fastfloat/fast_float?label=Upstream)](https://github.com/fastfloat/fast_float)
- Version: 8.0.2
- License: MIT

## flatbuffers
- [![Upstream](https://img.shields.io/github/v/release/google/flatbuffers?label=Upstream)](https://github.com/google/flatbuffers)
- Version: 25.2.10
Expand All @@ -86,11 +86,6 @@
- Version: 3.4 with modified for create as win32 child window support
- License: zlib

## GHC (iOS devices only)
- [![Upstream](https://img.shields.io/github/v/release/gulrak/filesystem?label=Upstream)](https://github.com/gulrak/filesystem)
- Version: 1.5.14
- License: MIT

## jni.hpp
- [![Upstream](https://img.shields.io/github/v/release/mapbox/jni.hpp?label=Upstream)](https://github.com/mapbox/jni.hpp)
- Version: v4.0.0
Expand Down Expand Up @@ -180,7 +175,11 @@

## OpenAL Soft
- [![Upstream](https://img.shields.io/github/v/tag/kcat/openal-soft?label=Upstream)](https://github.com/kcat/openal-soft)
- Version: 1.23.1-e714c8f (8659)
- Version: 1.24.3
- Modifications:
- Remove `-Werror=undef`
- Linking `fmt::fmt` instead `alsoft::fmt`
- Exclude target `alsoft::excommon`
- License: LGPL-2.1

## OpenSSL
Expand Down Expand Up @@ -225,7 +224,7 @@

## simdjson
- [![Upstream](https://img.shields.io/github/v/tag/simdjson/simdjson?label=Upstream)](https://github.com/simdjson/simdjson)
- Version: 3.10.1
- Version: 3.13.0
- License: Apache-2.0

## stb (stb_image)
Expand Down
119 changes: 22 additions & 97 deletions 3rdparty/box2d/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,105 +4,30 @@ set(target_name ${lib_name})

project(${lib_name})

set(BOX2D_SOURCE_FILES
src/collision/b2_broad_phase.cpp
src/collision/b2_chain_shape.cpp
src/collision/b2_circle_shape.cpp
src/collision/b2_collide_circle.cpp
src/collision/b2_collide_edge.cpp
src/collision/b2_collide_polygon.cpp
src/collision/b2_collision.cpp
src/collision/b2_distance.cpp
src/collision/b2_dynamic_tree.cpp
src/collision/b2_edge_shape.cpp
src/collision/b2_polygon_shape.cpp
src/collision/b2_time_of_impact.cpp
src/common/b2_block_allocator.cpp
src/common/b2_draw.cpp
src/common/b2_math.cpp
src/common/b2_settings.cpp
src/common/b2_stack_allocator.cpp
src/common/b2_timer.cpp
src/dynamics/b2_body.cpp
src/dynamics/b2_chain_circle_contact.cpp
src/dynamics/b2_chain_circle_contact.h
src/dynamics/b2_chain_polygon_contact.cpp
src/dynamics/b2_chain_polygon_contact.h
src/dynamics/b2_circle_contact.cpp
src/dynamics/b2_circle_contact.h
src/dynamics/b2_contact.cpp
src/dynamics/b2_contact_manager.cpp
src/dynamics/b2_contact_solver.cpp
src/dynamics/b2_contact_solver.h
src/dynamics/b2_distance_joint.cpp
src/dynamics/b2_edge_circle_contact.cpp
src/dynamics/b2_edge_circle_contact.h
src/dynamics/b2_edge_polygon_contact.cpp
src/dynamics/b2_edge_polygon_contact.h
src/dynamics/b2_fixture.cpp
src/dynamics/b2_friction_joint.cpp
src/dynamics/b2_gear_joint.cpp
src/dynamics/b2_island.cpp
src/dynamics/b2_island.h
src/dynamics/b2_joint.cpp
src/dynamics/b2_motor_joint.cpp
src/dynamics/b2_mouse_joint.cpp
src/dynamics/b2_polygon_circle_contact.cpp
src/dynamics/b2_polygon_circle_contact.h
src/dynamics/b2_polygon_contact.cpp
src/dynamics/b2_polygon_contact.h
src/dynamics/b2_prismatic_joint.cpp
src/dynamics/b2_pulley_joint.cpp
src/dynamics/b2_revolute_joint.cpp
src/dynamics/b2_weld_joint.cpp
src/dynamics/b2_wheel_joint.cpp
src/dynamics/b2_world.cpp
src/dynamics/b2_world_callbacks.cpp
src/rope/b2_rope.cpp)
file(GLOB_RECURSE box2d_sources *.h;*.c)

set(BOX2D_HEADER_FILES
include/box2d/b2_api.h
include/box2d/b2_block_allocator.h
include/box2d/b2_body.h
include/box2d/b2_broad_phase.h
include/box2d/b2_chain_shape.h
include/box2d/b2_circle_shape.h
include/box2d/b2_collision.h
include/box2d/b2_common.h
include/box2d/b2_contact.h
include/box2d/b2_contact_manager.h
include/box2d/b2_distance.h
include/box2d/b2_distance_joint.h
include/box2d/b2_draw.h
include/box2d/b2_dynamic_tree.h
include/box2d/b2_edge_shape.h
include/box2d/b2_fixture.h
include/box2d/b2_friction_joint.h
include/box2d/b2_gear_joint.h
include/box2d/b2_growable_stack.h
include/box2d/b2_joint.h
include/box2d/b2_math.h
include/box2d/b2_motor_joint.h
include/box2d/b2_mouse_joint.h
include/box2d/b2_polygon_shape.h
include/box2d/b2_prismatic_joint.h
include/box2d/b2_pulley_joint.h
include/box2d/b2_revolute_joint.h
include/box2d/b2_rope.h
include/box2d/b2_settings.h
include/box2d/b2_shape.h
include/box2d/b2_stack_allocator.h
include/box2d/b2_time_of_impact.h
include/box2d/b2_timer.h
include/box2d/b2_time_step.h
include/box2d/b2_types.h
include/box2d/b2_weld_joint.h
include/box2d/b2_wheel_joint.h
include/box2d/b2_world.h
include/box2d/b2_world_callbacks.h
include/box2d/box2d.h)
add_library(${target_name} ${box2d_sources})

add_library(${target_name} STATIC ${BOX2D_SOURCE_FILES} ${BOX2D_HEADER_FILES})
if (MSVC)
if (BUILD_SHARED_LIBS)
# this is needed by DLL users to import Box2D symbols
target_compile_definitions(box2d INTERFACE BOX2D_DLL)
endif()
endif()

# Atomics are still considered experimental in Visual Studio 17.8
if (FULL_MSVC)
target_compile_options(box2d PRIVATE /experimental:c11atomics)
endif()

set_target_properties(${target_name} PROPERTIES C_STANDARD 17 C_STANDARD_REQUIRED TRUE)

if(_simdc_defines)
target_compile_definitions(${target_name} PRIVATE ${_simdc_defines})
if(_simdc_options)
target_compile_options(${target_name} PRIVATE ${_simdc_options})
endif()
endif()

target_include_directories(${target_name}
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include"
Expand Down
52 changes: 0 additions & 52 deletions 3rdparty/box2d/include/box2d/b2_api.h

This file was deleted.

60 changes: 0 additions & 60 deletions 3rdparty/box2d/include/box2d/b2_block_allocator.h

This file was deleted.

Loading
Loading