projects
/
opengl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix metal roughness texture on streaked metal material
[opengl.git]
/
image.hpp
diff --git
a/image.hpp
b/image.hpp
index b6d79201bffddcca414605ef7d11ef1ff6104146..5a75b0daa6add203c96c2f155ca44638c1ba0600 100644
(file)
--- a/
image.hpp
+++ b/
image.hpp
@@
-1,3
+1,6
@@
+#ifndef IMAGE_HPP
+#define IMAGE_HPP
+
#include <iostream>
#include <fstream>
#ifdef __APPLE__
#include <iostream>
#include <fstream>
#ifdef __APPLE__
@@
-8,13
+11,24
@@
class Image {
public:
Image(const std::string &path);
class Image {
public:
Image(const std::string &path);
+ Image(const unsigned char *data, size_t length, const char *formatHint);
~Image();
~Image();
- unsigned char *data();
+ unsigned char *data()
const
;
GLfloat width() const;
GLfloat height() const;
GLfloat width() const;
GLfloat height() const;
+ GLenum format() const;
+ GLint internalFormat() const;
+ GLenum type() const;
private:
#ifdef __APPLE__
private:
#ifdef __APPLE__
+ void initWithImageRef(CGImageRef ref);
CFDataRef dataRef;
CFDataRef dataRef;
+ CGBitmapInfo info;
+ CGImageAlphaInfo alphaInfo;
+ CGColorSpaceRef colorSpace;
GLfloat _width, _height;
GLfloat _width, _height;
+ size_t bitsPerComponent;
#endif
};
#endif
};
+
+#endif