From Art Tevs, "I've attached a patch for the Texture2DArray which solves problems of loading image data into the texture array. So here are a small description:

- Solves issues of loading image data into the texture memory
- Print a warning if images are of different dimensions or have different internal formats (GL specification requires images to be the same)


Patch is tested and seems to work fine. It shouldn't break any other functionality. It should go into include/osg and src/osg
"
This commit is contained in:
Robert Osfield
2008-05-26 21:53:57 +00:00
parent 1f8ff7916c
commit 804c91c8c1
2 changed files with 33 additions and 20 deletions

View File

@@ -206,7 +206,7 @@ class OSG_EXPORT Texture2DArray : public Texture
virtual void computeInternalFormat() const;
void allocateMipmap(State& state) const;
void applyTexImage2DArray_subload(State& state, Image* image, GLsizei& inwidth, GLsizei& inheight, GLsizei& indepth, GLsizei& numMipmapLevels) const;
void applyTexImage2DArray_subload(State& state, Image* image, GLsizei inwidth, GLsizei inheight, GLsizei indepth, GLenum inInternalFormat, GLsizei& numMipmapLevels) const;
/**
* Use std::vector to encapsulate referenced pointers to images of different layers.