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 51 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
9ffcc4e
Bump 3.0.0
halx99 Oct 4, 2024
2553f20
Remove deprecated stubs
halx99 Oct 4, 2024
270b634
Implement drawArraysInstanced and make instanced draw more common use
halx99 Oct 4, 2024
52d7975
Mark DrawNode::clear as virtual function
halx99 Oct 4, 2024
08a915f
Improve ImGuiPresenter, prevent mouse scroll event when handled
halx99 Oct 4, 2024
fd462f2
Make box2d 3.0 works and remove all chipmunk related
halx99 Oct 4, 2024
4b0b00a
Change underlaying color type to Color4F aka ax::Color
halx99 Oct 5, 2024
c7d773e
Improve DrawNode, don't create backend::Buffer always
halx99 Oct 5, 2024
ca2ab0f
Fix ci
halx99 Oct 5, 2024
3906621
Improve code style
halx99 Oct 5, 2024
3c1f924
Fix assetion fail in drawOrder enabled
halx99 Oct 5, 2024
468fa81
Make DrawNodeTest CandyMixEffect behavior same with 2.x
halx99 Oct 5, 2024
e79d9a2
Tidy vertex format
halx99 Oct 5, 2024
7eb86ca
All typo: ax::Color4F ==> ax::Color
halx99 Oct 9, 2024
8e4933d
Fix LayerGradient not adapte float4 color format
halx99 Oct 13, 2024
549c0f7
Delete unused files
halx99 Oct 19, 2024
d2c85e8
Fix preprocessor checks
halx99 Dec 2, 2024
6ed7c37
Update openal-soft to 1.24.1
halx99 Dec 2, 2024
0f6d3a7
Fix #2254
halx99 Dec 5, 2024
da415f0
Rename all XXX_C4F_T2F_XXX to XXX_T2F_C4F_XXX
halx99 Dec 5, 2024
7af198a
Still use V3F_T2F_C4B for sprite render
halx99 Dec 14, 2024
5160e03
Update lua bindings
halx99 Dec 27, 2024
dba590f
Merge axmol dev into 3.x
halx99 Jan 5, 2025
ea58ed2
Update Android & iOS minmal OS support
halx99 Jan 7, 2025
9e57a6b
AxmolActivity will extend AppCompatActivity
rh101 Jan 6, 2025
dc2ebf2
Update simdjson to v3.11.4
halx99 Jan 8, 2025
fc566c0
Remove dependency rapidjson for JsonWriter
halx99 Jan 10, 2025
bd0279c
Update openal-soft to 1.24.2
halx99 Jan 14, 2025
0238e7d
Update simdjson to v3.11.5
halx99 Jan 14, 2025
096bf5a
Fix #2330 and improve code style
halx99 Jan 14, 2025
e1b1cc8
Improve code style
halx99 Jan 14, 2025
2bb6ae8
Fix linux link error
halx99 Jan 14, 2025
637ddda
Rename Color4B to Color32
halx99 Jan 15, 2025
9aefaae
Fix wasm64 build
halx99 Jan 15, 2025
808e2e0
Fix wasm64 runtime exception for imgui glfw backend
halx99 Jan 17, 2025
097ed48
Add wasm64 build to ci
halx99 Jan 17, 2025
50fbb37
Improve Console::Utility::trim and move to StringUtils
halx99 Jan 17, 2025
30d8b18
Add lib: fast_float
halx99 Jan 18, 2025
293ff70
Improve c3t, c3b load
halx99 Jan 19, 2025
27972b4
Fix android appcompat not set in template project
halx99 Feb 5, 2025
6b11a05
Fix wasm compiling warnigs and errors
halx99 Feb 5, 2025
e6eef14
Update simdjson and fast_float
halx99 Feb 9, 2025
66de1f6
Fixup merge issue cause compile errors
halx99 Feb 11, 2025
427af84
Improve type Color32
halx99 Mar 7, 2025
eb02995
Improve FileUtils removeDirectory implementation, see #2208
halx99 Apr 4, 2025
3f9b2d3
Update openal-soft to 1.24.3
halx99 Apr 4, 2025
a50c973
Update codebase to c++23
halx99 Apr 27, 2025
9d6ef28
[WIP] Implement Physics2D with box2d-v3
halx99 Feb 27, 2025
2dc9dfe
Fix possibile conflict
halx99 May 7, 2025
4e31d13
Update simdjson: 3.12.0 => 3.13.0
halx99 Jun 5, 2025
c77d3c2
Update fast_float: 8.0.0 => 8.0.2
halx99 Jun 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/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