From Rune Schmidt Jensen - new dds loader.

This commit is contained in:
Robert Osfield
2003-04-02 18:26:34 +00:00
parent 161c40d75f
commit 0f3eaeba46
11 changed files with 433 additions and 3 deletions

View File

@@ -99,12 +99,16 @@ class SG_EXPORT Image : public Object
int packing=1);
/** readPixels from screen at specified position and size, using glReadPixels.
* Create memory for storage if required, reuse existing pixel coords if possible.
* if pixelFormat or dataType*/
* Create memory for storage if required, reuse existing pixel coords if possible.*/
void readPixels(int x,int y,int width,int height,
GLenum format,GLenum type);
/** read the contents of the current bound texture, handling compressed formats if present.
* Create memory for storage if required, reuse existing pixel coords if possible.*/
void readImageFromCurrentTexture(unsigned int contextID=0);
/** Scale image to specified size. */
void scaleImage(int s,int t,int r);
@@ -117,6 +121,9 @@ class SG_EXPORT Image : public Object
void copySubImage(int s_offset,int t_offset,int r_offset,osg::Image* source);
/** Width of image.*/
inline int s() const { return _s; }

View File

@@ -264,6 +264,7 @@ class SG_EXPORT Texture : public osg::StateAttribute
void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) const;
void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei type, const GLvoid *data) const;
void glGetCompressedTexImage(GLenum target, GLint level, GLvoid *data) const;
protected:
@@ -281,6 +282,7 @@ class SG_EXPORT Texture : public osg::StateAttribute
void* _glCompressedTexImage2D;
void* _glCompressedTexSubImage2D;
void* _glGetCompressedTexImage;
};