Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <pipelined_texture.h>
Public Member Functions | |
bool | operator== (const Texture &b) |
bool | operator< (const Texture &b) |
virtual Texture * | Clone () |
virtual Texture * | Original () |
PipelinedTexture () | |
PipelinedTexture (unsigned int width, unsigned int height, unsigned char *current, unsigned char *last) | |
~PipelinedTexture () | |
unsigned char * | beginMutate () |
void | Swap () |
void | endMutate (int xoffset, int yoffset, int width, int height) |
void | MakeBothActive () |
void | MakeActive () |
Binds the texture in the GFX library. More... | |
void | MakeLastActive () |
![]() | |
void | FileNotFound (const std::string &) |
GFXBOOL | checkold (const std::string &s, bool shared, std::string &hashname) |
Returns if this texture is actually already loaded. More... | |
void | modold (const std::string &s, bool shared, std::string &hashname) |
void | setold () |
Loads the old texture. More... | |
bool | checkbad (const string &s) |
void | setbad (const string &s) |
void | InitTexture () |
Inits the class with default values. More... | |
int | Bind (Texture *other, int maxdimension=65536, GFXBOOL detailtexture=GFXFALSE) |
Binds this texture to the same name as the given texture - for multipart textures. More... | |
Texture (int stage=0, enum FILTER mipmap=MIPMAP, enum TEXTURE_TARGET target=TEXTURE2D, enum TEXTURE_IMAGE_TARGET imagetarget=TEXTURE_2D, enum ADDRESSMODE address_mode=DEFAULT_ADDRESS_MODE) | |
Creates an unbounded texture. Set data and dimensions before binding. Or explicitly load a file. More... | |
Texture (const char *, const char *, int stage=0, enum FILTER mipmap=MIPMAP, enum TEXTURE_TARGET target=TEXTURE2D, enum TEXTURE_IMAGE_TARGET imagetarget=TEXTURE_2D, float alpha=1, int zeroval=0, GFXBOOL force=GFXFALSE, int max_dimension_size=65536, GFXBOOL detail_texture=GFXFALSE, GFXBOOL nocache=false, enum ADDRESSMODE address_mode=DEFAULT_ADDRESS_MODE, Texture *main=0) | |
Creates a texture with a single bitmap as color data and another grayscale .bmp as alpha data. More... | |
Texture (const char *FileName, int stage=0, enum FILTER mipmap=MIPMAP, enum TEXTURE_TARGET target=TEXTURE2D, enum TEXTURE_IMAGE_TARGET imagetarget=TEXTURE_2D, GFXBOOL force=GFXFALSE, int max_dimension_size=65536, GFXBOOL detail_texture=GFXFALSE, GFXBOOL nocache=false, enum ADDRESSMODE address_mode=DEFAULT_ADDRESS_MODE, Texture *main=0) | |
Creates a texture with only color data as a single bitmap. More... | |
Texture (VSFileSystem::VSFile *f, int stage=0, enum FILTER mipmap=MIPMAP, enum TEXTURE_TARGET target=TEXTURE2D, enum TEXTURE_IMAGE_TARGET imagetarget=TEXTURE_2D, GFXBOOL force=GFXFALSE, int max_dimension_size=65536, GFXBOOL detail_texture=GFXFALSE, GFXBOOL nocache=false, enum ADDRESSMODE address_mode=DEFAULT_ADDRESS_MODE, Texture *main=0) | |
void | Load (const char *, const char *, int stage=0, enum FILTER mipmap=MIPMAP, enum TEXTURE_TARGET target=TEXTURE2D, enum TEXTURE_IMAGE_TARGET imagetarget=TEXTURE_2D, float alpha=1, int zeroval=0, GFXBOOL force=GFXFALSE, int max_dimension_size=65536, GFXBOOL detail_texture=GFXFALSE, GFXBOOL nocache=false, enum ADDRESSMODE address_mode=DEFAULT_ADDRESS_MODE, Texture *main=0) |
void | Load (const char *FileName, int stage=0, enum FILTER mipmap=MIPMAP, enum TEXTURE_TARGET target=TEXTURE2D, enum TEXTURE_IMAGE_TARGET imagetarget=TEXTURE_2D, GFXBOOL force=GFXFALSE, int max_dimension_size=65536, GFXBOOL detail_texture=GFXFALSE, GFXBOOL nocache=false, enum ADDRESSMODE address_mode=DEFAULT_ADDRESS_MODE, Texture *main=0) |
virtual const Texture * | Original () const |
virtual | ~Texture () |
Texture copy constructor that increases appropriate refcounts. More... | |
virtual unsigned int | numFrames () const |
virtual double | curTime () const |
virtual void | setTime (double tim) |
virtual float | framesPerSecond () const |
virtual unsigned int | numLayers () const |
virtual unsigned int | numPasses () const |
virtual bool | canMultiPass () const |
virtual bool | constFrameRate () const |
int | getStage () const |
int | getFilter () const |
int | getTarget () const |
int | getImageTarget () const |
bool | operator< (const Texture &b) const |
A way to sort the texture by the original address (to make sure like textures stick togehter. More... | |
bool | operator== (const Texture &b) const |
A way to test if the texture is equal to another based on original values. More... | |
void | setReference (Texture *other) |
Make this instance a reference of "other". More... | |
virtual void | MakeActive (int stage) |
virtual void | MakeActive (int stage, int pass) |
virtual bool | SetupPass (int pass, const enum BLENDFUNC src, const enum BLENDFUNC dst) |
virtual bool | SetupPass (int pass, int stage, const enum BLENDFUNC src, const enum BLENDFUNC dst) |
virtual bool | LoadSuccess () |
If the texture has loaded properly returns true. More... | |
virtual void | Prioritize (float) |
Changes priority of texture. More... | |
Additional Inherited Members | |
![]() | |
static Texture * | Exists (std::string s) |
Whether or not the string exists as a texture. More... | |
static Texture * | Exists (std::string s, std::string a) |
Whether or not the color and alpha data already exist. More... | |
![]() | |
StringPool::Reference | texfilename |
The file name used to load this texture. More... | |
enum FILTER | ismipmapped |
the filter mode of this texture More... | |
unsigned char * | data |
The data of this texture (used in between functions, deleted) More... | |
int | name |
The GFXname of this texture. More... | |
int | stage |
The multitexture stage of this texture. More... | |
Vector | mintcoord |
The minimum/maximum texturing coordinates for this texture (have in mind that it is not always enforce, ie. for meshes) (i=s, j=t, k=u) More... | |
Vector | maxtcoord |
Texture * | original |
The original data that would represent this texture. More... | |
bool | bound |
For re-biding. More... | |
uint | boundSizeX |
uint | boundSizeY |
VSImageMode | boundMode |
int | refcount |
The number of references on the original data. More... | |
enum TEXTURE_TARGET | texture_target |
The target this will go to (cubemap or otherwise) More... | |
enum TEXTURE_IMAGE_TARGET | image_target |
enum ADDRESSMODE | address_mode |
The address mode being used with this texture. More... | |
![]() | |
int | Bind (int maxdimension, GFXBOOL detailtexture) |
Binds this texture to GFX library. More... | |
void | UnBind () |
UnBinds from GFX library. More... | |
void | Transfer (int maxdimension, GFXBOOL detailtexture) |
Transfers this texture to GFX library. More... | |
Definition at line 6 of file pipelined_texture.h.
PipelinedTexture::PipelinedTexture | ( | ) |
PipelinedTexture::PipelinedTexture | ( | unsigned int | width, |
unsigned int | height, | ||
unsigned char * | current, | ||
unsigned char * | last | ||
) |
Definition at line 24 of file pipelined_texture.cpp.
References BILINEAR, Texture::data, GFXCreateTexture(), GFXTransferTexture(), height, Texture::image_target, Texture::ismipmapped, Texture::name, Texture::original, PALETTE8, Texture::refcount, RGB32, RGBA32, Texture::stage, TEXTURE2D, TEXTURE_2D, Texture::texture_target, and width.
PipelinedTexture::~PipelinedTexture | ( | ) |
Definition at line 108 of file pipelined_texture.cpp.
References GFXDeleteTexture(), and Texture::name.
unsigned char * PipelinedTexture::beginMutate | ( | ) |
Definition at line 4 of file pipelined_texture.cpp.
References Texture::data.
|
virtual |
Reimplemented from Texture.
Definition at line 87 of file pipelined_texture.cpp.
References BILINEAR, Texture::data, GFXCreateTexture(), GFXTransferTexture(), VsnetOSS::memcpy(), Texture::name, PALETTE8, PipelinedTexture(), RGB32, RGBA32, sizeof(), Texture::stage, TEXTURE2D, and TEXTURE_2D.
Definition at line 19 of file pipelined_texture.cpp.
References Texture::data, GFXTransferSubTexture(), Texture::name, and TEXTURE_2D.
|
virtual |
Binds the texture in the GFX library.
Reimplemented from Texture.
Definition at line 60 of file pipelined_texture.cpp.
References GFXSelectTexture(), and Texture::stage.
void PipelinedTexture::MakeBothActive | ( | ) |
Definition at line 68 of file pipelined_texture.cpp.
References GFXSelectTexture(), and Texture::stage.
void PipelinedTexture::MakeLastActive | ( | ) |
Definition at line 64 of file pipelined_texture.cpp.
References GFXSelectTexture().
Definition at line 17 of file pipelined_texture.h.
Definition at line 13 of file pipelined_texture.h.
|
virtual |
Reimplemented from Texture.
Definition at line 9 of file pipelined_texture.cpp.
References Texture::original, and Texture::Original().
void PipelinedTexture::Swap | ( | ) |
Definition at line 73 of file pipelined_texture.cpp.
References GFXCreateTexture(), Texture::name, PALETTE8, RGB32, RGBA32, and Texture::stage.