| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- /*
- * PolyGLTexture.h
- * TAU
- *
- * Created by Ivan Safrin on 3/16/08.
- * Copyright 2008 __MyCompanyName__. All rights reserved.
- *
- */
- // @package Renderer
-
- #pragma once
- #ifdef _WINDOWS
- #include <windows.h>
- #endif
- #include "PolyGlobals.h"
- #include "PolyTexture.h"
- #include "PolyGLRenderer.h"
- #if defined(__APPLE__) && defined(__MACH__)
- #include <OpenGL/gl.h>
- #include <OpenGL/glext.h>
- #include <OpenGL/glu.h>
- #else
- #include <GL/gl.h>
- #include <GL/glu.h>
- #endif
- namespace Polycode {
- class _PolyExport OpenGLTexture : public Texture {
- public:
- OpenGLTexture(unsigned int width, unsigned int height);
- OpenGLTexture(unsigned int width, unsigned int height, char *textureData, bool clamp, int filteringMode, int type);
- virtual ~OpenGLTexture();
-
- void recreateFromImageData();
- GLuint getTextureID();
- GLuint getFrameBufferID();
-
- void setGLInfo(GLuint textureID, GLuint frameBufferID);
-
- void setTextureData(char *data);
-
- private:
-
- bool glTextureLoaded;
- GLuint glTextureType;
- int filteringMode;
- GLuint textureID;
- GLuint frameBufferID;
- };
- }
|