Initial import of KREngine
--HG-- extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%404
This commit is contained in:
47
objview/Classes/krengine/KRTexture.h
Normal file
47
objview/Classes/krengine/KRTexture.h
Normal file
@@ -0,0 +1,47 @@
|
||||
//
|
||||
// KRTexture.h
|
||||
// gldemo
|
||||
//
|
||||
// Created by Kearwood Gilbert on 10-10-23.
|
||||
// Copyright (c) 2010 Kearwood Software. All rights reserved.
|
||||
//
|
||||
|
||||
#import <OpenGLES/ES1/gl.h>
|
||||
#import <OpenGLES/ES1/glext.h>
|
||||
#import <stdint.h>
|
||||
#import <list>
|
||||
using std::list;
|
||||
|
||||
#ifndef KRTEXTURE_H
|
||||
#define KRTEXTURE_H
|
||||
|
||||
class KRTexture {
|
||||
public:
|
||||
KRTexture();
|
||||
~KRTexture();
|
||||
|
||||
bool loadFromFile(const char *szFile);
|
||||
bool createGLTexture();
|
||||
GLuint getName();
|
||||
|
||||
private:
|
||||
|
||||
GLuint m_iName;
|
||||
uint32_t m_iWidth;
|
||||
uint32_t m_iHeight;
|
||||
GLenum m_internalFormat;
|
||||
bool m_bHasAlpha;
|
||||
|
||||
struct dataBlockStruct {
|
||||
void *start;
|
||||
uint32_t length;
|
||||
};
|
||||
|
||||
list<dataBlockStruct> m_blocks;
|
||||
|
||||
int m_fdFile;
|
||||
int m_fileSize;
|
||||
void *m_pFile;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user