Skip to content

Commit

Permalink
Added accessors for local shader options in camera for Lua, added hdr…
Browse files Browse the repository at this point in the history
… pack to player on Mac
  • Loading branch information
ivansafrin committed Jun 4, 2014
1 parent 4190881 commit e014f65
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Core/Contents/Include/PolyCamera.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ namespace Polycode {
*/
std::vector<ShaderBinding*> getLocalShaderOptions() { return localShaderOptions; }

unsigned int getNumLocalShaderOptions() const;
ShaderBinding* getLocalShaderOption(unsigned int index) const;

/**
* Returns the shader material applied to the camera.
*/
Expand Down
11 changes: 11 additions & 0 deletions Core/Contents/Source/PolyCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,17 @@ Number Camera::getOrthoSizeY() {
return orthoSizeY;
}

unsigned int Camera::getNumLocalShaderOptions()const {
return localShaderOptions.size();
}

ShaderBinding* Camera::getLocalShaderOption(unsigned int index) const {
if(index < localShaderOptions.size()) {
return localShaderOptions[index];
} else {
return NULL;
}
}

void Camera::buildFrustumPlanes() {

Expand Down
4 changes: 4 additions & 0 deletions Player/Contents/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@ endif()
COMMAND cp ${Polycode_SOURCE_DIR}/Player/Contents/Platform/Darwin/player_icon.icns ${PROJECT_BINARY_DIR}/Player/Contents/\${CONFIGURATION}/PolycodePlayer.app/Contents/Resources)
add_custom_command (TARGET PolycodePlayer PRE_BUILD
COMMAND cp ${Polycode_SOURCE_DIR}/Assets/Default\ asset\ pack/default.pak ${PROJECT_BINARY_DIR}/Player/Contents/\${CONFIGURATION}/PolycodePlayer.app/Contents/Resources)
add_custom_command (TARGET PolycodePlayer PRE_BUILD
COMMAND cp ${Polycode_SOURCE_DIR}/Assets/Default\ asset\ pack/hdr.pak ${PROJECT_BINARY_DIR}/Player/Contents/\${CONFIGURATION}/PolycodePlayer.app/Contents/Resources)
add_custom_command (TARGET PolycodePlayer PRE_BUILD
COMMAND cp -R ${Polycode_SOURCE_DIR}/Bindings/Contents/LUA/API/api.pak ${PROJECT_BINARY_DIR}/Player/Contents/\${CONFIGURATION}/PolycodePlayer.app/Contents/Resources)
add_custom_command (TARGET PolycodePlayer PRE_BUILD
Expand All @@ -300,6 +302,8 @@ endif()
COMMAND cp ${Polycode_SOURCE_DIR}/Player/Contents/Platform/Darwin/player_icon.icns ${PROJECT_BINARY_DIR}/Player/Contents/\${CONFIGURATION}/StandalonePlayer.app/Contents/Resources)
add_custom_command (TARGET StandalonePlayer PRE_BUILD
COMMAND cp ${Polycode_SOURCE_DIR}/Assets/Default\ asset\ pack/default.pak ${PROJECT_BINARY_DIR}/Player/Contents/\${CONFIGURATION}/StandalonePlayer.app/Contents/Resources)
add_custom_command (TARGET StandalonePlayer PRE_BUILD
COMMAND cp ${Polycode_SOURCE_DIR}/Assets/Default\ asset\ pack/hdr.pak ${PROJECT_BINARY_DIR}/Player/Contents/\${CONFIGURATION}/StandalonePlayer.app/Contents/Resources)
add_custom_command (TARGET StandalonePlayer PRE_BUILD
COMMAND cp -R ${Polycode_SOURCE_DIR}/Bindings/Contents/LUA/API/api.pak ${PROJECT_BINARY_DIR}/Player/Contents/\${CONFIGURATION}/StandalonePlayer.app/Contents/Resources)
add_custom_command (TARGET StandalonePlayer PRE_BUILD
Expand Down

0 comments on commit e014f65

Please sign in to comment.