diff --git a/stim/gl/gl_texture.h b/stim/gl/gl_texture.h index 4cb3a64..9806483 100644 --- a/stim/gl/gl_texture.h +++ b/stim/gl/gl_texture.h @@ -210,14 +210,25 @@ class gl_texture : public virtual image_stack wrap = twrap; //store the wrap type } - ///@param string path to the directory with the image files. - ///Creates an instance of the gl_texture object with a path to the data. + ///@param is a mask indicating the files to load + ///Creates an instance of the gl_texture object and initializes it with a file list gl_texture(std::string file_mask, GLint interp = GL_LINEAR, GLint twrap = GL_REPEAT){ init(); interpolation = interp; //store interpolation type wrap = twrap; //store wrap type - load(file_mask); + load_images(file_mask); + } + + ///Creates an instance of gl_texture and initializes with a file list + ///@param file_list is a list of files + ///@param interp is the type of texture interpolation (GL_LINEAR, GL_NEAREST) + ///@param twrap is the type of texture wrapping + gl_texture(std::vector file_list, GLint interp = GL_LINEAR, GLint twrap = GL_REPEAT){ + init(); + interpolation = interp; + wrap = twrap; + load_images(file_list); } ///Attaches the texture to the current OpenGL context and makes it ready to render diff --git a/stim/grids/image_stack.h b/stim/grids/image_stack.h index 79d1a10..6bf66a4 100644 --- a/stim/grids/image_stack.h +++ b/stim/grids/image_stack.h @@ -80,7 +80,7 @@ public: R[2] = I.height(); R[3] = string_list.size(); //set the stack z-resolution based on the number of images - ptr = (T*)malloc(bytes()); //allocate storage space + ptr = (T*)malloc(grid::bytes()); //allocate storage space //load and copy each image into the grid for(unsigned int i = 0; i