Skip to content

Conversation

@DanielArnett
Copy link

As well as the option of adding a second texture to render.

@DanielArnett
Copy link
Author

Check this line before merging. It doesn't seem to be causing problems, but I wanted to make sure it was okay with you that I'm setting it to use GL_SRGB8_ALPHA8 instead of GL_SRGB8 in OpenGL.

Comment on lines 191 to 192
cv::Mat localSrc = src.clone();
cv::Mat localSecond = secondSrc.clone();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two lines cause the error below in my environment.

/home/mohammedari/catkin_opengl2/devel/.private/opengl_ros_lib/lib/libopengl_ros_lib.so: undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
@mohammedari
Copy link
Owner

mohammedari commented Dec 11, 2019

Textures with the internal format of 'GL_SRGB8_ALPHA8' work with RGB input/output in my environment as I tested. It requires additional computational cost since glTexSubImage2D function converts RGB to RGBA, but it is trivial.

I think it would be OK to use GL_SRGB8_ALPHA8 for internal format.
I would like to merge if build issue with clone() lines in simple_renderer.cpp is solved.

Many thanks!

@DanielArnett
Copy link
Author

Okay I deleted those lines. They were only used for debugging before. Good catch!

@mohammedari mohammedari merged commit f6f16c2 into mohammedari:master Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants