Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffstadt committed Dec 12, 2024
1 parent c49a6ea commit 9321ee7
Show file tree
Hide file tree
Showing 18 changed files with 50 additions and 65 deletions.
6 changes: 4 additions & 2 deletions extensions/pl_graphics_metal.m
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,9 @@
else if(tDesc.tType == PL_TEXTURE_TYPE_CUBE)
ptTextureDescriptor.textureType = MTLTextureTypeCube;
else if(tDesc.tType == PL_TEXTURE_TYPE_2D_ARRAY)
{
ptTextureDescriptor.textureType = MTLTextureType2DArray;
}
else
{
PL_ASSERT(false && "unsupported texture type");
Expand Down Expand Up @@ -859,7 +861,7 @@
for(uint32_t i = 0; i < ptLayout->_uTextureBindingCount; i++)
{
uint32_t uCurrentDescriptorCount = ptLayout->atTextureBindings[i].uDescriptorCount;
if(uCurrentDescriptorCount== 0)
if(uCurrentDescriptorCount == 0)
uCurrentDescriptorCount = 1;
if(uCurrentDescriptorCount > 1)
uDescriptorCount += ptLayout->atTextureBindings[i].uDescriptorCount - 1;
Expand Down Expand Up @@ -888,7 +890,7 @@

plMetalBindGroup* ptMetalBindGroup = &ptDevice->sbtBindGroupsHot[tHandle.uIndex];
plBindGroup* ptBindGroup = pl__get_bind_group(ptDevice, tHandle);
ptMetalBindGroup->uHeapCount = 0;
// ptMetalBindGroup->uHeapCount = 0;
const char* pcDescriptorStart = ptMetalBindGroup->tShaderArgumentBuffer.contents;

uint64_t* pulDescriptorStart = (uint64_t*)&pcDescriptorStart[ptMetalBindGroup->uOffset];
Expand Down
13 changes: 7 additions & 6 deletions extensions/pl_renderer_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,8 @@ pl_refr_create_scene(void)
{.uSlot = 3, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL}
},
.atTextureBindings = {
{.uSlot = 4, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = 4096, ._bVariableDescriptorCount = true},
{.uSlot = 5, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = 4096, ._bVariableDescriptorCount = true}
{.uSlot = 4, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = PL_MAX_BINDLESS_TEXTURES, ._bVariableDescriptorCount = true},
{.uSlot = 4100, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = PL_MAX_BINDLESS_TEXTURES, ._bVariableDescriptorCount = true}
}
};

Expand Down Expand Up @@ -1160,6 +1160,7 @@ pl_refr_cleanup(void)
pl_hm_free(ptScene->ptForwardHashmap);
pl_hm_free(ptScene->ptMaterialHashmap);
pl_hm_free(ptScene->ptTextureIndexHashmap);
pl_hm_free(ptScene->ptCubeTextureIndexHashmap);
gptECS->cleanup_component_library(&ptScene->tComponentLibrary);
}
for(uint32_t i = 0; i < pl_sb_size(gptData->_sbtVariantHandles); i++)
Expand Down Expand Up @@ -2207,8 +2208,8 @@ pl_refr_reload_scene_shaders(uint32_t uSceneHandle)
{.uSlot = 3, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL}
},
.atTextureBindings = {
{.uSlot = 4, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = 4096, ._bVariableDescriptorCount = true},
{.uSlot = 5, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = 4096, ._bVariableDescriptorCount = true}
{.uSlot = 4, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = PL_MAX_BINDLESS_TEXTURES, ._bVariableDescriptorCount = true},
{.uSlot = 4100, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = PL_MAX_BINDLESS_TEXTURES, ._bVariableDescriptorCount = true}
}
},
{
Expand Down Expand Up @@ -2777,8 +2778,8 @@ pl_refr_finalize_scene(uint32_t uSceneHandle)
{.uSlot = 3, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL}
},
.atTextureBindings = {
{.uSlot = 4, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = 4096, ._bVariableDescriptorCount = true},
{.uSlot = 5, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = 4096, ._bVariableDescriptorCount = true}
{.uSlot = 4, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = PL_MAX_BINDLESS_TEXTURES, ._bVariableDescriptorCount = true},
{.uSlot = 4100, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = PL_MAX_BINDLESS_TEXTURES, ._bVariableDescriptorCount = true}
}
},
{
Expand Down
14 changes: 7 additions & 7 deletions extensions/pl_renderer_internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1193,8 +1193,8 @@ pl_refr_create_global_shaders(void)
{.uSlot = 3, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL}
},
.atTextureBindings = {
{.uSlot = 4, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = 4096, ._bVariableDescriptorCount = true},
{.uSlot = 5, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = 4096, ._bVariableDescriptorCount = true}
{.uSlot = 4, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = PL_MAX_BINDLESS_TEXTURES, ._bVariableDescriptorCount = true},
{.uSlot = 4100, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = PL_MAX_BINDLESS_TEXTURES, ._bVariableDescriptorCount = true}
}
},
{
Expand Down Expand Up @@ -1262,8 +1262,8 @@ pl_refr_create_global_shaders(void)
{.uSlot = 3, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL}
},
.atTextureBindings = {
{.uSlot = 4, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = 4096, ._bVariableDescriptorCount = true},
{.uSlot = 5, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = 4096, ._bVariableDescriptorCount = true}
{.uSlot = 4, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = PL_MAX_BINDLESS_TEXTURES, ._bVariableDescriptorCount = true},
{.uSlot = 4100, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = PL_MAX_BINDLESS_TEXTURES, ._bVariableDescriptorCount = true}
}
},
{
Expand Down Expand Up @@ -1335,8 +1335,8 @@ pl_refr_create_global_shaders(void)
{.uSlot = 3, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL}
},
.atTextureBindings = {
{.uSlot = 4, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = 4096, ._bVariableDescriptorCount = true},
{.uSlot = 5, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = 4096, ._bVariableDescriptorCount = true}
{.uSlot = 4, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = PL_MAX_BINDLESS_TEXTURES, ._bVariableDescriptorCount = true},
{.uSlot = 4100, .tStages = PL_STAGE_VERTEX | PL_STAGE_PIXEL, .tType = PL_TEXTURE_BINDING_TYPE_SAMPLED, .uDescriptorCount = PL_MAX_BINDLESS_TEXTURES, ._bVariableDescriptorCount = true}
}
},
{
Expand Down Expand Up @@ -1976,7 +1976,7 @@ pl__get_bindless_cube_texture_index(uint32_t uSceneHandle, plTextureHandle tText
const plBindGroupUpdateTextureData tGlobalTextureData[] = {
{
.tTexture = tTexture,
.uSlot = 5,
.uSlot = 4100,
.uIndex = (uint32_t)ulValue,
.tType = PL_TEXTURE_BINDING_TYPE_SAMPLED
},
Expand Down
2 changes: 2 additions & 0 deletions extensions/pl_renderer_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ Index of this file:
#define PL_DEVICE_BUDDY_BLOCK_SIZE 268435456
#endif

#define PL_MAX_BINDLESS_TEXTURES 4096

#ifdef PL_UNITY_BUILD
#include "pl_unity_ext.inc"
#else
Expand Down
15 changes: 2 additions & 13 deletions extensions/pl_script_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,7 @@ pl_load_script(plApiRegistryI* ptApiRegistry, bool bReload)
.run = pl_script_run
};

#ifdef PL_CONFIG_DEBUG
ptApiRegistry->set_api("pl_script_camerad", plScriptI_version, &tApi, sizeof(plScriptI));
#endif
#ifdef PL_CONFIG_RELEASE
ptApiRegistry->set_api("pl_script_camera", plScriptI_version, &tApi, sizeof(plScriptI));
#endif
ptApiRegistry->set_api("pl_script_camera", plScriptI_version, &tApi, sizeof(plScriptI));
}

PL_EXPORT void
Expand All @@ -108,12 +103,6 @@ pl_unload_script(plApiRegistryI* ptApiRegistry, bool bReload)
if(bReload)
return;


#ifdef PL_CONFIG_DEBUG
const plScriptI* ptApi = ptApiRegistry->get_api("pl_script_camerad", plScriptI_version);
#endif
#ifdef PL_CONFIG_RELEASE
const plScriptI* ptApi = ptApiRegistry->get_api("pl_script_camera", plScriptI_version);
#endif
const plScriptI* ptApi = ptApiRegistry->get_api("pl_script_camera", plScriptI_version);
ptApiRegistry->remove_api(ptApi);
}
6 changes: 1 addition & 5 deletions sandbox/app.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,7 @@ pl_app_load(plApiRegistryI* ptApiRegistry, plEditorData* ptEditorData)
ptEditorData->tMainCamera = gptEcs->create_perspective_camera(ptMainComponentLibrary, "main camera", (plVec3){-9.6f, 2.096f, 0.86f}, PL_PI_3, ptIO->tMainViewportSize.x / ptIO->tMainViewportSize.y, 0.1f, 48.0f, &ptMainCamera);
gptCamera->set_pitch_yaw(ptMainCamera, -0.245f, 1.816f);
gptCamera->update(ptMainCamera);
#ifdef PL_CONFIG_DEBUG
gptEcs->attach_script(ptMainComponentLibrary, "pl_script_camerad", PL_SCRIPT_FLAG_PLAYING, ptEditorData->tMainCamera, NULL);
#else
gptEcs->attach_script(ptMainComponentLibrary, "pl_script_camera", PL_SCRIPT_FLAG_PLAYING, ptEditorData->tMainCamera, NULL);
#endif
gptEcs->attach_script(ptMainComponentLibrary, "pl_script_camera", PL_SCRIPT_FLAG_PLAYING, ptEditorData->tMainCamera, NULL);

// create cull camera
plCameraComponent* ptCullCamera = NULL;
Expand Down
7 changes: 1 addition & 6 deletions scripts/gen_dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,12 @@
with pl.target("pl_script_camera", pl.TargetType.DYNAMIC_LIBRARY, True):

pl.add_source_files("../extensions/pl_script_camera.c")
pl.set_output_binary("pl_script_camera")


# default config
with pl.configuration("debug"):

pl.set_output_binary("pl_script_camerad")

# win32
with pl.platform("Windows"):
with pl.compiler("msvc"):
Expand All @@ -208,8 +207,6 @@
# release
with pl.configuration("release"):

pl.set_output_binary("pl_script_camera")

# win32
with pl.platform("Windows"):
with pl.compiler("msvc"):
Expand All @@ -228,8 +225,6 @@
# vulkan on macos
with pl.configuration("vulkan"):

pl.set_output_binary("pl_script_camera")

# macos
with pl.platform("Darwin"):
with pl.compiler("clang"):
Expand Down
4 changes: 2 additions & 2 deletions shaders/lighting.frag
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ layout(set = 0, binding = 1) readonly buffer plMaterialInfo
} tMaterialInfo;
layout(set = 0, binding = 2) uniform sampler tDefaultSampler;
layout(set = 0, binding = 3) uniform sampler tEnvSampler;
layout(set = 0, binding = 4) uniform texture2D at2DTextures[1];
layout(set = 0, binding = 5) uniform textureCube atCubeTextures[1];
layout(set = 0, binding = 4) uniform texture2D at2DTextures[4096];
layout(set = 0, binding = 4100) uniform textureCube atCubeTextures[4096];

//-----------------------------------------------------------------------------
// [SECTION] bind group 1
Expand Down
4 changes: 2 additions & 2 deletions shaders/lighting.vert
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ layout(set = 0, binding = 1) readonly buffer plMaterialInfo
layout(set = 0, binding = 2) uniform sampler tDefaultSampler;
layout(set = 0, binding = 3) uniform sampler tEnvSampler;

layout(set = 0, binding = 4) uniform texture2D at2DTextures[1];
layout(set = 0, binding = 5) uniform textureCube atCubeTextures[1];
layout(set = 0, binding = 4) uniform texture2D at2DTextures[4096];
layout(set = 0, binding = 4100) uniform textureCube atCubeTextures[4096];

//-----------------------------------------------------------------------------
// [SECTION] dynamic bind group
Expand Down
4 changes: 2 additions & 2 deletions shaders/primitive.frag
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ layout(set = 0, binding = 1) readonly buffer plMaterialInfo

layout(set = 0, binding = 2) uniform sampler tDefaultSampler;
layout(set = 0, binding = 3) uniform sampler tEnvSampler;
layout(set = 0, binding = 4) uniform texture2D at2DTextures[1];
layout(set = 0, binding = 5) uniform textureCube atCubeTextures[1];
layout(set = 0, binding = 4) uniform texture2D at2DTextures[4096];
layout(set = 0, binding = 4100) uniform textureCube atCubeTextures[4096];

//-----------------------------------------------------------------------------
// [SECTION] bind group 1
Expand Down
4 changes: 2 additions & 2 deletions shaders/primitive.vert
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ layout(set = 0, binding = 1) readonly buffer plMaterialInfo

layout(set = 0, binding = 2) uniform sampler tDefaultSampler;
layout(set = 0, binding = 3) uniform sampler tEnvSampler;
layout(set = 0, binding = 4) uniform texture2D at2DTextures[1];
layout(set = 0, binding = 5) uniform textureCube atCubeTextures[1];
layout(set = 0, binding = 4) uniform texture2D at2DTextures[4096];
layout(set = 0, binding = 4100) uniform textureCube atCubeTextures[4096];

//-----------------------------------------------------------------------------
// [SECTION] bind group 2
Expand Down
4 changes: 2 additions & 2 deletions shaders/shadow.frag
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ layout(set = 0, binding = 1) readonly buffer plMaterialInfo

layout(set = 0, binding = 2) uniform sampler tDefaultSampler;
layout(set = 0, binding = 3) uniform sampler tEnvSampler;
layout(set = 0, binding = 4) uniform texture2D at2DTextures[1];
layout(set = 0, binding = 5) uniform textureCube atCubeTextures[1];
layout(set = 0, binding = 4) uniform texture2D at2DTextures[4096];
layout(set = 0, binding = 4100) uniform textureCube atCubeTextures[4096];

//-----------------------------------------------------------------------------
// [SECTION] bind group 1
Expand Down
4 changes: 2 additions & 2 deletions shaders/shadow.vert
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ layout(set = 0, binding = 1) readonly buffer plMaterialInfo

layout(set = 0, binding = 2) uniform sampler tDefaultSampler;
layout(set = 0, binding = 3) uniform sampler tEnvSampler;
layout(set = 0, binding = 4) uniform texture2D at2DTextures[1];
layout(set = 0, binding = 5) uniform textureCube atCubeTextures[1];
layout(set = 0, binding = 4) uniform texture2D at2DTextures[4096];
layout(set = 0, binding = 4100) uniform textureCube atCubeTextures[4096];

//-----------------------------------------------------------------------------
// [SECTION] bind group 0
Expand Down
4 changes: 2 additions & 2 deletions shaders/transparent.frag
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ layout(set = 0, binding = 1) readonly buffer plMaterialInfo

layout(set = 0, binding = 2) uniform sampler tDefaultSampler;
layout(set = 0, binding = 3) uniform sampler tEnvSampler;
layout(set = 0, binding = 4) uniform texture2D at2DTextures[1];
layout(set = 0, binding = 5) uniform textureCube atCubeTextures[1];
layout(set = 0, binding = 4) uniform texture2D at2DTextures[4096];
layout(set = 0, binding = 4100) uniform textureCube atCubeTextures[4096];

//-----------------------------------------------------------------------------
// [SECTION] bind group 1
Expand Down
4 changes: 2 additions & 2 deletions shaders/transparent.vert
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ layout(set = 0, binding = 1) readonly buffer plMaterialInfo

layout(set = 0, binding = 2) uniform sampler tDefaultSampler;
layout(set = 0, binding = 3) uniform sampler tEnvSampler;
layout(set = 0, binding = 4) uniform texture2D at2DTextures[1];
layout(set = 0, binding = 5) uniform textureCube atCubeTextures[1];
layout(set = 0, binding = 4) uniform texture2D at2DTextures[4096];
layout(set = 0, binding = 4100) uniform textureCube atCubeTextures[4096];

//-----------------------------------------------------------------------------
// [SECTION] bind group 1
Expand Down
6 changes: 3 additions & 3 deletions src/build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ else
PL_HOT_RELOAD_STATUS=0
rm -f ../out/pl_unity_ext.so
rm -f ../out/pl_unity_ext_*.so
rm -f ../out/pl_script_camerad.so
rm -f ../out/pl_script_camerad_*.so
rm -f ../out/pl_script_camera.so
rm -f ../out/pl_script_camera_*.so
rm -f ../out/app.so
rm -f ../out/app_*.so
rm -f ../out/pilot_light
Expand Down Expand Up @@ -127,7 +127,7 @@ echo
echo ${YELLOW}Step: pl_script_camera${NC}
echo ${YELLOW}~~~~~~~~~~~~~~~~~~~${NC}
echo ${CYAN}Compiling and Linking...${NC}
gcc -shared $PL_SOURCES $PL_INCLUDE_DIRECTORIES $PL_DEFINES $PL_COMPILER_FLAGS $PL_INCLUDE_DIRECTORIES $PL_LINK_DIRECTORIES $PL_LINKER_FLAGS $PL_STATIC_LINK_LIBRARIES $PL_DYNAMIC_LINK_LIBRARIES -o "./../out/pl_script_camerad.so"
gcc -shared $PL_SOURCES $PL_INCLUDE_DIRECTORIES $PL_DEFINES $PL_COMPILER_FLAGS $PL_INCLUDE_DIRECTORIES $PL_LINK_DIRECTORIES $PL_LINKER_FLAGS $PL_STATIC_LINK_LIBRARIES $PL_DYNAMIC_LINK_LIBRARIES -o "./../out/pl_script_camera.so"

# check build status
if [ $? -ne 0 ]
Expand Down
6 changes: 3 additions & 3 deletions src/build_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ else
PL_HOT_RELOAD_STATUS=0
rm -f ../out/pl_unity_ext.dylib
rm -f ../out/pl_unity_ext_*.dylib
rm -f ../out/pl_script_camerad.dylib
rm -f ../out/pl_script_camerad_*.dylib
rm -f ../out/pl_script_camera.dylib
rm -f ../out/pl_script_camera_*.dylib
rm -f ../out/app.dylib
rm -f ../out/app_*.dylib
rm -f ../out/pilot_light
Expand Down Expand Up @@ -146,7 +146,7 @@ echo
echo ${YELLOW}Step: pl_script_camera${NC}
echo ${YELLOW}~~~~~~~~~~~~~~~~~~~${NC}
echo ${CYAN}Compiling and Linking...${NC}
clang -shared $PL_SOURCES $PL_INCLUDE_DIRECTORIES $PL_DEFINES $PL_COMPILER_FLAGS $PL_INCLUDE_DIRECTORIES $PL_LINK_DIRECTORIES $PL_LINKER_FLAGS $PL_STATIC_LINK_LIBRARIES $PL_DYNAMIC_LINK_LIBRARIES $PL_LINK_FRAMEWORKS -o "./../out/pl_script_camerad.dylib"
clang -shared $PL_SOURCES $PL_INCLUDE_DIRECTORIES $PL_DEFINES $PL_COMPILER_FLAGS $PL_INCLUDE_DIRECTORIES $PL_LINK_DIRECTORIES $PL_LINKER_FLAGS $PL_STATIC_LINK_LIBRARIES $PL_DYNAMIC_LINK_LIBRARIES $PL_LINK_FRAMEWORKS -o "./../out/pl_script_camera.dylib"

# check build status
if [ $? -ne 0 ]
Expand Down
8 changes: 4 additions & 4 deletions src/build_win32.bat
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@
@if exist "../out/pl_unity_ext.dll" del "..\out\pl_unity_ext.dll"
@if exist "../out/pl_unity_ext_*.dll" del "..\out\pl_unity_ext_*.dll"
@if exist "../out/pl_unity_ext_*.pdb" del "..\out\pl_unity_ext_*.pdb"
@if exist "../out/pl_script_camerad.dll" del "..\out\pl_script_camerad.dll"
@if exist "../out/pl_script_camerad_*.dll" del "..\out\pl_script_camerad_*.dll"
@if exist "../out/pl_script_camerad_*.pdb" del "..\out\pl_script_camerad_*.pdb"
@if exist "../out/pl_script_camera.dll" del "..\out\pl_script_camera.dll"
@if exist "../out/pl_script_camera_*.dll" del "..\out\pl_script_camera_*.dll"
@if exist "../out/pl_script_camera_*.pdb" del "..\out\pl_script_camera_*.pdb"
@if exist "../out/app.dll" del "..\out\app.dll"
@if exist "../out/app_*.dll" del "..\out\app_*.dll"
@if exist "../out/app_*.pdb" del "..\out\app_*.pdb"
Expand Down Expand Up @@ -132,7 +132,7 @@ cl %PL_INCLUDE_DIRECTORIES% %PL_DEFINES% %PL_COMPILER_FLAGS% %PL_SOURCES% -Fe"..
@echo Step: pl_script_camera
@echo ~~~~~~~~~~~~~~~~~~~~~~
@echo Compiling and Linking...
cl %PL_INCLUDE_DIRECTORIES% %PL_DEFINES% %PL_COMPILER_FLAGS% %PL_SOURCES% -Fe"../out/pl_script_camerad.dll" -Fo"../out/" -LD -link %PL_LINKER_FLAGS% -PDB:"../out/pl_script_camerad_%random%.pdb" %PL_LINK_DIRECTORIES%
cl %PL_INCLUDE_DIRECTORIES% %PL_DEFINES% %PL_COMPILER_FLAGS% %PL_SOURCES% -Fe"../out/pl_script_camera.dll" -Fo"../out/" -LD -link %PL_LINKER_FLAGS% -PDB:"../out/pl_script_camera_%random%.pdb" %PL_LINK_DIRECTORIES%

:: check build status
@set PL_BUILD_STATUS=%ERRORLEVEL%
Expand Down

0 comments on commit 9321ee7

Please sign in to comment.