Unofficial OpenGL Software Development Kit: C:/Projects/distro/glsdk_0_5_1/glimg/include/glimg/ImageCreator.h Source File

Unofficial OpenGL Software Development Kit 0.5.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ImageCreator.h
Go to the documentation of this file.
1
2 #ifndef GLIMG_IMAGE_CREATOR_H
3 #define GLIMG_IMAGE_CREATOR_H
4
5 #include <vector>
6 #include <exception>
7 #include "ImageSet.h"
8 #include "ImageCreatorExceptions.h"
9
17 namespace glimg
18 {
21
23 typedef std::vector<unsigned char> ImageBuffer;
24
42 class ImageCreator
43 {
44 public:
62 ImageCreator(ImageFormat format, Dimensions dimensions, int mipmapCount, int arrayCount, int faceCount);
63
82 void SetImageData(const void *pixelData, bool isTopLeft, int mipmapLevel, int arrayIx = 0, int faceIx = 0);
83
104
105 void SetFullMipmapLevel(const void *pixelData, bool isTopLeft, int mipmapLevel);
106
118 ImageSet *CreateImage();
119
120 private:
121 const ImageFormat m_format;
122 const Dimensions m_dims;
123 const int m_mipmapCount;
124 const int m_arrayCount;
125 const int m_faceCount;
126
127 //Indexed by mipmap.
128 std::vector<ImageBuffer> m_imageData;
129 std::vector<size_t> m_imageSizes;
130
131 void CopyImageFlipped(const void *pixelData, unsigned char *pSrcData, int mipmapLevel);
132 };
133
135 }
136
137
138 #endif //GLIMG_IMAGE_CREATOR_H