SourceForge.net Logo
Home
Documentation
    GLwrapper
    Items
    Armature
    LumFile
Tutorials
Links
Support This Project
OpenGL
Item
All Items inherits "Item"

void deleteLater()
deletes an item. Not working/usefully for World and Cam....

void findChild(string name)
find a child by "name"

object getParent()
returns the parent Item

string getType()
returns the Itemtypes name

World

void addNode(string name)(version 0.0.9)
add a Nodeitem. Name could change if it's in use by another objects. Example:
Mynode = World.addNode("MyNode");
Mynode ist save against autorenaming if another object with name "World.Mynode" exist.

void setTime(number value)
set the World time to value in seconds

number getTime()
returns the worlds time.

object getSelected()(doesn't work at this time)

object getContext()
returns the item, whose contextmenu was opened as last. Needed for pluginscripts.

Node

object addStream(string name);
object addVertexShader(string name);
object addGeometryShader(string name);
object addFragmentShader(string name);
object addScript(string name);
object addText(string name);
object addTexture(string name);
object addNode(string name);


functions for adding objects to a node.

Text, Script, Shader

void load(string filename);
Load a text file with path filename
void reload();
reload a file
string text();
returns the text
void setText(string text);
set the text to text

Texture
Properties
Enum MagFilter
set it to gl.NEAREST or gl.LINEAR
Enum MinFilter
set is to gl.NEAREST, gl.LINEAR to disable mipmapping or to gl.NEAREST_MIPMAP_NEAREST,
gl.NEAREST_MIPMAP_LINEAR, gl.LINEAR_MIPMAP_NEAREST or gl.LINEAR_MIPMAP_LINEAR to enable
mipmapping.
Enum WrapS
Set the horizontal clamping mode to gl.REPEAT gl.CLAMP or gl.CLAMP_TO_EDGE
Enum WrapT
Set the vertical clamping mode to gl.REPEAT gl.CLAMP or gl.CLAMP_TO_EDGE
bool CompareMode
Enable or disable the comparemode for shadowmaps

void load(string filename)
loads a png,jpg or dds (dds are flipped in y)

reload();
reload a image

void Bind(number tmu);

Bind the texture to a Texturemapping unit. Default is 0

void Unbind(int tmu);

Unbind a texture.

void MinFilter(enum mode); deprecated

change the min filter. Examples: gl.NEAREST gl.LINEAR gl.LINEAR_MIPMAP_LINEAR

void MagFilter(enum mode); deprecated

change the magnification filter. Examples: gl.NEAREST gl.LINEAR

void Image2d(number width, number height , enum format);
create a empty 2D texture. Look in glwrapper.h for valid texturformats. Some format
examples:

gl.RGB
gl.RGBA16F
gl.DEPTH_COMPONENT24
gl.DEPTH24_STENCIL8

void Image3d(number width, number height, number depth, enum format);
create a empty 3D texture (not successfully tested)

void BindFBO(number slice)

bind a texture as Framebufferobject. Slice is only needed for 3d textures (3d textures
not tested)

void UnbindFBO();

Don't forget to unbind the FBO after rendering or the cam will stay black...

void ViewPort(number x, number y, number width, number height);
change the vieport in a FBO. values from 0.0 to 1.0

number Width()
number Height()
number Depth()


returns textures width,height or depth

void GenerateMipmap();

void Print(number x, number y, String text)
glTexSubImage2D wrapper to print text into a GL_ALPHA texture. Usefull for a textshader.

generate mipmaps
EDIT