📄 gltexture.h
字号:
/*
gltexture.h - Texture class
Copyright (c) HalfLucifer, 2001.7.20
*/
#ifndef __GLTEXTUREH__
#define __GLTEXTUREH__
#include <windows.h>
#include <stdio.h>
#include <gl\gl.h>
#include <gl\glu.h>
#include "ijl.h"
class GLtexture
{
public:
GLtexture() : MipMap(false), MinFilter(GL_LINEAR), MaxFilter(GL_LINEAR) {}
~GLtexture() { delete [] data; glDeleteTextures(1, &TexID); }
void SetMipmap() { MipMap=true; }
void SetFilter(GLfloat min, GLfloat max) { MinFilter=min; MaxFilter=max; }
bool LoadTGA(char *filename);
bool LoadJPG(char *filename);
bool LoadBMP(char *filename);
GLuint ID() { return TexID; }
protected:
GLubyte* data; // Image byte data
GLuint bpp; // Image color depth in bits per pixel
GLuint width; // Image width
GLuint height; // Image height
bool MipMap;
GLfloat MinFilter;
GLfloat MaxFilter;
GLuint TexID; // Texture id used to select a texture
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -