Skip to content

Commit

Permalink
Fix --rpr option on OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
yozhijk committed Sep 7, 2017
1 parent 4ab00f9 commit 2f82814
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
16 changes: 8 additions & 8 deletions Rpr/Rpr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ project "Rpr"
kind "SharedLib"
location "../Rpr"
links {"RadeonRays", "CLW", "Calc"}
files { "../Rpr/**.h", "../Rpr/**.cpp", "../Baikal/**.h", "../Baikal/**.cpp", "../BaikalStandalone/Utils/**.cpp", "../BaikalStandalone/Utils/**.h" }
files { "../Rpr/**.h", "../Rpr/**.cpp", "../Baikal/**.h", "../Baikal/**.cpp", "../BaikalStandalone/Utils/config_manager.cpp", "../BaikalStandalone/Utils/config_manager.h" }
removefiles{"../Baikal/main.cpp","../Baikal/main_benchmark.cpp", "../Baikal/ImGUI/imgui_impl_glfw_gl3.cpp"}
includedirs{ "../RadeonRays/RadeonRays/include", "../RadeonRays/CLW", "../Baikal", "../BaikalStandalone", "." }

Expand All @@ -21,9 +21,9 @@ project "Rpr"

links {"RadeonRays",}
links {"glew", "OpenGL32"}
libdirs { "../3rdparty/glew/lib/%{cfg.platform}",
"../3rdparty/freeglut/lib/%{cfg.platform}",
"../3rdparty/embree/lib/%{cfg.platform}",
libdirs { "../3rdparty/glew/lib/%{cfg.platform}",
"../3rdparty/freeglut/lib/%{cfg.platform}",
"../3rdparty/embree/lib/%{cfg.platform}",
"../3rdparty/oiio/lib/%{cfg.platform}"}

configuration {"Debug"}
Expand Down Expand Up @@ -75,13 +75,13 @@ project "Rpr"
configuration {"x64", "Release"}
targetdir "../Bin/Release/x64"
configuration {}

if os.is("windows") then
postbuildcommands {
'copy "..\\3rdparty\\glew\\bin\\%{cfg.platform}\\glew32.dll" "%{cfg.buildtarget.directory}"',
postbuildcommands {
'copy "..\\3rdparty\\glew\\bin\\%{cfg.platform}\\glew32.dll" "%{cfg.buildtarget.directory}"',
'copy "..\\3rdparty\\embree\\bin\\%{cfg.platform}\\embree.dll" "%{cfg.buildtarget.directory}"',
'copy "..\\3rdparty\\embree\\bin\\%{cfg.platform}\\tbb.dll" "%{cfg.buildtarget.directory}"',
'copy "..\\3rdparty\\oiio\\bin\\%{cfg.platform}\\OpenImageIO.dll" "%{cfg.buildtarget.directory}"',
'copy "..\\3rdparty\\oiio\\bin\\%{cfg.platform}\\OpenImageIOD.dll" "%{cfg.buildtarget.directory}"'
'copy "..\\3rdparty\\oiio\\bin\\%{cfg.platform}\\OpenImageIOD.dll" "%{cfg.buildtarget.directory}"'
}
end
8 changes: 4 additions & 4 deletions Rpr/WrapObject/ContextObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ void ContextObject::GetRenderStatistics(void * out_data, size_t * out_size_ret)
rs->gpumem_usage = 0;
rs->gpumem_total = 0;
rs->gpumem_max_allocation = 0;
for (const auto& cfg : m_cfgs)
{
//for (const auto& cfg : m_cfgs)
//{
// TODO: implement me
//rs->gpumem_usage += cfg.renderer->GetWorkingSetSize();
//rs->gpumem_total += cfg.renderer->GetWorkingSetSize();
//rs->gpumem_max_allocation += cfg.renderer->GetWorkingSetSize();
}
//}
}
if (out_size_ret)
{
Expand Down Expand Up @@ -335,4 +335,4 @@ void ContextObject::SetParameter(const std::string& input, const std::string& va
{
throw Exception(RPR_ERROR_INVALID_PARAMETER_TYPE, "ContextObject: invalid context input type.");
}
}
}
3 changes: 2 additions & 1 deletion Rpr/WrapObject/ShapeObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ ShapeObject* ShapeObject::CreateMesh(rpr_float const * in_vertices, size_t in_nu
mesh->SetUVs(uvs.data(), uvs.size() / 2);
mesh->SetIndices(inds.data(), inds.size());

return new ShapeObject(mesh, false);
return new ShapeObject(mesh, nullptr);
}

void ShapeObject::SetMaterial(MaterialObject* mat)
{
if (mat)
Expand Down

0 comments on commit 2f82814

Please sign in to comment.