I've re-written the core plugin library and although still a way to go yet, the main core will be ready to use shortly.
Here's a list of the functions so far:
amesh = irrsc_getmesh(name$)
amesh_node = irrsc_addcubescenenode(parent,size#)
amesh_node = irrsc_addspherescenenode(parent,radius#,polycount)
amesh_node = irrsc_addanimatedmeshscenenode(parent,mesh)
mesh_node = irrsc_addmeshscenenode(parent,mesh)
amesh_node = irrsc_addwatersurfacescenenode(parent,mesh,waveheight#,wavespeed#,wavelength#)
cam_node = irrsc_addcamerascenenode(parent)
light_node = irrsc_addlightscenenode(parent)
bmesh_node = irrsc_addbillboardscenenode(parent)
node = irrsc_addskyboxscenenode(parent,top,bottom,left,right,front,back)
node = irrsc_addskydomescenenode(parent,texture,horires,vertres,tperc#,sprperc#,radius#)
psys_node = irrsc_addparticlesystemscenenode(parent,default)
terr_node = irrsc_addterrainscenenode(parent,heightmap$)
node = irrsc_addemptyscenenode(parent)
dtran_node = irrsc_adddummytransformationscenenode(parent)
text_node = irrsc_addtextscenenode(parent,font,text$,color)
btmesh_node = irrsc_addbillboardtextscenenode(parent,font,text$)
amesh = irrsc_addterrainmesh(name$,itexture,iheightmap)
amesh = irrsc_addspheremesh(name$,radius#,xcount,ycount)
amesh = irrsc_addvolumelightmesh(name$,subdivu,subdivv,footcolor,tailcolor)
node = irrsc_getrootscenenode()
node = irrsc_getscenenodefromid(id,startnode)
node = irrsc_getscenenodefromname(name$,startnode)
cam_node = irrsc_getactivecamera()
irrsc_setactivecamera(cam_node)
irrsc_setshadowcolor(color)
color = irrsc_getshadowcolor()
irrsc_drawall()
irrsc_clear()
node = irrsc_addscenenode(parent,name)
smgr = irrsc_createnewscenemanager(clonecontent)
flag = irr_isculled(node)
flag = irrde_run()
irrde_yeild()
irrde_setwindowcaption(caption$)
flag = irrde_iswindowactive()
flag = irrde_iswindowfocused()
flag = irrde_iswindowminimized()
flag = irrde_isfullscreen()
format = irrde_getcolorformat()
irrde_closedevice()
irrde_setresizable(int resize)
irrde_minimizewindow()
irrde_maximizewindow()
irrde_restorewindow()
irrde_clearsystemmessages()
irrmesh_setmesh(mesh_node,mesh)
mesh = irrmesh_getmesh(mesh_node)
irrmesh_setreadonlymaterials(mesh_node,readonly)
readonly = irrmesh_isreadonlymaterials(mesh_node)
count = irrmesh_getmeshbuffercount(mesh)
mesh_buff = irrmesh_getmeshbuffer(mesh,number)
irrmesh_setmaterialflag(mesh,mat_flag,new_flag)
irrmesh_sethardwaremappinghint(mesh,mapping_hint,buffer_type)
irrmesh_setdirty(mesh,buffer_type)
count = irramesh_getframecount(amesh)
mesh = irramesh_getmesh(amesh,frame,detaillevel,startframe,endframe)
irrcam_settarget(cam_node,x#,y#,z#)
irrcam_setrotation(cam_node,x#,y#,z#)
irrcam_setupvector(cam_node,x#,y#,z#)
nearvalue = irrcam_getnearvalue(cam_node)
farvalue = irrcam_getfarvalue(cam_node)
aspect = irrcam_getaspectratio(cam_node)
fov = irrcam_getfov(cam_node)
irrcam_setnearvalue(cam_node,nearval#)
irrcam_setfarvalue(cam_node,farvalue#)
irrcam_setaspectratio(cam_node,aspect#)
irrcam_setfov(cam_node,fov#)
irrimg_lock(image)
irrimg_unlock(image)
width = irrimg_getwidth(image)
height = irrimg_getheight(image)
bits = irrimg_getbitsperpixel(image)
bytes = irrimg_getbytesperpixel(image)
sizebytes = irrimg_getimagedatasizeinbytes(image)
sizepixels = irrimg_getimagedatasizeinpixels(image)
color = irrimg_getpixel(image,x,y)
irrimg_setpixel(image,x,y,col,blend)
colformat = irrimg_getcolorformat(image)
pitch = irrimg_getpitch(image)
irrimg_copytoscaling(image,target)
irrimg_copyto(image,target,x,y)
irrimg_copytowithsource(image,target,x,y,sx1,sy1,sx2,sy2)
irrimg_copytowithsourceandclip(image,target,x,y,sx1,sy1,sx2,sy2,cx1,cy1,cx2,cy2)
irrimg_copytowithsourcealpha(image,target,x,y,sx1,sy1,sx2,sy2,col)
irrimg_copytowithsourceandclipalpha(image,target,x,y,sx1,sy1,sx2,sy2,col,cx1,cy1,cx2,cy2)
irrimg_copytoscalingboxfilter(image,target,bias,blend)
irrimg_fill(image,col)
visible = irrnode_isvisible(node)
visible = irrnode_istrulyvisible(node)
irrnode_setvisible(node,visible)
id = irrnode_getid(node)
irrnode_setid(node,id)
irrnode_addchild(node,childnode)
flag = irrnode_removechild(node,childnode)
irrnode_removeall(node)
irrnode_remove(node)
irrnode_addanimator(node,animator)
irrnode_removeanimator(node,animator)
irrnode_removeanimators(node)
count = irrnode_getmaterialcount(node)
irrnode_setmaterialflag(node,matflag,flag)
irrnode_setmaterialtexture(node,layer,texture)
irrnode_setmaterialtype(node,mattype)
scalex# = irrnode_getscalex(node)
scaley# = irrnode_getscaley(node)
scalez# = irrnode_getscalez(node)
irrnode_setscale(node,x#,y#,z#)
rotationx# = irrnode_getrotationx(node)
rotationy# = irrnode_getrotationy(node)
rotationz# = irrnode_getrotationz(node)
irrnode_setrotation(node,x#,y#,z#)
positionx# = irrnode_getpositionx(node)
positiony# = irrnode_getpositiony(node)
positionz# = irrnode_getpositionz(node)
irrnode_setposition(node,x#,y#,z#)
positionx# = irrnode_getabsolutepositionx(node)
positiony# = irrnode_getabsolutepositiony(node)
positionz# = irrnode_getabsolutepositionz(node)
irrnode_setautomaticculling(node,state)
state = irrnode_getautomaticculling(node)
irrnode_setdebugdatavisible(node,state)
state = irrnode_isdebugdatavisible(node)
irrnode_setparent(node,parentnode)
parentnode = irrnode_getparent(node)
irrvid_beginscene(backbuffer,zbuffer,col)
irrvid_endscene()
irrvid_setmaterial(material)
texture = irrvid_gettexture(file$)
texture = irrvid_gettexturefromid(index)
count = irrvid_gettexturecount()
irrvid_renametexture(texture,name$)
texture = irrvid_addtexture(width,height,name$)
texture = irrvid_addtexturefromimage(name$,image)
texture = irrvid_addrendertargettexture(width,height)
irrvid_removetexture(texture)
irrvid_removealltextures()
irrvid_removehardwarebuffer(meshbuffer)
irrvid_removeallhardwarebuffers()
irrvid_makecolorkeytexture(texture,col)
irrvid_makecolorkeytexturefrompixel(texture,x,y)
irrvid_makenormalmaptexture(texture,amplitude#)
flag = irrvid_setrendertarget(texture,backbuffer,zbuffer,col)
irrvid_setviewport(x1,y1,x2,y2)
irrvid_draw3dline(x1,y1,x2,y2,x3,y3,col)
irrvid_draw2dimage(texture,x,y)
irrvid_draw2drectangle(x1,y1,x2,y2,col)
irrvid_draw2drectangleoutline(x1,y1,x2,y2,col)
irrvid_draw2dline(x1,y1,x2,y2,col)
irrvid_drawpixel(x,y,col)
irrvid_draw2dpolygon(cx,cy,radius#,col,vcount)
irrvid_drawmeshbuffer(meshbuffer)
irrvid_setfog(col,fogtype,start#,end#,density#,pixelfog,rangefog)
format = irrvid_getcolorformat()
width = irrvid_getscreensizex()
height = irrvid_getscreensizey()
width = irrvid_getrendertargetsizex()
height = irrvid_getrendertargetsizey()
fpscount = irrvid_getfps()
primcount = irrvid_getprimitivecountdrawn(mode)
irrvid_deletealldynamiclights()
index = irrvid_adddynamiclight(dlight)
maxdlights = irrvid_getmaxdynamiclights()
lightcount = irrvid_getdynamiclightcount()
dlight = irrvid_getdynamiclight(index)
irrvid_turnlighton(index,onflag)
irrvid_settexturecreationflag(textureflag,enabled)
flag = irrvid_gettexturecreationflag(textureflag)
image = irrvid_createimagefromfile(file)
image = irrvid_createimage(format,width,height)
image = irrvid_createimagecopy(format,imagetocopy)
image = irrvid_creatimagefromimage(image,posx,posy,width,height)
image = irrvid_creatimagefromtexture(texture,posx,posy,width,height)
irrvid_clearzbuffer()
image = irrvid_createscreenshot()
size = irrvid_getmaxtexturesize()
Just adding the video driver functions to the list now which makes things a little more exciting as DarkIrrlicht will allow you to use your own 2D and 3D rendering lists stored anywhere, ie in a memblock. Here's the snippet from the core Irrlicht library:
//! Draws a vertex primitive list
/** Note that, depending on the index type, some vertices might be not
accessible through the index list. The limit is at 65535 vertices for 16bit
indices. Please note that currently not all primitives are available for
all drivers, and some might be emulated via triangle renders.
\param vertices Pointer to array of vertices.
\param vertexCount Amount of vertices in the array.
\param indexList Pointer to array of indices. These define the vertices used
for each primitive. Depending on the pType, indices are interpreted as single
objects (for point like primitives), pairs (for lines), triplets (for
triangles), or quads.
\param primCount Amount of Primitives
\param vType Vertex type, e.g. video::EVT_STANDARD for S3DVertex.
\param pType Primitive type, e.g. scene::EPT_TRIANGLE_FAN for a triangle fan.
\param iType Index type, e.g. video::EIT_16BIT for 16bit indices. */
virtual void drawVertexPrimitiveList(const void* vertices, u32 vertexCount,
const void* indexList, u32 primCount,
E_VERTEX_TYPE vType=EVT_STANDARD,
scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES,
E_INDEX_TYPE iType=EIT_16BIT) =0;
//! Draws a vertex primitive list in 2d
/** Compared to the general (3d) version of this method, this
one sets up a 2d render mode, and uses only x and y of vectors.
Note that, depending on the index type, some vertices might be
not accessible through the index list. The limit is at 65535
vertices for 16bit indices. Please note that currently not all
primitives are available for all drivers, and some might be
emulated via triangle renders. This function is not available
for the sw drivers.
\param vertices Pointer to array of vertices.
\param vertexCount Amount of vertices in the array.
\param indexList Pointer to array of indices. These define the
vertices used for each primitive. Depending on the pType,
indices are interpreted as single objects (for point like
primitives), pairs (for lines), triplets (for triangles), or
quads.
\param primCount Amount of Primitives
\param vType Vertex type, e.g. video::EVT_STANDARD for S3DVertex.
\param pType Primitive type, e.g. scene::EPT_TRIANGLE_FAN for a triangle fan.
\param iType Index type, e.g. video::EIT_16BIT for 16bit indices. */
virtual void draw2DVertexPrimitiveList(const void* vertices, u32 vertexCount,
const void* indexList, u32 primCount,
E_VERTEX_TYPE vType=EVT_STANDARD,
scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES,
E_INDEX_TYPE iType=EIT_16BIT) =0;
//! Draws an indexed triangle list.
/** Note that there may be at maximum 65536 vertices, because
the index list is an array of 16 bit values each with a maximum
value of 65536. If there are more than 65536 vertices in the
list, results of this operation are not defined.
\param vertices Pointer to array of vertices.
\param vertexCount Amount of vertices in the array.
\param indexList Pointer to array of indices.
\param triangleCount Amount of Triangles. Usually amount of indices / 3. */
void drawIndexedTriangleList(const S3DVertex* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount)
{
drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_STANDARD, scene::EPT_TRIANGLES, EIT_16BIT);
}
//! Draws an indexed triangle list.
/** Note that there may be at maximum 65536 vertices, because
the index list is an array of 16 bit values each with a maximum
value of 65536. If there are more than 65536 vertices in the
list, results of this operation are not defined.
\param vertices Pointer to array of vertices.
\param vertexCount Amount of vertices in the array.
\param indexList Pointer to array of indices.
\param triangleCount Amount of Triangles. Usually amount of indices / 3. */
void drawIndexedTriangleList(const S3DVertex2TCoords* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount)
{
drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_2TCOORDS, scene::EPT_TRIANGLES, EIT_16BIT);
}
//! Draws an indexed triangle list.
/** Note that there may be at maximum 65536 vertices, because
the index list is an array of 16 bit values each with a maximum
value of 65536. If there are more than 65536 vertices in the
list, results of this operation are not defined.
\param vertices Pointer to array of vertices.
\param vertexCount Amount of vertices in the array.
\param indexList Pointer to array of indices.
\param triangleCount Amount of Triangles. Usually amount of indices / 3. */
void drawIndexedTriangleList(const S3DVertexTangents* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount)
{
drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_TANGENTS, scene::EPT_TRIANGLES, EIT_16BIT);
}
//! Draws an indexed triangle fan.
/** Note that there may be at maximum 65536 vertices, because
the index list is an array of 16 bit values each with a maximum
value of 65536. If there are more than 65536 vertices in the
list, results of this operation are not defined.
\param vertices Pointer to array of vertices.
\param vertexCount Amount of vertices in the array.
\param indexList Pointer to array of indices.
\param triangleCount Amount of Triangles. Usually amount of indices - 2. */
void drawIndexedTriangleFan(const S3DVertex* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount)
{
drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_STANDARD, scene::EPT_TRIANGLE_FAN, EIT_16BIT);
}
//! Draws an indexed triangle fan.
/** Note that there may be at maximum 65536 vertices, because
the index list is an array of 16 bit values each with a maximum
value of 65536. If there are more than 65536 vertices in the
list, results of this operation are not defined.
\param vertices Pointer to array of vertices.
\param vertexCount Amount of vertices in the array.
\param indexList Pointer to array of indices.
\param triangleCount Amount of Triangles. Usually amount of indices - 2. */
void drawIndexedTriangleFan(const S3DVertex2TCoords* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount)
{
drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_2TCOORDS, scene::EPT_TRIANGLE_FAN, EIT_16BIT);
}
//! Draws an indexed triangle fan.
/** Note that there may be at maximum 65536 vertices, because
the index list is an array of 16 bit values each with a maximum
value of 65536. If there are more than 65536 vertices in the
list, results of this operation are not defined.
\param vertices Pointer to array of vertices.
\param vertexCount Amount of vertices in the array.
\param indexList Pointer to array of indices.
\param triangleCount Amount of Triangles. Usually amount of indices - 2. */
void drawIndexedTriangleFan(const S3DVertexTangents* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount)
{
drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_TANGENTS, scene::EPT_TRIANGLE_FAN, EIT_16BIT);
}
When this piece has been added and the base SceneNode done then I'll post the updated dll with a few examples showing both engines running at the same time as well as a benchmark between the both of them.
EDIT: Updated function list with the added node controls lib...
EDIT2: Updated 'irrvid' functions. Also created the dll. Will have an example or two when I wake sometime tomorrow....
Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!