Skip to content

Commit e014f65

Browse files
committed
Added accessors for local shader options in camera for Lua, added hdr pack to player on Mac
1 parent 4190881 commit e014f65

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

Core/Contents/Include/PolyCamera.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ namespace Polycode {
185185
*/
186186
std::vector<ShaderBinding*> getLocalShaderOptions() { return localShaderOptions; }
187187

188+
unsigned int getNumLocalShaderOptions() const;
189+
ShaderBinding* getLocalShaderOption(unsigned int index) const;
190+
188191
/**
189192
* Returns the shader material applied to the camera.
190193
*/

Core/Contents/Source/PolyCamera.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,17 @@ Number Camera::getOrthoSizeY() {
136136
return orthoSizeY;
137137
}
138138

139+
unsigned int Camera::getNumLocalShaderOptions()const {
140+
return localShaderOptions.size();
141+
}
142+
143+
ShaderBinding* Camera::getLocalShaderOption(unsigned int index) const {
144+
if(index < localShaderOptions.size()) {
145+
return localShaderOptions[index];
146+
} else {
147+
return NULL;
148+
}
149+
}
139150

140151
void Camera::buildFrustumPlanes() {
141152

Player/Contents/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@ endif()
283283
COMMAND cp ${Polycode_SOURCE_DIR}/Player/Contents/Platform/Darwin/player_icon.icns ${PROJECT_BINARY_DIR}/Player/Contents/\${CONFIGURATION}/PolycodePlayer.app/Contents/Resources)
284284
add_custom_command (TARGET PolycodePlayer PRE_BUILD
285285
COMMAND cp ${Polycode_SOURCE_DIR}/Assets/Default\ asset\ pack/default.pak ${PROJECT_BINARY_DIR}/Player/Contents/\${CONFIGURATION}/PolycodePlayer.app/Contents/Resources)
286+
add_custom_command (TARGET PolycodePlayer PRE_BUILD
287+
COMMAND cp ${Polycode_SOURCE_DIR}/Assets/Default\ asset\ pack/hdr.pak ${PROJECT_BINARY_DIR}/Player/Contents/\${CONFIGURATION}/PolycodePlayer.app/Contents/Resources)
286288
add_custom_command (TARGET PolycodePlayer PRE_BUILD
287289
COMMAND cp -R ${Polycode_SOURCE_DIR}/Bindings/Contents/LUA/API/api.pak ${PROJECT_BINARY_DIR}/Player/Contents/\${CONFIGURATION}/PolycodePlayer.app/Contents/Resources)
288290
add_custom_command (TARGET PolycodePlayer PRE_BUILD
@@ -300,6 +302,8 @@ endif()
300302
COMMAND cp ${Polycode_SOURCE_DIR}/Player/Contents/Platform/Darwin/player_icon.icns ${PROJECT_BINARY_DIR}/Player/Contents/\${CONFIGURATION}/StandalonePlayer.app/Contents/Resources)
301303
add_custom_command (TARGET StandalonePlayer PRE_BUILD
302304
COMMAND cp ${Polycode_SOURCE_DIR}/Assets/Default\ asset\ pack/default.pak ${PROJECT_BINARY_DIR}/Player/Contents/\${CONFIGURATION}/StandalonePlayer.app/Contents/Resources)
305+
add_custom_command (TARGET StandalonePlayer PRE_BUILD
306+
COMMAND cp ${Polycode_SOURCE_DIR}/Assets/Default\ asset\ pack/hdr.pak ${PROJECT_BINARY_DIR}/Player/Contents/\${CONFIGURATION}/StandalonePlayer.app/Contents/Resources)
303307
add_custom_command (TARGET StandalonePlayer PRE_BUILD
304308
COMMAND cp -R ${Polycode_SOURCE_DIR}/Bindings/Contents/LUA/API/api.pak ${PROJECT_BINARY_DIR}/Player/Contents/\${CONFIGURATION}/StandalonePlayer.app/Contents/Resources)
305309
add_custom_command (TARGET StandalonePlayer PRE_BUILD

0 commit comments

Comments
 (0)