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 49 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
1a1daef
Bump 3.0.0
halx99 Oct 4, 2024
4e96cba
Remove deprecated stubs
halx99 Oct 4, 2024
21323bf
Implement drawArraysInstanced and make instanced draw more common use
halx99 Oct 4, 2024
e678bbd
Mark DrawNode::clear as virtual function
halx99 Oct 4, 2024
0209918
Improve ImGuiPresenter, prevent mouse scroll event when handled
halx99 Oct 4, 2024
23d1661
Make box2d 3.0 works and remove all chipmunk related
halx99 Oct 4, 2024
ef0a7f0
Change underlaying color type to Color4F aka ax::Color
halx99 Oct 5, 2024
0b3ebb9
Improve DrawNode, don't create backend::Buffer always
halx99 Oct 5, 2024
0cf63d5
Fix ci
halx99 Oct 5, 2024
0abd689
Improve code style
halx99 Oct 5, 2024
5b574c8
Fix assetion fail in drawOrder enabled
halx99 Oct 5, 2024
bac7303
Make DrawNodeTest CandyMixEffect behavior same with 2.x
halx99 Oct 5, 2024
f8e6639
Tidy vertex format
halx99 Oct 5, 2024
f2f9f94
All typo: ax::Color4F ==> ax::Color
halx99 Oct 9, 2024
c404dd0
Fix LayerGradient not adapte float4 color format
halx99 Oct 13, 2024
5cce570
Delete unused files
halx99 Oct 19, 2024
6ec786c
Fix preprocessor checks
halx99 Dec 2, 2024
a50b53b
Update openal-soft to 1.24.1
halx99 Dec 2, 2024
4ac12f6
Fix #2254
halx99 Dec 5, 2024
819ac38
Rename all XXX_C4F_T2F_XXX to XXX_T2F_C4F_XXX
halx99 Dec 5, 2024
0148938
Still use V3F_T2F_C4B for sprite render
halx99 Dec 14, 2024
6c97198
Update lua bindings
halx99 Dec 27, 2024
e3e6e11
Merge axmol dev into 3.x
halx99 Jan 5, 2025
159d244
Update Android & iOS minmal OS support
halx99 Jan 7, 2025
44423d5
AxmolActivity will extend AppCompatActivity
rh101 Jan 6, 2025
22af309
Update simdjson to v3.11.4
halx99 Jan 8, 2025
69bd5d8
Remove dependency rapidjson for JsonWriter
halx99 Jan 10, 2025
1790510
Update openal-soft to 1.24.2
halx99 Jan 14, 2025
5971075
Update simdjson to v3.11.5
halx99 Jan 14, 2025
8fc0590
Fix #2330 and improve code style
halx99 Jan 14, 2025
51dd1ac
Improve code style
halx99 Jan 14, 2025
5272f5d
Fix linux link error
halx99 Jan 14, 2025
13601b2
Rename Color4B to Color32
halx99 Jan 15, 2025
1cd9d0c
Fix wasm64 build
halx99 Jan 15, 2025
4e2a29d
Fix wasm64 runtime exception for imgui glfw backend
halx99 Jan 17, 2025
c727613
Add wasm64 build to ci
halx99 Jan 17, 2025
f92e76c
Improve Console::Utility::trim and move to StringUtils
halx99 Jan 17, 2025
6b6037e
Add lib: fast_float
halx99 Jan 18, 2025
b8d1735
Improve c3t, c3b load
halx99 Jan 19, 2025
12c97b6
Fix android appcompat not set in template project
halx99 Feb 5, 2025
6c4018d
Fix wasm compiling warnigs and errors
halx99 Feb 5, 2025
1e1c995
Update simdjson and fast_float
halx99 Feb 9, 2025
704622f
Fixup merge issue cause compile errors
halx99 Feb 11, 2025
694f4b0
Improve type Color32
halx99 Mar 7, 2025
00e49ca
Improve FileUtils removeDirectory implementation, see #2208
halx99 Apr 4, 2025
48aa52a
Update openal-soft to 1.24.3
halx99 Apr 4, 2025
8bd5154
Update codebase to c++23
halx99 Apr 27, 2025
458786c
[WIP] Implement Physics2D with box2d-v3
halx99 Feb 27, 2025
448dd4f
Fix possibile conflict
halx99 May 7, 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/ci.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: 'ci@c++${{ inputs.cxxstd || 20 }}'
run-name: 'ci@c++${{ inputs.cxxstd || 23 }}'

jobs:
win32:
Expand Down Expand Up @@ -172,3 +172,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=12.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=35

# 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.0
- 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.2
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.0
- 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.12.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