Add a boolean to cinder::gl::Fbo::readPixels8u and cinder::gl::Fbo::r…#2218
Add a boolean to cinder::gl::Fbo::readPixels8u and cinder::gl::Fbo::r…#2218willemkempers wants to merge 1 commit intocinder:masterfrom
Conversation
…eadPixels32f to enable or disable the alpha channel in the returned Surface8u or Surface32f
|
The primary reason I would call readPixels is because I have to output the data in the FBO to some physical device - generally LED's. As LED's do not have alpha channels, I would have to remove the alpha channel from the Surface before being able to output to my devices. The cinder::SurfaceT constructor already provides a boolean to enable or disable the alpha channel, hence why I think it makes sense to add the option to the cinder::gl::Fbo::readPixels methods as well. |
|
This doesn't seem to work on a Raspberry Pi 4 running Raspbian GNU/Linux 10 (buster) unfortunately. Using I'd personally still really like to see something along these lines, it could be really useful in combination with LibOLA for example. I'd love to see the readPixels method be expanded to be able to return a single ChannelT, rather than a SurfaceT. Would be very useful for outputting to monochrome LEDs. If I find anything I'll update this thread! |
…eadPixels32f to enable or disable the alpha channel in the returned Surface8u or Surface32f.