Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <stream_texture.h>
Public Member Functions | |
StreamTexture (int width, int height, enum FILTER filtertype, unsigned char *origdata) | |
~StreamTexture () | |
unsigned char * | Map () |
void | UnMap (bool changed=true) |
void | MakeActive (int stage) |
void | MakeActive () |
Binds the texture in the GFX library. More... | |
StreamTexture * | Clone () |
![]() | |
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 * | Original () |
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, 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 3 of file stream_texture.h.
StreamTexture::StreamTexture | ( | int | width, |
int | height, | ||
enum FILTER | filtertype, | ||
unsigned char * | origdata | ||
) |
Definition at line 11 of file stream_texture.cpp.
References GFXCreateTexture(), GFXTransferTexture(), height, Texture::image_target, Texture::ismipmapped, VsnetOSS::memcpy(), Texture::name, Texture::original, Texture::refcount, RGBA32, Texture::stage, TEXTURE2D, TEXTURE_2D, Texture::texture_target, and width.
Referenced by Clone().
StreamTexture::~StreamTexture | ( | ) |
|
virtual |
Reimplemented from Texture.
Definition at line 3 of file stream_texture.cpp.
References Map(), StreamTexture(), UnMap(), and x.
|
virtual |
Reimplemented from Texture.
Definition at line 60 of file stream_texture.cpp.
References GFXSelectTexture(), and Texture::name.
Referenced by AnimationDraw().
|
inlinevirtual |
Binds the texture in the GFX library.
Reimplemented from Texture.
Definition at line 13 of file stream_texture.h.
Referenced by UnMap().
unsigned char * StreamTexture::Map | ( | ) |
Definition at line 38 of file stream_texture.cpp.
Referenced by AnimationDraw(), and Clone().
void StreamTexture::UnMap | ( | bool | changed = true ) |
Definition at line 43 of file stream_texture.cpp.
References GFXTransferTexture(), MakeActive(), Texture::name, and RGBA32.
Referenced by AnimationDraw(), and Clone().