ofPixelFormat pixelFormat


#1

Some classes have a member variable which is ofPixelFormat pixelFormat.
And some of these classes also have same-named arguments of member functions.

such as class ofPixels_,
void allocate(size_t w, size_t h, ofPixelFormat pixelFormat);
ofPixelFormat pixelFormat;

I think it makes troubles seriously.
Actually, ofPixels::setColor is not worked on my Mac(XCode) environment, but same code worked on Windows10 MSVC environment.

Could you please consider improvement?


#2

ofPixelFormat is just an enum that stores the different types of pixel data.

Check here:
https://openframeworks.cc/documentation/graphics/ofPixels/#show_allocate

ofPixels::setColor has never given me any issues on Mac, or on Windows, could you share some code?


#3

My point is, the function “void allocate(size_t w, size_t h, ofPixelFormat pixelFormat);” should be “void allocate(size_t w, size_t h, ofPixelFormat _pixelFormat);”.
Because the class have same named member variable.

The type of ofPixelFormat is not problem.