Kigs Framework
Doc version 0.8
Open source multi purpose Rapid Application Development framework
|
#include <Texture.h>
Public Types | |
enum | TextureType |
type of texture | |
Public Member Functions | |
Texture (const kstl::string &name, DECLARE_CLASS_NAME_TREE_ARG) | |
constructor More... | |
void | SetRepeatUV (bool RU, bool RV) |
set the repeat value More... | |
virtual bool | CreateFromImage (const SmartPointer< TinyImage > &image, bool directInit=false)=0 |
create a texture from an image | |
virtual bool | UpdateBufferZone (unsigned char *bitmapbuffer, const BBox2DI &zone, const Point2DI &bitmapSize) |
update zone in texture (only RGBA8888) | |
virtual bool | Load ()=0 |
load the texture | |
Public Member Functions inherited from Drawable | |
virtual void | DoPreDraw (TravState *) |
pre draw method More... | |
virtual void | DoDraw (TravState *travstate) |
draw method More... | |
virtual void | DoPostDraw (TravState *travstate) |
post draw method More... | |
void | CheckPostDraw (TravState *travstate) |
check before calling corresponding DoPredraw More... | |
virtual bool | BBoxUpdate (kdouble time) |
update the bounding box More... | |
bool | addItem (const CMSP &item, ItemPosition pos=Last) override |
add item in scene tree More... | |
bool | removeItem (const CMSP &item) override |
remove item in scene tree More... | |
virtual void | GetGlobalPosition (Matrix3x4 *pLocalToGlobal, kfloat &x, kfloat &y, kfloat &z) |
get the global position of the drawable More... | |
Public Member Functions inherited from SceneNode | |
bool | addItem (const CMSP &item, ItemPosition pos=Last DECLARE_DEFAULT_LINK_NAME) override |
add item at first or last position | |
Public Member Functions inherited from CoreModifiable | |
void | Init () |
Modifiable managmenent. | |
void | EmptyItemList () |
remove all items (sons) | |
CMSP | GetInstanceByPath (const std::string &path) |
return the instance corresponding to the given path in sons tree | |
std::string | GetRuntimeID () const |
ID. | |
CoreModifiableAttribute * | getAttribute (KigsID labelid) const |
Attribute management. | |
u32 | getNbArrayElements (KigsID attributeLabel) const |
return element count for an array type attribute | |
template<typename attribute_type , typename value_type > | |
attribute_type * | AddDynamicAttribute (KigsID ID, const value_type &value) |
Dynamic attribute management. | |
const kigs::unordered_map< KigsID, ModifiableMethodStruct > * | GetMethods () |
Method management. | |
bool | aggregateWith (CMSP &item, ItemPosition pos=Last) |
Aggregate management. | |
void | flagAsNotificationCenterRegistered () |
Flags. | |
void | InitParametersFromList (const std::vector< CoreModifiableAttribute * > *params) |
Utility. More... | |
virtual void | ProtectedDestroy () |
Destroy method decrement refcounter and delete instance if no more used. More... | |
virtual void | addUser (CoreModifiable *user) |
add the given parent to list | |
virtual void | removeUser (CoreModifiable *user) |
remove user (parent) | |
Protected Member Functions | |
void | InitModifiable () override |
initialize modifiable | |
void | UninitModifiable () override |
called when InitModifiable has failled : reset read/write flag on all init params More... | |
virtual | ~Texture () |
destructor | |
Protected Member Functions inherited from Drawable | |
virtual bool | PreDraw (TravState *) |
initialise pre draw method More... | |
virtual bool | Draw (TravState *) |
initialise draw method More... | |
virtual bool | PostDraw (TravState *) |
initialise PostDraw method More... | |
virtual void | FatherNode3DNeedBoundingBoxUpdate () |
update the father node bounding box | |
Protected Member Functions inherited from CoreModifiable | |
void | UpdateAggregates (const Timer &timer, void *addParam) |
Internals. | |
void | Export (std::vector< CoreModifiable * > &savedList, XMLNode *currentNode, bool recursive, ExportSettings *settings) |
Export. More... | |
CoreModifiableAttribute * | GenericCreateDynamicAttribute (CoreModifiable::ATTRIBUTE_TYPE type, KigsID ID) |
create and add dynamic attribute except arrays | |
Protected Attributes | |
maUInt | mWidth |
height of the texture | |
maUInt | mHeight |
width of the texture | |
maInt | mTransparencyType |
0 = no transparency, 1 = billboard (binary transparency), 2 = need blend, -1 = to test on file loading | |
maBool | mHasMipmap |
TRUE if the texture has mipmap. | |
maString | mFileName |
file name of the used texture | |
maInt | mTextureType |
type of the used texture | |
maBool | mRepeat_U |
TRUE if I repeat the texture on the u axis. | |
maBool | mRepeat_V |
TRUE if I repeat the texture on the v axis. | |
maBool | mIsDynamic |
TRUE if we want the texture be directly accessed from memory (platform dependant) | |
maBool | mForcePow2 |
TRUE if we want the texture to be resized to a power of two at loading (done on the specific part !) | |
Friends | |
class | RenderingScreen |
class | TextureFileManager |
class | TextureHandler |
Additional Inherited Members | |
Static Public Member Functions inherited from CoreModifiable | |
static std::vector< CMSP > | GetRootInstances (const KigsID &cid, bool exactTypeOnly=false) |
static method : return the set of all root instances of the given type | |
static void | Append (std::string &XMLString, const std::list< CoreModifiable * > &toexport, bool recursive, ExportSettings *settings=nullptr) |
static method to export the several CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More... | |
static void | Export (const std::string &filename, CoreModifiable *toexport, bool recursive=false, ExportSettings *settings=nullptr) |
static method to export the given CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More... | |
static XMLNode * | ExportToXMLNode (CoreModifiable *toexport, XML *owner_xml_file, bool recursive, ExportSettings *settings=nullptr) |
static method to export the given CoreModifiable to an XML Node. if recursive flag is set to true, export also all sons tree More... | |
static std::string | ExportToXMLString (CoreModifiable *toexport, bool recursive, ExportSettings *settings=nullptr) |
static method to export the given CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More... | |
static void | Export (std::string &XMLString, const std::list< CoreModifiable * > &toexport, bool recursive, ExportSettings *settings=nullptr) |
static method to export the several CoreModifiable to an XML file. if recursive flag is set to true, export also all sons tree More... | |
static CMSP | Import (const std::string &filename, bool noInit=false, bool keepImportFileName=false, ImportState *state=nullptr, const std::string &override_name="") |
return an new CoreModifiable instance using the description found in XML file given by name | |
static CMSP | GetInstanceByGlobalPath (const std::string &path) |
static method : return the instance corresponding to the given path, and given search start | |
static void | debugPrintfFullTree (int maxindent=3) |
Editor. More... | |
Static Protected Member Functions inherited from CoreModifiable | |
template<typename StringType > | |
static CMSP | Import (XMLNodeTemplate< StringType > *currentNode, CoreModifiable *currentModifiable, ImportState &importState) |
recusrive method to add sons and attributes found in the XML file | |
manage a texture.
TRUE if we want the texture to be resized to a power of two at loading (done on the specific part !)
TRUE if we want the texture be directly accessed from memory (platform dependant)
file name of the used texture
TRUE if the texture has mipmap.
width of the texture
TRUE if I repeat the texture on the u axis.
TRUE if I repeat the texture on the v axis.
type of the used texture
0 = no transparency, 1 = billboard (binary transparency), 2 = need blend, -1 = to test on file loading
height of the texture
Texture::Texture | ( | const kstl::string & | name, |
DECLARE_CLASS_NAME_TREE_ARG | |||
) |
constructor
name | : instance name |
DECLARE_CLASS_NAME_TREE_ARG | : list of arguments |
|
inline |
set the repeat value
RU | : TRUE if repeat on u axis |
RV | : TRUE if repeat on v axis |
|
inlineoverrideprotectedvirtual |
called when InitModifiable has failled : reset read/write flag on all init params
not init ? return
Reimplemented from CoreModifiable.
Reimplemented in OpenGLTexture, and DX11Texture.