#include <algorithm>
+#include <msp/gl/extensions/ext_texture3d.h>
+#include <msp/gl/extensions/ext_unpack_subimage.h>
#include "gl.h"
#include "pixelformat.h"
#include "pixelstore.h"
if(mask&SIZE)
{
glPixelStorei(GL_UNPACK_ROW_LENGTH, row_length);
- glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, image_height);
+ if(EXT_texture3D)
+ glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, image_height);
}
if(mask&ORIGIN)
{
glPixelStorei(GL_UNPACK_SKIP_PIXELS, skip_pixels);
glPixelStorei(GL_UNPACK_SKIP_ROWS, skip_rows);
- glPixelStorei(GL_UNPACK_SKIP_IMAGES, skip_images);
+ if(EXT_texture3D)
+ glPixelStorei(GL_UNPACK_SKIP_IMAGES, skip_images);
}
if(mask&ALIGNMENT)
glPixelStorei(GL_UNPACK_ALIGNMENT, alignment);
void PixelStore::set_canvas_size(unsigned w, unsigned h)
{
+ static Require _req(EXT_unpack_subimage);
row_length = w;
image_height = h;
update_parameter(SIZE);
void PixelStore::set_origin(unsigned x, unsigned y, unsigned z)
{
+ static Require _req(EXT_unpack_subimage);
+ if(z>0)
+ static Require _req3d(EXT_texture3D);
skip_pixels = x;
skip_rows = y;
skip_images = z;