height(height),
pitch(width),
owns_texture(false),
- pixel_data(NULL),
+ pixel_data(nullptr),
fixup_swap_rb(false),
fixup_red_to_grayscale(false)
{
glActiveTexture(GL_TEXTURE0 + *sampler_num);
check_error();
- if (texture_num == 0) {
+ if (texture_num == 0 && (pbo != 0 || pixel_data != nullptr)) {
// Translate the input format to OpenGL's enums.
GLint internal_format;
GLenum format;