Cinder icon indicating copy to clipboard operation
Cinder copied to clipboard

Updated Texture throughout to allow for passing dataformat

Open ryanbartley opened this issue 9 years ago • 2 comments

This pr allows the ability to set up fast path textures with dataType = GL_UNSIGNED_INT_8_8_8_8_REV and dataFormat = GL_BGRA. Currently dataFormat is chosen by default in Cinder. This brings the dataFormat argument of glTex* functions in line with internalFormat and dataType. Fast path textures are textures that the driver implementation doesn't have to convert as many GPU's implement GL_RGBA memory layout as BGRA. This form of texture format is not available without hand rolling a texture and handing it over to cinder.

ryanbartley avatar Oct 18 '16 16:10 ryanbartley

Hey Ryan, this PR looks clean and serves a useful purpose, so you have my support. One thing I would like to say is that I, personally, have a hard time remembering what the difference is between data type and data format and so I often look at the comments to see examples of them. Could you add a few more comments, too?

paulhoux avatar Nov 04 '16 20:11 paulhoux

Absolutely. I'll go back through tonight.

ryanbartley avatar Nov 04 '16 20:11 ryanbartley