mohammedari / opengl_ros

A simple implementation to utilize OpenGL shader (GLSL) code with a GPU-powered machine under ROS environment
MIT License
10 stars 2 forks source link

Enabling the use of BGRA in addition to BGR #2

Closed DanielArnett closed 4 years ago

DanielArnett commented 4 years ago

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

DanielArnett commented 4 years ago

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.

mohammedari commented 4 years ago

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 commented 4 years ago

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