tga.h
来自「opengl开发的 小游戏」· C头文件 代码 · 共 49 行
H
49 行
#ifndef __TGA_H__
#define __TGA_H__
#pragma comment(lib, "Opengl32.lib") //Link to OpenGL32.lib so we can use OpenGL stuff
#include <windows.h> // Standard windows header
#include <stdio.h> // Standard I/O header
#include <gl\gl.h> // Header for OpenGL32 library
#include "texture.h"
typedef struct
{
GLubyte Header[12]; // TGA File Header
} TGAHeader;
typedef struct
{
GLubyte header[6]; // First 6 Useful Bytes From The Header
GLuint bytesPerPixel; // Holds Number Of Bytes Per Pixel Used In The TGA File
GLuint imageSize; // Used To Store The Image Size When Setting Aside Ram
GLuint temp; // Temporary Variable
GLuint type;
GLuint Height; //Height of Image
GLuint Width; //Width ofImage
GLuint Bpp; // Bits Per Pixel
} TGA;
TGAHeader tgaheader; // TGA header
TGA tga; // TGA image data
GLubyte uTGAcompare[12] = {0,0,2, 0,0,0,0,0,0,0,0,0}; // Uncompressed TGA Header
GLubyte cTGAcompare[12] = {0,0,10,0,0,0,0,0,0,0,0,0}; // Compressed TGA Header
bool LoadUncompressedTGA(Texture *, char *, FILE *); // Load an Uncompressed file
bool LoadCompressedTGA(Texture *, char *, FILE *); // Load a Compressed file
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?