Skip to content

Commit cc03ef2

Browse files
hoffstadthoffstadt-nasa
authored andcommitted
WIP
Update pl_graphics_ext.h
1 parent b0d8985 commit cc03ef2

114 files changed

Lines changed: 4857 additions & 2999 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build/backend_linux.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def generate_build(name, user_options = None):
278278

279279
helper.add_raw('PL_STATIC_LINK_LIBRARIES="')
280280
for link in settings.static_link_libraries:
281-
helper.add_raw('-l:' + link + '.a ')
281+
helper.add_raw('-l' + link + ' ')
282282
helper.add_raw('"\n')
283283

284284
helper.add_raw('PL_DYNAMIC_LINK_LIBRARIES="')
@@ -328,7 +328,7 @@ def generate_build(name, user_options = None):
328328
helper.print_line('${YELLOW}Step: ' + settings.target_name +'${NC}')
329329
helper.print_line('${YELLOW}~~~~~~~~~~~~~~~~~~~${NC}')
330330
helper.print_line('${CYAN}Compiling and Linking...${NC}')
331-
helper.add_line('gcc -shared $PL_SOURCES $PL_INCLUDE_DIRECTORIES $PL_DEFINES $PL_COMPILER_FLAGS $PL_INCLUDE_DIRECTORIES $PL_LINK_DIRECTORIES $PL_STATIC_LINK_LIBRARIES $PL_DYNAMIC_LINK_LIBRARIES $PL_LINKER_FLAGS -o "./' + settings.output_directory + '/' + settings.output_binary + settings.output_binary_extension +'"')
331+
helper.add_line('gcc -shared $PL_SOURCES $PL_INCLUDE_DIRECTORIES $PL_DEFINES $PL_COMPILER_FLAGS $PL_INCLUDE_DIRECTORIES $PL_LINK_DIRECTORIES $PL_STATIC_LINK_LIBRARIES $PL_DYNAMIC_LINK_LIBRARIES $PL_LINKER_FLAGS -o "./' + settings.output_directory + '/lib' + settings.output_binary + settings.output_binary_extension +'"')
332332
helper.add_spacing()
333333

334334
# check build status
@@ -374,7 +374,7 @@ def generate_build(name, user_options = None):
374374
if settings.target_type == pl.TargetType.STATIC_LIBRARY:
375375
helper.add_spacing()
376376
helper.add_comment('combine object files into a static lib')
377-
helper.add_line('ar rcs ./' + settings.output_directory + '/' + settings.output_binary + '.a ./' + settings.output_directory + '/*.o')
377+
helper.add_line('ar rcs ./' + settings.output_directory + '/lib' + settings.output_binary + '.a ./' + settings.output_directory + '/*.o')
378378
helper.add_line('rm ./' + settings.output_directory + '/*.o')
379379
helper.add_spacing()
380380
helper.add_spacing()

build/backend_macos.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def generate_build(name, user_options = None):
342342
helper.print_line('${YELLOW}Step: ' + settings.target_name +'${NC}')
343343
helper.print_line('${YELLOW}~~~~~~~~~~~~~~~~~~~${NC}')
344344
helper.print_line('${CYAN}Compiling and Linking...${NC}')
345-
helper.add_line('clang -shared $PL_SOURCES $PL_INCLUDE_DIRECTORIES $PL_DEFINES $PL_COMPILER_FLAGS $PL_INCLUDE_DIRECTORIES $PL_LINK_DIRECTORIES $PL_STATIC_LINK_LIBRARIES $PL_DYNAMIC_LINK_LIBRARIES $PL_LINK_FRAMEWORKS $PL_LINKER_FLAGS -o "./' + settings.output_directory + '/' + settings.output_binary + settings.output_binary_extension +'"')
345+
helper.add_line('clang -shared $PL_SOURCES $PL_INCLUDE_DIRECTORIES $PL_DEFINES $PL_COMPILER_FLAGS $PL_INCLUDE_DIRECTORIES $PL_LINK_DIRECTORIES $PL_STATIC_LINK_LIBRARIES $PL_DYNAMIC_LINK_LIBRARIES $PL_LINK_FRAMEWORKS $PL_LINKER_FLAGS -o "./' + settings.output_directory + '/lib' + settings.output_binary + settings.output_binary_extension +'"')
346346
helper.add_spacing()
347347

348348
# check build status

build/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# [SECTION] version
1515
#-----------------------------------------------------------------------------
1616

17-
__version__ = "1.4.0"
17+
__version__ = "1.4.1"
1818

1919
#-----------------------------------------------------------------------------
2020
# [SECTION] imports

build/deploy_setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from codecs import open
33
import os
44

5-
wip_version = "1.4.0"
5+
wip_version = "1.4.1"
66

77
def version_number():
88
"""This function reads the version number which is populated by github actions"""

editor/app.c

Lines changed: 337 additions & 406 deletions
Large diffs are not rendered by default.

editor/editor.cpp

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ Index of this file:
2424

2525
#include "editor.h"
2626

27+
PL_API void pl_load_ext(plApiRegistryI* ptApiRegistry, bool bReload);
28+
PL_API void pl_unload_ext(plApiRegistryI* ptApiRegistry, bool bReload);
29+
2730
//-----------------------------------------------------------------------------
2831
// [SECTION] pl_app_load
2932
//-----------------------------------------------------------------------------
@@ -104,8 +107,8 @@ pl_app_load(plApiRegistryI* ptApiRegistry, plAppData* ptAppData)
104107
const plExtensionRegistryI* ptExtensionRegistry = pl_get_api_latest(ptApiRegistry, plExtensionRegistryI);
105108

106109
// load extensions
107-
ptExtensionRegistry->load("pl_unity_ext", nullptr, nullptr, true);
108-
ptExtensionRegistry->load("pl_platform_ext", "pl_load_platform_ext", "pl_unload_platform_ext", false);
110+
pl_load_ext(ptApiRegistry, false);
111+
pl_load_platform_ext(ptApiRegistry, false);
109112
ptExtensionRegistry->load("pl_dear_imgui_ext", "pl_load_dear_imgui_ext", "pl_unload_dear_imgui_ext", false);
110113

111114
// load apis
@@ -194,10 +197,10 @@ pl_app_load(plApiRegistryI* ptApiRegistry, plAppData* ptAppData)
194197
gptWindows->create(tWindowDesc, &ptAppData->ptWindow);
195198
gptWindows->show(ptAppData->ptWindow);
196199

197-
plFullScreenDesc tFullScreen = {};
198-
tFullScreen.iMonitor = 1;
199-
tFullScreen.tMode = PL_FULLSCREEN_MODE_EXCLUSIVE;
200-
gptWindows->set_fullscreen(ptAppData->ptWindow, &tFullScreen);
200+
// plFullScreenDesc tFullScreen = {};
201+
// tFullScreen.iMonitor = 1;
202+
// tFullScreen.tMode = PL_FULLSCREEN_MODE_EXCLUSIVE;
203+
// gptWindows->set_fullscreen(ptAppData->ptWindow, &tFullScreen);
201204

202205
plStarterInit tStarterInit = {};
203206
tStarterInit.tFlags = PL_STARTER_FLAGS_NONE;
@@ -342,7 +345,7 @@ pl_app_shutdown(plAppData* ptAppData)
342345
pl_sb_free(ptAppData->sbcTempBuffer);
343346

344347
// ensure GPU is finished before cleanup
345-
gptGfx->flush_device(ptAppData->ptDevice);
348+
pl_graphics_flush_device(ptAppData->ptDevice);
346349

347350
gptDearImGui->cleanup();
348351

@@ -489,7 +492,7 @@ pl_app_update(plAppData* ptAppData)
489492

490493
if(ptAppData->bShowEntityWindow)
491494
{
492-
if(gptEcsTools->show_ecs_window(ptAppData->ptCompLibrary, &ptAppData->tSelectedEntity, ptAppData->ptScene, &ptAppData->bShowEntityWindow))
495+
if(gptEcsTools->show_window(ptAppData->ptCompLibrary, &ptAppData->tSelectedEntity, ptAppData->ptScene, &ptAppData->bShowEntityWindow))
493496
{
494497
if(ptAppData->tSelectedEntity.uData == UINT64_MAX)
495498
{
@@ -743,12 +746,12 @@ pl_app_update(plAppData* ptAppData)
743746
ImGui::ShowDemoWindow(&ptAppData->bShowImGuiDemo);
744747

745748
plRenderEncoder* ptRenderEncoder = gptStarter->begin_main_pass();
746-
gptDearImGui->render(ptRenderEncoder, gptGfx->get_encoder_command_buffer(ptRenderEncoder));
749+
gptDearImGui->render(ptRenderEncoder, pl_graphics_get_encoder_command_buffer(ptRenderEncoder));
747750

748751
float fWidth = ptIO->tMainViewportSize.x;
749752
float fHeight = ptIO->tMainViewportSize.y;
750753
plDrawList2D* ptMessageDrawlist = gptScreenLog->get_drawlist(tLogOffset.x, tLogOffset.y, fWidth * 0.2f, fHeight);
751-
gptDraw->submit_2d_drawlist(ptMessageDrawlist, ptRenderEncoder, fWidth, fHeight, gptGfx->get_swapchain_info(gptStarter->get_swapchain()).tSampleCount);
754+
gptDraw->submit_2d_drawlist(ptMessageDrawlist, ptRenderEncoder, fWidth, fHeight, pl_graphics_get_swapchain_info(gptStarter->get_swapchain()).tSampleCount);
752755
gptStarter->end_main_pass();
753756
pl_end_cpu_sample(gptProfile, 0);
754757
gptStarter->end_frame();
@@ -952,7 +955,7 @@ pl__show_editor_window(plAppData* ptAppData)
952955
if(ImGui::CollapsingHeader(ICON_FA_CIRCLE_INFO " Information"))
953956
{
954957
ImGui::Text("Pilot Light %s", PILOT_LIGHT_VERSION_STRING);
955-
ImGui::Text("Graphics Backend: %s", gptGfx->get_backend_string());
958+
ImGui::Text("Graphics Backend: %s", pl_graphics_get_backend_string());
956959
if(ImGui::Button("Show Camera Controls"))
957960
{
958961
const char* acMouseInfo = "Camera Controls\n"
@@ -1277,7 +1280,8 @@ pl__show_editor_window(plAppData* ptAppData)
12771280

12781281
if(ImGui::CollapsingHeader(ICON_FA_BOXES_STACKED " Physics", 0))
12791282
{
1280-
plPhysicsEngineSettings tPhysicsSettings = gptPhysics->get_settings();
1283+
plPhysicsEngineSettings tPhysicsSettings = {};
1284+
gptPhysics->get_settings(&tPhysicsSettings);
12811285

12821286
ImGui::Checkbox("Enabled", &tPhysicsSettings.bEnabled);
12831287
ImGui::Checkbox("Debug Draw", &ptAppData->bPhysicsDebugDraw);

editor/editor.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ Index of this file:
4040
#include "pl_profile_ext.h"
4141
#include "pl_log_ext.h"
4242
#include "pl_stats_ext.h"
43+
4344
#include "pl_graphics_ext.h"
45+
#include "pl_vfs_ext.h"
46+
#include "pl_datetime_ext.h"
47+
#include "pl_physics_ext.h"
48+
4449
#include "pl_tools_ext.h"
4550
#include "pl_job_ext.h"
4651
#include "pl_draw_ext.h"
@@ -51,10 +56,8 @@ Index of this file:
5156
#include "pl_console_ext.h"
5257
#include "pl_screen_log_ext.h"
5358
#include "pl_starter_ext.h"
54-
#include "pl_vfs_ext.h"
5559
#include "pl_compress_ext.h"
5660
#include "pl_pak_ext.h"
57-
#include "pl_datetime_ext.h"
5861

5962
// unstable extensions
6063
#include "pl_ecs_ext.h"
@@ -67,7 +70,7 @@ Index of this file:
6770
#include "pl_renderer_ext.h"
6871
#include "pl_ecs_tools_ext.h"
6972
#include "pl_gizmo_ext.h"
70-
#include "pl_physics_ext.h"
73+
7174
#include "pl_collision_ext.h"
7275
#include "pl_bvh_ext.h"
7376
#include "pl_shader_variant_ext.h"
@@ -82,6 +85,8 @@ Index of this file:
8285
#include "imgui.h"
8386
#include "implot.h"
8487

88+
89+
8590
//-----------------------------------------------------------------------------
8691
// [SECTION] global apis
8792
//-----------------------------------------------------------------------------

0 commit comments

Comments
 (0)