Forge test

This commit is contained in:
luboslenco
2024-12-03 22:19:12 +01:00
parent c5fa5bd503
commit dbf24344b2
9 changed files with 77 additions and 17 deletions
+5 -1
View File
@@ -144,7 +144,7 @@ void _jolt_world_create() {
void _jolt_world_update() {
#ifdef is_forge
const int cCollisionSteps = 16;
const int cCollisionSteps = 2;
#else
const int cCollisionSteps = 1;
#endif
@@ -228,6 +228,10 @@ void *_jolt_body_create(int shape, float mass, float dimx, float dimy, float dim
BodyCreationSettings settings(shape_c, RVec3(x, y, z), Quat::sIdentity(), mass == 0 ? EMotionType::Static : EMotionType::Dynamic,
mass == 0 ? Layers::NON_MOVING : Layers::MOVING);
#ifdef is_forge
settings.mAllowSleeping = false;
#endif
// if (ccd) {
if (shape != 2) { // != Mesh
settings.mMotionQuality = EMotionQuality::LinearCast;
+7
View File
@@ -428,7 +428,14 @@ function context_create(): context_t {
c.brush_opacity = 1.0;
c.brush_opacity_handle = ui_handle_create();
c.brush_opacity_handle.value = 1.0;
///if is_forge
let atlas_w: i32 = 8192; // config_get_texture_res();
let item_w: i32 = 4096;
let atlas_stride: i32 = atlas_w / item_w;
c.brush_scale = atlas_stride;
///else
c.brush_scale = 1.0;
///end
c.brush_angle = 0.0;
c.brush_angle_handle = ui_handle_create();
c.brush_angle_handle.value = 0.0;
-5
View File
@@ -307,11 +307,6 @@ function gizmo_update() {
if (context_raw.gizmo_started) {
context_raw.gizmo_drag_last = context_raw.gizmo_drag;
}
///if is_forge
util_mesh_remove_merged();
render_path_raytrace_ready = false;
///end
}
_input_occupied = (context_raw.translate_x || context_raw.translate_y || context_raw.translate_z || context_raw.scale_x || context_raw.scale_y || context_raw.scale_z || context_raw.rotate_x || context_raw.rotate_y || context_raw.rotate_z) && mouse_view_x() < base_w();
+3 -1
View File
@@ -195,9 +195,11 @@ function render_path_base_commands(draw_commands: ()=>void) {
render_path_paint_draw();
///if (arm_direct3d12 || arm_vulkan || arm_metal)
if (context_raw.viewport_mode == viewport_mode_t.PATH_TRACE) {
if (context_raw.viewport_mode == viewport_mode_t.PATH_TRACE) {
let use_live_layer: bool = context_raw.tool == workspace_tool_t.MATERIAL;
render_path_raytrace_draw(use_live_layer);
context_raw.foreground_event = false; // render_path_paint_end();
render_path_base_end();
return;
}
///end