CPUMemoryTOP - up direction for pixel data

Hey all
Another quick one…

I noticed that when filling a texture inside a CPP TOP, the bytes are filled from bottom to top. This is fine, but it doesn’t match the standard in many other places (where it fills from top to bottom).

To the node to correct this, it’s generally cheaper to flip the texture on the GPU. I’m just wondering if there’s a simple/boilerplate way to do this with the existing API. Or would I need to make my own texture and render that to a quad in a new fbo?


Right, that’s OpenGL’s convention which isn’t the same as most APIs or data formats.
Currently there is no way, but I’ll add a new option to the C++ API today that allows you to specify what row the CPU data starts at and do the GPU flip for you after I do the upload.

OK great!
i’ll work upside down until that is released :slight_smile:

Out of curiosity…
I found that the conventions were flipped for OpenGL 3+(?), but was generally remedied by the user’s choice texture coordinate convention. Is that correct?

Not by default in GL3+ no. There were certainly tools and extensions that gave some control of that though to help apps that were running both GL and DX paths.

1 Like