Blender V2.61 - r43446
Defines | Functions | Variables

Texture.cpp File Reference

#include <PyObjectPlus.h>
#include <structmember.h>
#include <KX_GameObject.h>
#include <RAS_MeshObject.h>
#include <DNA_mesh_types.h>
#include <DNA_meshdata_types.h>
#include <DNA_image_types.h>
#include <IMB_imbuf_types.h>
#include <KX_PolygonMaterial.h>
#include <MEM_guardedalloc.h>
#include <KX_BlenderMaterial.h>
#include <BL_Texture.h>
#include "KX_KetsjiEngine.h"
#include "KX_PythonInit.h"
#include "Texture.h"
#include "ImageBase.h"
#include "Exception.h"
#include <memory.h>
#include "GL/glew.h"

Go to the source code of this file.

Defines

#define CATCH_EXCP

Functions

void loadTexture (unsigned int texId, unsigned int *texture, short *size, bool mipmap)
RAS_IPolyMaterialgetMaterial (PyObject *obj, short matID)
short getMaterialID (PyObject *obj, const char *name)
PyObject * Texture_new (PyTypeObject *type, PyObject *args, PyObject *kwds)
PyObject * Texture_close (Texture *self)
int Texture_setSource (Texture *self, PyObject *value, void *closure)
void Texture_dealloc (Texture *self)
int Texture_init (Texture *self, PyObject *args, PyObject *kwds)
PyObject * Texture_refresh (Texture *self, PyObject *args)
PyObject * Texture_getBindId (Texture *self, void *closure)
PyObject * Texture_getMipmap (Texture *self, void *closure)
int Texture_setMipmap (Texture *self, PyObject *value, void *closure)
PyObject * Texture_getSource (Texture *self, PyObject *value, void *closure)

Variables

BlendType< KX_GameObjectgameObjectType ("KX_GameObject")
ExceptionID MaterialNotAvail
ExpDesc MaterialNotAvailDesc (MaterialNotAvail,"Texture material is not available")
static PyMethodDef textureMethods []
static PyGetSetDef textureGetSets []
PyTypeObject TextureType

Detailed Description

Definition in file Texture.cpp.


Define Documentation

#define CATCH_EXCP
Value:
catch (Exception & exp) \
{ exp.report(); return NULL; }

Definition at line 56 of file Texture.cpp.

Referenced by Texture_refresh().


Function Documentation

RAS_IPolyMaterial* getMaterial ( PyObject *  obj,
short  matID 
)
short getMaterialID ( PyObject *  obj,
const char *  name 
)
void loadTexture ( unsigned int  texId,
unsigned int *  texture,
short *  size,
bool  mipmap 
)

Definition at line 65 of file Texture.cpp.

Referenced by ImageViewport::calcImage(), and Texture_refresh().

PyObject * Texture_close ( Texture self)

Definition at line 260 of file Texture.cpp.

Referenced by Texture_dealloc().

void Texture_dealloc ( Texture self)

Definition at line 164 of file Texture.cpp.

References Texture_close().

PyObject* Texture_getBindId ( Texture self,
void *  closure 
)

Definition at line 375 of file Texture.cpp.

PyObject* Texture_getMipmap ( Texture self,
void *  closure 
)

Definition at line 382 of file Texture.cpp.

PyObject* Texture_getSource ( Texture self,
PyObject *  value,
void *  closure 
)

Definition at line 406 of file Texture.cpp.

References NULL.

int Texture_init ( Texture self,
PyObject *  args,
PyObject *  kwds 
)
PyObject* Texture_new ( PyTypeObject *  type,
PyObject *  args,
PyObject *  kwds 
)

Definition at line 139 of file Texture.cpp.

References Texture::m_actTex, and NULL.

PyObject* Texture_refresh ( Texture self,
PyObject *  args 
)
int Texture_setMipmap ( Texture self,
PyObject *  value,
void *  closure 
)

Definition at line 390 of file Texture.cpp.

References NULL.

int Texture_setSource ( Texture self,
PyObject *  value,
void *  closure 
)

Definition at line 420 of file Texture.cpp.

References PyTypeList::in(), NULL, and pyImageTypes.

Referenced by Texture_init().


Variable Documentation

Referenced by getMaterial().

Definition at line 178 of file Texture.cpp.

Referenced by ImageMirror_init().

ExpDesc MaterialNotAvailDesc(MaterialNotAvail,"Texture material is not available")

Referenced by registerAllExceptions().

PyGetSetDef textureGetSets[] [static]
Initial value:
{ 
    {(char*)"source", (getter)Texture_getSource, (setter)Texture_setSource, (char*)"source of texture", NULL},
    {(char*)"mipmap", (getter)Texture_getMipmap, (setter)Texture_setMipmap, (char*)"mipmap texture", NULL},
    {(char*)"bindId", (getter)Texture_getBindId, NULL, (char*)"OpenGL Bind Name", NULL},
    {NULL}
}

Definition at line 449 of file Texture.cpp.

PyMethodDef textureMethods[] [static]
Initial value:
{
    { "close", (PyCFunction)Texture_close, METH_NOARGS, "Close dynamic texture and restore original"},
    { "refresh", (PyCFunction)Texture_refresh, METH_VARARGS, "Refresh texture from source"},
    {NULL}  
}

Definition at line 441 of file Texture.cpp.

PyTypeObject TextureType

Definition at line 459 of file Texture.cpp.

Referenced by initVideoTexture(), and Texture_init().