Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/OpenColorIO/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,12 @@ if(NOT WIN32)

# Install the pkg-config file.

include(GNUInstallDirs)

set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix "\${prefix}")
set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
set(includedir "\${exec_prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
configure_file(res/OpenColorIO.pc.in ${CMAKE_CURRENT_BINARY_DIR}/OpenColorIO.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/OpenColorIO.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
endif()
Expand Down
6 changes: 4 additions & 2 deletions src/apps/ociochecklut/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ int main (int argc, const char* argv[])
bool verbose = false;
bool help = false;
bool test = false;
bool invlut = false;
bool usegpu = false;
bool usegpuLegacy = false;
bool outputgpuInfo = false;
Expand All @@ -197,8 +198,8 @@ int main (int argc, const char* argv[])
"-t", &test, "Test a set a predefined RGB values",
"-v", &verbose, "Verbose",
"--help", &help, "Print help message",
"-t", &test, "Test a set a predefined RGB values\n",
"--gpu", &usegpu, "Use GPU instead of CPU\n",
"--inv", &invlut, "Apply LUT in inverse direction",
"--gpu", &usegpu, "Use GPU instead of CPU",
"--gpulegacy", &usegpuLegacy, "Use the legacy (i.e. baked) GPU color processing "
"instead of the CPU one (--gpu is ignored)",
"--gpuinfo", &outputgpuInfo, "Output the OCIO shader program",
Expand Down Expand Up @@ -257,6 +258,7 @@ int main (int argc, const char* argv[])
OCIO::FileTransformRcPtr t = OCIO::FileTransform::Create();
t->setSrc(inputfile.c_str());
t->setInterpolation(OCIO::INTERP_BEST);
t->setDirection(invlut ? OCIO::TRANSFORM_DIR_INVERSE : OCIO::TRANSFORM_DIR_FORWARD);

ProcessorWrapper proc(outputgpuInfo);
try
Expand Down
18 changes: 9 additions & 9 deletions src/libutils/oglapphelpers/oglapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ void OglApp::initImage(int imgWidth, int imgHeight, Components comp, const float

void OglApp::updateImage(const float * image)
{
const GLenum format = m_components == COMPONENTS_RGB ? GL_RGB : GL_RGBA;
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, m_imageTexID);

const GLenum format = m_components == COMPONENTS_RGB ? GL_RGB : GL_RGBA;
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F_ARB, m_imageWidth, m_imageHeight, 0,
format, GL_FLOAT, &image[0]);
}
Expand Down Expand Up @@ -111,6 +113,12 @@ void OglApp::redisplay()
std::swap(pts[1], pts[3]);
}

// Update the uniform values in case one changed.
if (m_oglBuilder)
{
m_oglBuilder->useAllUniforms();
}

glEnable(GL_TEXTURE_2D);
glClearColor(0.2f, 0.2f, 0.2f, 0.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
Expand Down Expand Up @@ -214,14 +222,6 @@ void OglApp::setShader(GpuShaderDescRcPtr & shaderDesc)
m_oglBuilder->useAllUniforms();
}

void OglApp::updateUniforms()
{
if (m_oglBuilder)
{
m_oglBuilder->useAllUniforms();
}
}

void OglApp::printGLInfo() const noexcept
{
std::cout << std::endl
Expand Down
3 changes: 0 additions & 3 deletions src/libutils/oglapphelpers/oglapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,6 @@ class OglApp
// application it should be called by the glutReshapeFunc callback using the windows size.
void reshape(int width, int height);

// To be called after changing dynamic properties and before calling redisplay.
void updateUniforms();

// Process the image.
void virtual redisplay();

Expand Down
2 changes: 0 additions & 2 deletions tests/gpu/GPUUnitTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,6 @@ int main(int, char **)
{
// Call the retest callback.
test->retestSetup(idx - 1);
// Update uniforms with dynamic properties.
app->updateUniforms();
}

// Process the image texture into the rendering buffer.
Expand Down