X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fpixelstore.cpp;fp=source%2Fpixelstore.cpp;h=629162cd890b1a9dfd760bc47ddc60a41ef784a9;hb=57de40e1e802e44ae5b4caa67b0bb8763828b5c3;hp=011866e3e72410a44031a0b154367c621bebb44f;hpb=f1b12c992db974c679d85ae6ec22cd318199d0d5;p=libs%2Fgl.git diff --git a/source/pixelstore.cpp b/source/pixelstore.cpp index 011866e3..629162cd 100644 --- a/source/pixelstore.cpp +++ b/source/pixelstore.cpp @@ -1,4 +1,5 @@ #include +#include #include "gl.h" #include "pixelformat.h" #include "pixelstore.h" @@ -35,13 +36,15 @@ void PixelStore::update_parameter(int mask) const 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); @@ -56,6 +59,8 @@ void PixelStore::set_canvas_size(unsigned w, unsigned h) void PixelStore::set_origin(unsigned x, unsigned y, unsigned z) { + if(z>0) + static Require _req3d(EXT_texture3D); skip_pixels = x; skip_rows = y; skip_images = z;