Quantcast
Channel: bugs, errors - openFrameworks
Viewing all articles
Browse latest Browse all 636

Allocating ofImage with GL_RGB doesn't give any warnings

$
0
0

@hamoid wrote:

Hi,

By accident I used GL_RGB to allocate an ofPixels and then spent a long time debugging why the width was 0 (assuming it was related to vectors and std::move), until I realized I should have used OF_IMAGE_COLOR instead.

// wrong
ofPixels p;
p.allocate(w, h, GL_RGB);

Functions like ofPixelFormatFromImageType and channelsFromPixelFormat give warnings when trying to use an unrecognized image type. Couldn't this check also be done when using GL_RGB?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 636

Trending Articles