Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
Texture.h
Package: 3dexplorerTest.rar [view]
Upload User: hkb425
Upload Date: 2007-06-16
Package Size: 34191k
Code Size: 2k
Category:
Game Engine
Development Platform:
Visual C++
- // Texture.h: interface for the CTexture class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_TEXTURE_H__D9335E64_D6A4_45E9_A6FA_FF8A3BCEB330__INCLUDED_)
- #define AFX_TEXTURE_H__D9335E64_D6A4_45E9_A6FA_FF8A3BCEB330__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include <stdio.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;
- typedef struct
- {
- GLubyte * imageData; // Image Data (Up To 32 Bits)
- GLuint bpp; // Image Color Depth In Bits Per Pixel
- GLuint width; // Image Width
- GLuint height; // Image Height
- GLuint type; // Image Type (GL_RGB, GL_RGBA)
- } Texture;
- class CTexture
- {
- public:
- CTexture();
- bool MakeTextureBind(char* TextureFileName,unsigned int* TextureID,
- bool bLinear=true,bool bMip=true);
- bool MakeSkinTextureBind(char* TextureFileName,unsigned int* TextureID,
- bool bLinear=true,bool bMip=true);
- bool MakeAlphaTextureBind(char* TextureFileName,unsigned int* TextureID);
- bool MakeAlphaTextureBind(char* TextureFileName,char *AlphaFileName,unsigned int* TextureID);
- bool MakeTGAAlphaBind(char* TextureFileName,unsigned int* TextureID);
- virtual ~CTexture();
- protected:
- bool LoadUncompressedTGA(Texture * texture, char * filename, FILE * fTGA);
- bool LoadCompressedTGA(Texture * texture, char * filename, FILE * fTGA) ;
- };
- #endif // !defined(AFX_TEXTURE_H__D9335E64_D6A4_45E9_A6FA_FF8A3BCEB330__INCLUDED_)