PowerVR Software Development Kit


Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

PVRTTexture.h File Reference

GL texture loading. More...

Go to the source code of this file.

Classes

struct  PVR_Header_Texture_TAG

Typedefs

typedef PVR_Header_Texture_TAG PVR_Texture_Header

Enumerations

enum  { ShellTextureLoadErr_UnsupportedTexture = 1, ShellTextureLoadErr_TwiddledTexture }

Functions

PVR_Texture_HeaderPVRTTextureCreate (unsigned int w, unsigned int h, const unsigned int wMin, const unsigned int hMin, const unsigned int nBPP, const bool bMIPMap)
void PVRTTextureTile (PVR_Texture_Header **pOut, const PVR_Texture_Header *const pIn, const int nRepeatCnt)
bool PVRTLoadDecompressedTextureFromPointer (void *pointer, GLuint *texName)
bool PVRTLoadDecompressedPartialTextureFromPointer (void *pointer, unsigned int nLoadFromLevel, GLuint *texName)
bool PVRTLoadPartialTextureFromPointer (void *pointer, void *texPtr, unsigned int nLoadFromLevel, GLuint *texName)
bool PVRTLoadTextureFromPointer (void *pointer, GLuint *texName)
bool PVRTLoadPartialTextureFromPVR (char *filename, char *altHeader, unsigned int nLoadFromLevel, GLuint *texName)
bool PVRTLoadTextureFromPVR (char *filename, GLuint *texName)
bool PVRTLoadDecompressedPartialTextureFromPVR (char *filename, unsigned int nLoadFromLevel, GLuint *texName)
bool PVRTLoadDecompressedTextureFromPVR (char *filename, GLuint *texName)
void PVRTReleaseTexture (GLuint texName)
unsigned int PVRTTextureFormatBPP (const GLuint nFormat, const GLuint nType)


Detailed Description

GL texture loading.

Author:
PowerVR
Date:
June 2004
Copyright:
Copyright 2003-2004 by Imagination Technologies Limited. All rights reserved. No part of this software, either material or conceptual may be copied or distributed, transmitted, transcribed, stored in a retrieval system or translated into any human or computer language in any form by any means, electronic, mechanical, manual or other-wise, or disclosed to third parties without the express written permission of Imagination Technologies Limited, Unit 8, HomePark Industrial Estate, King's Langley, Hertfordshire, WD4 8LZ, U.K.
Platform:
ANSI compatible
Description:
GL texture loading.
Revision
1.7

Typedef Documentation



PVR_Texture_Header


typedef struct PVR_Header_Texture_TAG PVR_Texture_Header
 

Describes the header of a PVR header-texture


Enumeration Type Documentation



@0


anonymous enum
 

Enumeration values:
ShellTextureLoadErr_UnsupportedTexture 
ShellTextureLoadErr_TwiddledTexture 

Function Documentation



PVRTLoadDecompressedPartialTextureFromPointer


bool PVRTLoadDecompressedPartialTextureFromPointer void *  pointer,
unsigned int  nLoadFromLevel,
GLuint *  texName
 

Inputs:
pointer Pointer to the header-prefixed texture from
nLoadFromLevel Which mipmap level to start loading from (0=all)
Modified:
texName the OpenGL ES texture name as returned by glBindTexture
Returns:
true on success
Description:
Allows textures to be stored in header files and loaded in. Loads the whole texture Release texture by calling PVRTReleaseTexture. Decompresses to RGBA8888 internally.



PVRTLoadDecompressedPartialTextureFromPVR


bool PVRTLoadDecompressedPartialTextureFromPVR char *  filename,
unsigned int  nLoadFromLevel,
GLuint *  texName
 

Inputs:
filename Filename of the .PVR file to load the texture from
nLoadFromLevel Which mipmap level to start loading from (0=all)
Modified:
texName the OpenGL ES texture name as returned by glBindTexture
Returns:
true on success
Description:
Allows textures to be stored in binary PVR files and loaded in. Can load parts of a mipmaped texture (ie skipping the highest detailed levels). Release texture by calling PVRTReleaseTexture. This variant decompresses to RGBA8888.



PVRTLoadDecompressedTextureFromPointer


bool PVRTLoadDecompressedTextureFromPointer void *  pointer,
GLuint *  texName
 

Modified:
texName the OpenGL ES texture name as returned by glBindTexture
Inputs:
pointer Pointer to the header-prefixed texture from
Returns:
true on success
Description:
Allows textures to be stored in header files and loaded in. Loads the whole texture Release texture by calling PVRTReleaseTexture. Decompresses to RGBA8888 internally.



PVRTLoadDecompressedTextureFromPVR


bool PVRTLoadDecompressedTextureFromPVR char *  filename,
GLuint *  texName
 

Inputs:
filename Filename of the .PVR file to load the texture from
Modified:
texName the OpenGL ES texture name as returned by glBindTexture
Returns:
true on success
Description:
Allows textures to be stored in binary PVR files and loaded in. Loads the whole texture Release texture by calling PVRTReleaseTexture. This variant decompresses to RGBA8888.



PVRTLoadPartialTextureFromPointer


bool PVRTLoadPartialTextureFromPointer void *  pointer,
void *  texPtr,
unsigned int  nLoadFromLevel,
GLuint *  texName
 

Inputs:
pointer Pointer to header-texture's structure
texPtr If null, texture follows header, else texture is here.
nLoadFromLevel Which mipmap level to start loading from (0=all)
Modified:
texName the OpenGL ES texture name as returned by glBindTexture
Returns:
true on success
Description:
Allows textures to be stored in C header files and loaded in. Can load parts of a mipmaped texture (ie skipping the highest detailed levels). Release texture by calling PVRTReleaseTexture.



PVRTLoadPartialTextureFromPVR


bool PVRTLoadPartialTextureFromPVR char *  filename,
char *  altHeader,
unsigned int  nLoadFromLevel,
GLuint *  texName
 

Inputs:
filename Filename of the .PVR file to load the texture from
altHeader If null, texture follows header, else texture is here.
nLoadFromLevel Which mipmap level to start loading from (0=all)
Modified:
texName the OpenGL ES texture name as returned by glBindTexture
Returns:
true on success
Description:
Allows textures to be stored in binary PVR files and loaded in. Can load parts of a mipmaped texture (ie skipping the highest detailed levels). Release texture by calling PVRTReleaseTexture.



PVRTLoadTextureFromPointer


bool PVRTLoadTextureFromPointer void *  pointer,
GLuint *  texName
 

Inputs:
pointer Pointer to header-texture's structure
Modified:
texName the OpenGL ES texture name as returned by glBindTexture
Returns:
true on success
Description:
Allows textures to be stored in C header files and loaded in. Loads the whole texture. Release texture by calling PVRTReleaseTexture.



PVRTLoadTextureFromPVR


bool PVRTLoadTextureFromPVR char *  filename,
GLuint *  texName
 

Inputs:
filename Filename of the .PVR file to load the texture from
Modified:
texName the OpenGL ES texture name as returned by glBindTexture
Returns:
true on success
Description:
Allows textures to be stored in binary PVR files and loaded in. Loads the whole texture Release texture by calling PVRTReleaseTexture.



PVRTReleaseTexture


void PVRTReleaseTexture GLuint  texName  ) 
 

Inputs:
texName the name returned by PVRTLoadTextureFromPointer or PVRTLoadTextureFromPVR
Description:
Releases the resources used by a texture.



PVRTTextureCreate


PVR_Texture_Header* PVRTTextureCreate unsigned int  w,
unsigned int  h,
const unsigned int  wMin,
const unsigned int  hMin,
const unsigned int  nBPP,
const bool  bMIPMap
 

Inputs:
w Size of the texture
h Size of the texture
wMin Minimum size of a texture level
hMin Minimum size of a texture level
nBPP Bits per pixel of the format
bMIPMap Create memory for MIP-map levels also?
Returns:
Allocated texture memory (must be free()d)
Description:
Creates a PVR_Texture_Header structure, including room for the specified texture, in memory.



PVRTTextureFormatBPP


unsigned int PVRTTextureFormatBPP const GLuint  nFormat,
const GLuint  nType
 

Inputs:
nFormat 
nType 
Description:
Returns the bits per pixel (BPP) of the format.



PVRTTextureTile


void PVRTTextureTile PVR_Texture_Header **  pOut,
const PVR_Texture_Header *const  pIn,
const int  nRepeatCnt
 

Modified:
pOut The tiled texture in system memory
Inputs:
pIn The source texture
nRepeatCnt Number of times to repeat the source texture
Description:
Allocates and fills, in system memory, a texture large enough to repeat the source texture specified number of times.


Copyright © 1999-2006, PowerVR Technologies and partners. PowerVR Technologies is a division of Imagination Technologies Ltd.


Generated by DOXYGEN 1.3.6