Openb3dmax.Openb3dmax: Functions Types Modinfo Source  

OpenB3DMax extended functions, not in B3D

The wrapper with declarations for library functions.

Functions Summary

ActFadeTo Fades entity to the given alpha value (0..1) at the speed of rate.
ActMoveBy Moves entity by an x y z position increment at the speed of rate.
ActMoveTo Moves entity to the given x y z position at the speed of rate.
ActNewtonian Translates entity in the direction it is moving, rate should be below 1.
ActScaleTo Scales entity to the given x y z dimensions at the speed of rate.
ActTintTo Tints entity to the given r g b value (0..255) at the speed of rate.
ActTrackByDistance Tracks target entity up to a given distance at the speed of rate.
ActTrackByPoint Tracks target entity at a given point from the entity at the speed of rate.
ActTurnBy Turns entity by an x y z rotation increment at the speed of rate.
ActTurnTo Turns entity to the given x y z rotation at the speed of rate.
ActVector Positions entity according the given x y z vector.
AddRenderTarget undocumented.
AddSurface Add an existing surface to a mesh.
AlphaDiscard Set discard value (as 0..1) above which to ignore pixel's alpha value, default is 1 (only if flag 2)
AmbientShader Set default shader for surfaces.
AntiAlias Online doc
AppendAction Adds action to the end of another one, where act1 happens before act2.
AttachFragShader Attaches a fragment shader object to a program object, attach vertex first or older compilers will crash.
AttachVertShader Attaches a vertex shader object to a program object.
BackBufferToTex Copy the contents of the backbuffer to a texture.
BatchSpriteEntity Return the sprite batch main mesh entity.
BatchSpriteOrigin Move the batch sprite origin for depth sorting.
BatchSpriteParent Add a parent to the entire batch mesh - position only.
BeginMax2D Old begin function as in Minib3d is 0, new begin function is 1 (default)
BrushGLBlendFunc GL equivalent, experimental.
BrushGLColor GL equivalent, experimental.
BufferToTex Copy pixmap buffer to texture, buffer must be a byte ptr.
CameraProjMatrix undocumented.
CameraToTex Copy rendered camera view to texture.
CopyBrush Returns a copy of the new brush.
CopyList Copy a list or vector. To copy a field list use as a method.
CopyRect Copy rectangle of source pixmap pixels to destination, not exactly like B3D.
CopySurface Returns a copy of the new surface.
CopyTexture Returns a copy of the new texture.
CountMipmaps Returns the number of mipmaps a texture has.
CreateBatchSprite Add a sprite to batch, batchsprites are one mesh.
CreateBlob Create blob from a fluid mesh where radius is the size of the blob.
CreateBone Create bone.
CreateConstraint Create constraint force between two entities of given length, doesn't affect rotation.
CreateFluid Create fluid mesh for blobs to use.
CreateFragShader Returns a new frag shader object from file.
CreateFragShaderString Returns a new frag shader object from string.
CreateGeosphere Create geodesic sphere and set terrain size.
CreateOcTree Create octree and set its width, height and depth.
CreateParticleEmitter Create particle emitter from sprite.
CreatePostFX undocumented.
CreateQuad Create flat quad.
CreateRigidBody Create rigid physics body attached to four entities.
CreateShader Load shader from two strings, vertex and fragment.
CreateShaderMaterial Returns a new shader material without creating any shader objects.
CreateShaderVGF Load shader from three strings, vertex, geometry and fragment.
CreateShadow Create stencil shadow, static is for static or dynamic shadows.
CreateStencil Create stencil object.
CreateVertShader Returns a new vert shader object from file.
CreateVertShaderString Returns a new vert shader object from string.
CreateVoxelSprite Create voxel sprite where slices is the number of sprites.
DeleteFragShader Deletes a frag shader object from a program object.
DeleteVertShader Deletes a vert shader object from a program object.
DepthBufferToTex Copy the contents of the depth buffer to a texture.
EmitterParticleFunction Set custom rendering callback function for particle emitter.
EmitterParticleLife Particle lifespan in frames.
EmitterParticleSpeed Set initial speed, use Rotate/TurnEntity to change direction.
EmitterRate Rate between each emission in range 0..1, smaller is slower.
EmitterVariance Set randomness of emission (direction and speed)
EmitterVector Set vector (direction and speed) for wind or gravity effects.
EndAction Ends action so it can be freed, 1 = automatically ended, 2 = manually ended.
EndMax2D Old end function as in Minib3d is 0, new end function is 1 (default)
EntityMatrix undocumented.
EntityScaleX Returns the scale for the x axis of an entity set with ScaleEntity.
EntityScaleY Returns the scale for the y axis of an entity set with ScaleEntity.
EntityScaleZ Returns the scale for the z axis of an entity set with ScaleEntity.
FluidArray Create custom rendering array data for fluid mesh and set width, height and depth.
FluidFunction Set custom rendering callback function for fluid mesh.
FluidThreshold Set threshold value used in fluid rendering algorithm, 0.5 is default.
FreeAction Frees action from memory when it has ended.
FreeBrushTextures Frees all brush textures, FreeBrush does not free textures.
FreeShader Frees a shader material.
FreeShadow Free stencil shadow.
FreeStencil Frees a stencil object.
FreeSurface Frees VBO data and brush.
GeosphereHeight Set terrain height normalizing value, 0.05 is default.
GetMeshLoader Returns a mesh loader capable of loading extension.
GetShaderProgram Get a shader program object reference.
GetString Gets a Blitz string from a C string.
GlobalAnIsotropic Set global texture anisotropic (default for all), TextureAnIsotropic overrides it.
GlobalHeight Returns global height of screen resolution.
GlobalResolution Sets global width and height of screen resolution.
GlobalWidth Returns global width of screen resolution.
LightMesh Performs a 'fake' lighting operation on a mesh.
LinkShader Link shader to a program object, as created by CreateShaderMaterial.
LoadAnimMesh Loads an anim mesh, see MeshLoader.
LoadBatchTexture Does not create sprite, just loads texture.
LoaderMatrix Change model loader coordinates system, currently only 3DS supported.
LoadGeosphere Load geodesic sphere terrain from heightmap image.
LoadMaterial Load a texture from image for 3D texture sampling, use with voxelsprites.
LoadMD2 Loads an md2 entity and returns its handle.
LoadMesh Loads a single mesh, see MeshLoader.
LoadShader Load shader from two files, vertex and fragment.
LoadShaderVGF Load shader from three files, vertex, geometry and fragment.
MeshCSG Method 0 subtracts mesh2 from mesh1, 1 adds meshes, 2 intersects meshes. Returns a new mesh.
MeshCullRadius Equivalent of Blitz3D's MeshCullBox command. It sets the radius of a mesh's 'cull sphere'
MeshLoader Set mesh loaders to use, default is "bmx"
ModifyGeosphere Set height of a given point, like ModifyTerrain.
MSAntiAlias Enables or disables hardware multisample antialiasing if supported.
NewAnimationKeys Returns a new TAnimationKeys object.
NewBone Returns a new TBone object.
NewMatrix Returns a new TMatrix object.
NewMesh Returns a new TMesh object.
NewQuaternion Returns a new TQuaternion object.
NewSprite Returns a new TSprite object.
NewSurface Returns a new TSurface object.
NewTexture Returns a new TTexture object.
NewVector Returns a new TVector object.
OctreeBlock Place mesh into a node of an octree, the mesh can be duplicated using no more memory.
OctreeMesh Place mesh into a node of an octree, the mesh can't be duplicated so to do that use CopyEntity.
ParticleColor Set color of particle trails.
ParticleTrail Set number of particles in trail.
ParticleVector Set vector (direction and speed) of particle trails.
PositionAnimMesh Moves all vertices of mesh and every child mesh.
PostFXBuffer undocumented.
PostFXFunction undocumented.
PostFXShader undocumented.
PostFXShaderPass undocumented.
PostFXTexture undocumented.
RepeatMesh Like CopyMesh but for instancing effects.
ResetShadow Reset created flag to update static shadow.
RotateAnimMesh Rotates all vertices of mesh and every child mesh.
ScaleAnimMesh Scales all vertices of mesh and every child mesh.
SetFloat Set a shader variable name of a uniform float type to a float value.
SetFloat2 Set a shader variable name of a uniform vec2 type to 2 float values.
SetFloat3 Set a shader variable name of a uniform vec3 type to 3 float values.
SetFloat4 Set a shader variable name of a uniform vec4 type to 4 float values.
SetInteger Set a shader variable name of a uniform int type to an integer value.
SetInteger2 Set a shader variable name of a uniform ivec2 type to 2 integer values.
SetInteger3 Set a shader variable name of a uniform ivec3 type to 3 integer values.
SetInteger4 Set a shader variable name of a uniform ivec4 type to 4 integer values.
SetShadowColor Set color R/G/B in range 0..255 and A in range 0..1.
SetString Sets a C string from a Blitz string.
ShadeEntity Apply shader to an entity.
ShadeMesh Apply shader to a mesh.
ShaderFunction undocumented.
ShaderMaterial Set a 3d texture for sampling.
ShaderTexture Load a texture for 2D texture sampling.
ShadeSurface Apply shader to a surface.
SkinMesh Set animated surface (vid is vertex index) for each of the bone no and weights arrays.
SpriteRenderMode If mode is 1 rendering is normal, 2 is batch sprites on a single surface, 3 is batch particles.
StencilAlpha Set stencil alpha value.
StencilClsColor Set stencil clear screen color in range 0..255.
StencilClsMode Set stencil clear screen modes.
StencilMesh Set mesh to be used as stencil.
StencilMode Set stencil render modes.
StringPtr Returns string cast of byte pointer.
SurfsRendered Number of surfaces currently being rendered.
TexToBuffer Copy texture to a pixmap buffer, buffer must be a byte ptr.
TextureAnIsotropic Set texture anisotropic factor, usually from 2-16.
TextureFlags Set texture flags, see LoadTexture for values.
TextureGLTexEnvf GL equivalent, param is a float, limited to 12 calls per texture, experimental.
TextureGLTexEnvi GL equivalent, param is a const, limited to 12 calls per texture, experimental.
TextureLoader Set texture loaders to use (default is streamed), also sets cubemap faces or frames.
TextureMultitex Set texture multitex factor, used in interpolate and custom TexBlend options.
TrisRendered Number of triangles currently being rendered.
UpdateTexCoords Recalculates the surface's uvw coord set 1 based on vertices.
UseEntity undocumented.
UseFloat Bind a float variable to a shader variable name of a uniform float type.
UseFloat2 Bind 2 float variables to a shader variable name of a uniform vec2 Type.
UseFloat3 Bind 3 float variables to a shader variable name of a uniform vec3 type.
UseFloat4 Bind 4 float variables to a shader variable name of a uniform vec4 type.
UseInteger Bind an integer variable to a shader variable name of a uniform int type.
UseInteger2 Bind 2 integer variables to a shader variable name of a uniform ivec2 type.
UseInteger3 Bind 3 integer variables to a shader variable name of a uniform ivec3 type.
UseInteger4 Bind 4 integer variables to a shader variable name of a uniform ivec4 type.
UseMatrix Sends matrix data to a shader variable name of a uniform mat4 type.
UseStencil Stencil to use, set to Null to disable stencil.
UseSurface Sends surface data to a shader variable name.
VertsRendered Number of vertices currently being rendered.
VoxelSpriteMaterial Set material for voxel sprite.

Types Summary

TAction Action.
TAnimationKeys AnimationKeys data.
TBatchSprite Batch sprite entity.
TBatchSpriteMesh Batch sprite mesh entity.
TBlitz2D Blitz2D.
TBlob Blob entity.
TBone Bone entity.
TBrush Brush.
TCamera Camera entity.
TConstraint Constraint.
TEntity Entity.
TFluid Fluid mesh entity.
TGeosphere Geosphere terrain entity.
TGlobal3D Global.
THardwareInfo Hardware info.
TLight Light entity.
TMaterial Material texture.
TMatrix Matrix functions.
TMesh Mesh entity.
TMeshLoader Mesh loader.
TOcTree Octree terrain entity.
TParticleBatch Particle Batch mesh entity.
TParticleEmitter Particle Emitter entity.
TPick Pick.
TPivot Pivot entity.
TPostFX Post effects object.
TQuaternion Quaternion functions.
TRigidBody Rigid Body.
TShader Shader.
TShaderObject Shader object.
TShadowObject Shadow object.
TSprite Sprite mesh entity.
TStencil Stencil.
TSurface Surface.
TTerrain Terrain entity.
TTexture Texture.
TVector Vector functions.
TVoxelSprite Voxelsprite mesh entity.

Functions

Function ActFadeTo:TAction( ent:TEntity,a:Float,rate:Float )
DescriptionFades entity to the given alpha value (0..1) at the speed of rate.

Function ActMoveBy:TAction( ent:TEntity,a:Float,b:Float,c:Float,rate:Float )
DescriptionMoves entity by an x y z position increment at the speed of rate.

Function ActMoveTo:TAction( ent:TEntity,a:Float,b:Float,c:Float,rate:Float )
DescriptionMoves entity to the given x y z position at the speed of rate.

Function ActNewtonian:TAction( ent:TEntity,rate:Float )
DescriptionTranslates entity in the direction it is moving, rate should be below 1.

Function ActScaleTo:TAction( ent:TEntity,a:Float,b:Float,c:Float,rate:Float )
DescriptionScales entity to the given x y z dimensions at the speed of rate.

Function ActTintTo:TAction( ent:TEntity,a:Float,b:Float,c:Float,rate:Float )
DescriptionTints entity to the given r g b value (0..255) at the speed of rate.

Function ActTrackByDistance:TAction( ent:TEntity,target:TEntity,a:Float,rate:Float )
DescriptionTracks target entity up to a given distance at the speed of rate.

Function ActTrackByPoint:TAction( ent:TEntity,target:TEntity,a:Float,b:Float,c:Float,rate:Float )
DescriptionTracks target entity at a given point from the entity at the speed of rate.

Function ActTurnBy:TAction( ent:TEntity,a:Float,b:Float,c:Float,rate:Float )
DescriptionTurns entity by an x y z rotation increment at the speed of rate.

Function ActTurnTo:TAction( ent:TEntity,a:Float,b:Float,c:Float,rate:Float )
DescriptionTurns entity to the given x y z rotation at the speed of rate.

Function ActVector:TAction( ent:TEntity,a:Float,b:Float,c:Float )
DescriptionPositions entity according the given x y z vector.

Function AddRenderTarget( fx:TPostFX,pass_no:Int,numColBufs:Int,depth:Int,format:Int=8,scale:Float=1.0 )
Descriptionundocumented.

Function AddSurface( mesh:TMesh,surf:TSurface,anim_surf%=False )
DescriptionAdd an existing surface to a mesh.

Function AlphaDiscard( tex:TTexture,alpha:Float=0.01 )
DescriptionSet discard value (as 0..1) above which to ignore pixel's alpha value, default is 1 (only if flag 2)

Function AmbientShader( material:TShader )
DescriptionSet default shader for surfaces.

Function AntiAlias( samples:Int )
DescriptionOnline doc

Function AppendAction( act1:TAction,act2:TAction )
DescriptionAdds action to the end of another one, where act1 happens before act2.

Function AttachFragShader:Int( shader:TShader,myShader:TShaderObject )
DescriptionAttaches a fragment shader object to a program object, attach vertex first or older compilers will crash.

Function AttachVertShader:Int( shader:TShader,myShader:TShaderObject )
DescriptionAttaches a vertex shader object to a program object.

Function BackBufferToTex( tex:TTexture,mipmap_no:Int=0,frame:Int=0,fastinvert:Int=True )
DescriptionCopy the contents of the backbuffer to a texture.
InformationOpenB3DMax does not have the same buffer commands as Blitz3D. The region copied from the backbuffer will start at 0,0 and end at the texture's width and height. So if you want to copy a 3D scene to a texture, first resize the camera viewport to the texture size, use RenderWorld to render the camera, then use this command. Back buffer is upside-down so set fastinvert to True to invert texture uvs, False to flip texture data (slower).

Function BatchSpriteEntity:TEntity( batch_sprite:TBatchSprite=Null )
DescriptionReturn the sprite batch main mesh entity.

Function BatchSpriteOrigin( batch_sprite:TBatchSprite,x:Float,y:Float,z:Float )
DescriptionMove the batch sprite origin for depth sorting.

Function BatchSpriteParent( id:Int=0,ent:TEntity,glob:Int=True )
DescriptionAdd a parent to the entire batch mesh - position only.

Function BeginMax2D( version:Int=1 )
DescriptionOld begin function as in Minib3d is 0, new begin function is 1 (default)

Function BrushGLBlendFunc( brush:TBrush,sfactor:Int,dfactor:Int )
DescriptionGL equivalent, experimental.

Function BrushGLColor( brush:TBrush,r:Float,g:Float,b:Float,a:Float=1.0 )
DescriptionGL equivalent, experimental.

Function BufferToTex( tex:TTexture,buffer:Byte Ptr,frame:Int=0 ) ' frame currently does nothing
DescriptionCopy pixmap buffer to texture, buffer must be a byte ptr.

Function CameraProjMatrix:Float Ptr( cam:TCamera )
Descriptionundocumented.

Function CameraToTex( tex:TTexture,cam:TCamera,frame:Int=0 ) ' frame currently does nothing
DescriptionCopy rendered camera view to texture.

Function CopyBrush:TBrush( brush:TBrush )
DescriptionReturns a copy of the new brush.

Function CopyList( list:TList )
DescriptionCopy a list or vector. To copy a field list use as a method.
InformationUse either mesh with surf_list/anim_surf_list/bones or ent with child_list.

Function CopyRect( srcX:Int,srcY:Int,srcW:Int,srcH:Int,dstW:Int,dstH:Int,src:Byte Ptr,dst:Byte Ptr,bPP:Int=4,invert:Int=0 )
DescriptionCopy rectangle of source pixmap pixels to destination, not exactly like B3D.
InformationsrcW/H is src size, srcX/srcY top-left position, dstW/H is dst size, bytes per pixel defaults to 4.

Function CopySurface:TSurface( surf:TSurface )
DescriptionReturns a copy of the new surface.

Function CopyTexture:TTexture( tex:TTexture,flags:Int )
DescriptionReturns a copy of the new texture.

Function CountMipmaps:Int( tex:TTexture )
DescriptionReturns the number of mipmaps a texture has.

Function CreateBatchSprite:TBatchSprite( parent_ent:TEntity=Null )
DescriptionAdd a sprite to batch, batchsprites are one mesh.
InformationIf you want to add to specific batch controller, use BatchSpriteEntity as parent_ent.

Function CreateBlob:TBlob( fluid:TFluid,radius:Float,parent_ent:TEntity=Null )
DescriptionCreate blob from a fluid mesh where radius is the size of the blob.

Function CreateBone:TBone( mesh:TMesh,parent_ent:TEntity=Null )
DescriptionCreate bone.

Function CreateConstraint:TConstraint( p1:TEntity,p2:TEntity,l:Float )
DescriptionCreate constraint force between two entities of given length, doesn't affect rotation.

Function CreateFluid:TFluid()
DescriptionCreate fluid mesh for blobs to use.

Function CreateFragShader:TShaderObject( shader:TShader,shaderFileName:String )
DescriptionReturns a new frag shader object from file.

Function CreateFragShaderString:TShaderObject( shader:TShader,shadercode:String )
DescriptionReturns a new frag shader object from string.

Function CreateGeosphere:TGeosphere( size:Int,parent:TEntity=Null )
DescriptionCreate geodesic sphere and set terrain size.

Function CreateOcTree:TOcTree( w:Float,h:Float,d:Float,parent_ent:TEntity=Null )
DescriptionCreate octree and set its width, height and depth.

Function CreateParticleEmitter:TParticleEmitter( particle:TEntity,parent_ent:TEntity=Null )
DescriptionCreate particle emitter from sprite.

Function CreatePostFX:TPostFX( cam:TCamera,passes:Int=1 )
Descriptionundocumented.

Function CreateQuad:TMesh( parent:TEntity=Null )
DescriptionCreate flat quad.

Function CreateRigidBody:TRigidBody( body:TEntity,p1:TEntity,p2:TEntity,p3:TEntity,p4:TEntity )
DescriptionCreate rigid physics body attached to four entities.

Function CreateShader:TShader( ShaderName:String,VshaderString:String,FshaderString:String )
DescriptionLoad shader from two strings, vertex and fragment.

Function CreateShaderMaterial:TShader( ShaderName:String )
DescriptionReturns a new shader material without creating any shader objects.

Function CreateShaderVGF:TShader( ShaderName:String,VshaderString:String,GshaderString:String,FshaderString:String )
DescriptionLoad shader from three strings, vertex, geometry and fragment.

Function CreateShadow:TShadowObject( parent:TMesh,Static:Int=False )
DescriptionCreate stencil shadow, static is for static or dynamic shadows.

Function CreateStencil:TStencil()
DescriptionCreate stencil object.

Function CreateVertShader:TShaderObject( shader:TShader,shaderFileName:String )
DescriptionReturns a new vert shader object from file.

Function CreateVertShaderString:TShaderObject( shader:TShader,shadercode:String )
DescriptionReturns a new vert shader object from string.

Function CreateVoxelSprite:TVoxelSprite( slices:Int=64,parent:TEntity=Null )
DescriptionCreate voxel sprite where slices is the number of sprites.

Function DeleteFragShader( myShader:TShaderObject )
DescriptionDeletes a frag shader object from a program object.

Function DeleteVertShader( myShader:TShaderObject )
DescriptionDeletes a vert shader object from a program object.

Function DepthBufferToTex( tex:TTexture,cam:TCamera=Null )
DescriptionCopy the contents of the depth buffer to a texture.

Function EmitterParticleFunction( emit:TParticleEmitter,EmitterFunction( ent:Byte Ptr,life:Int ) )
DescriptionSet custom rendering callback function for particle emitter.
InformationThis gives access to each particle sprite (as byte ptr) and it's current lifetime left.

Function EmitterParticleLife( emit:TParticleEmitter,l:Int )
DescriptionParticle lifespan in frames.

Function EmitterParticleSpeed( emit:TParticleEmitter,s:Float )
DescriptionSet initial speed, use Rotate/TurnEntity to change direction.

Function EmitterRate( emit:TParticleEmitter,r:Float )
DescriptionRate between each emission in range 0..1, smaller is slower.

Function EmitterVariance( emit:TParticleEmitter,v:Float )
DescriptionSet randomness of emission (direction and speed)

Function EmitterVector( emit:TParticleEmitter,x:Float,y:Float,z:Float )
DescriptionSet vector (direction and speed) for wind or gravity effects.

Function EndAction( act:TAction )
DescriptionEnds action so it can be freed, 1 = automatically ended, 2 = manually ended.

Function EndMax2D( version:Int=1 )
DescriptionOld end function as in Minib3d is 0, new end function is 1 (default)

Function EntityMatrix:Float Ptr( ent:TEntity )
Descriptionundocumented.

Function EntityScaleX:Float( ent:TEntity,glob:Int=False )
DescriptionReturns the scale for the x axis of an entity set with ScaleEntity.
InformationIf glob is true then it's relative to any parents.

Function EntityScaleY:Float( ent:TEntity,glob:Int=False )
DescriptionReturns the scale for the y axis of an entity set with ScaleEntity.
InformationIf glob is true then it's relative to any parents.

Function EntityScaleZ:Float( ent:TEntity,glob:Int=False )
DescriptionReturns the scale for the z axis of an entity set with ScaleEntity.
InformationIf glob is true then it's relative to any parents.

Function FluidArray( fluid:TFluid,Array:Float Var,w:Int,h:Int,d:Int )
DescriptionCreate custom rendering array data for fluid mesh and set width, height and depth.

Function FluidFunction( fluid:TFluid,FieldFunction:Float( x:Float,y:Float,z:Float ) )
DescriptionSet custom rendering callback function for fluid mesh.

Function FluidThreshold( fluid:TFluid,threshold:Float )
DescriptionSet threshold value used in fluid rendering algorithm, 0.5 is default.

Function FreeAction( act:TAction )
DescriptionFrees action from memory when it has ended.

Function FreeBrushTextures( brush:TBrush )
DescriptionFrees all brush textures, FreeBrush does not free textures.

Function FreeShader( shader:TShader ) ' Spinduluz
DescriptionFrees a shader material.

Function FreeShadow( shad:TShadowObject )
DescriptionFree stencil shadow.

Function FreeStencil( stencil:TStencil ) ' Spinduluz
DescriptionFrees a stencil object.

Function FreeSurface( surf:TSurface )
DescriptionFrees VBO data and brush.

Function GeosphereHeight( geo:TGeosphere,h:Float )
DescriptionSet terrain height normalizing value, 0.05 is default.

Function GetMeshLoader:TMeshLoader(extension:String)
DescriptionReturns a mesh loader capable of loading extension.

Function GetShaderProgram:Int( material:TShader )
DescriptionGet a shader program object reference.

Function GetString:String( obj:Object,strPtr:Byte Ptr )
DescriptionGets a Blitz string from a C string.

Function GlobalAnIsotropic( f:Float )
DescriptionSet global texture anisotropic (default for all), TextureAnIsotropic overrides it.

Function GlobalHeight:Int()
DescriptionReturns global height of screen resolution.

Function GlobalResolution( width:Int,height:Int )
DescriptionSets global width and height of screen resolution.
InformationOnly needed when changing screen resolution, these globals are used in CreateCamera, CameraViewport, CameraPick, BackBufferToTex and DepthBufferToTex.

Function GlobalWidth:Int()
DescriptionReturns global width of screen resolution.

Function LightMesh( mesh:TMesh,red:Float,green:Float,blue:Float,range:Float=0,light_x:Float=0,light_y:Float=0,light_z:Float=0 )
DescriptionPerforms a 'fake' lighting operation on a mesh.
InformationYou need to use EntityFX ent,2 to enable vertex colors on the target mesh before you can see any results.

Function LinkShader:Int( shader:TShader )
DescriptionLink shader to a program object, as created by CreateShaderMaterial.

Function LoadAnimMesh:TMesh( url:Object,parent:TEntity=Null )
ReturnsA mesh object with child meshes if any.
DescriptionLoads an anim mesh, see MeshLoader.

Function LoadBatchTexture:TBatchSpriteMesh( tex_file:String,tex_flag:Int=1,id:Int=0 )
DescriptionDoes not create sprite, just loads texture.

Function LoaderMatrix( ext$,xx#,xy#,xz#,yx#,yy#,yz#,zx#,zy#,zz# )
DescriptionChange model loader coordinates system, currently only 3DS supported.

Function LoadGeosphere:TGeosphere( file:String,parent:TEntity=Null )
DescriptionLoad geodesic sphere terrain from heightmap image.

Function LoadMaterial:TMaterial( filename:String,flags:Int,frame_width:Int,frame_height:Int,first_frame:Int,frame_count:Int )
DescriptionLoad a texture from image for 3D texture sampling, use with voxelsprites.
InformationFlags are texture flags, frame width/height is the size in pixels of each slice, first frame is the index of the slice and frame count is how many slices.

Function LoadMD2:TMesh( url:Object,parent:TEntity=Null )
DescriptionLoads an md2 entity and returns its handle.

Function LoadMesh:TMesh( url:Object,parent:TEntity=Null )
ReturnsA mesh object.
DescriptionLoads a single mesh, see MeshLoader.

Function LoadShader:TShader( ShaderName:String,VshaderFileName:String,FshaderFileName:String )
DescriptionLoad shader from two files, vertex and fragment.

Function LoadShaderVGF:TShader( ShaderName:String,VshaderFileName:String,GshaderFileName:String,FshaderFileName:String )
DescriptionLoad shader from three files, vertex, geometry and fragment.

Function MeshCSG:TMesh( m1:TMesh,m2:TMesh,method_no:Int=1 )
DescriptionMethod 0 subtracts mesh2 from mesh1, 1 adds meshes, 2 intersects meshes. Returns a new mesh.

Function MeshCullRadius( ent:TEntity,radius:Float )
DescriptionEquivalent of Blitz3D's MeshCullBox command. It sets the radius of a mesh's 'cull sphere'
InformationIf the 'cull sphere' is not inside the viewing area, the mesh will not be rendered. A mesh's cull radius is set automatically, therefore in most cases you will not have to use this command. One time you may have to use it is for animated meshes where the default cull radius may not take into account all animation positions, resulting in the mesh being wrongly culled at extreme positions.

Function MeshLoader( meshid:String,flags:Int=-1 )
DescriptionSet mesh loaders to use, default is "bmx"
InformationSet meshid to "bmx" or "max" for Blitzmax streamed mesh loaders, use "cpp" or "lib" for standard Openb3d library mesh loaders, use "all" for all available loaders. Use "3ds2" for alternative 3DS loader or "3ds" for default 3DS loader. Use "trans" to transform mesh vertices (if supported) or disable with "notrans" (only for 3DS files). Use "debug" for mesh loader debug information or disable with "nodebug".

Function ModifyGeosphere( geo:TGeosphere,x:Int,z:Int,new_height:Float )
DescriptionSet height of a given point, like ModifyTerrain.

Function MSAntiAlias( multisample:Int=0 )
DescriptionEnables or disables hardware multisample antialiasing if supported.

Function NewAnimationKeys:TAnimationKeys( bone:TBone=Null )
DescriptionReturns a new TAnimationKeys object.

Function NewBone:TBone( mesh:TMesh )
DescriptionReturns a new TBone object.

Function NewMatrix:TMatrix()
DescriptionReturns a new TMatrix object.

Function NewMesh:TMesh()
DescriptionReturns a new TMesh object.

Function NewQuaternion:TQuaternion()
DescriptionReturns a new TQuaternion object.

Function NewSprite:TSprite()
DescriptionReturns a new TSprite object.

Function NewSurface:TSurface( mesh:TMesh )
DescriptionReturns a new TSurface object.

Function NewTexture:TTexture()
DescriptionReturns a new TTexture object.

Function NewVector:TVector()
DescriptionReturns a new TVector object.

Function OctreeBlock( octree:TOcTree,mesh:TMesh,level:Int,X:Float,Y:Float,Z:Float,Near:Float=0,Far:Float=1000 )
DescriptionPlace mesh into a node of an octree, the mesh can be duplicated using no more memory.
InformationSince a block is not an entity it has no position, etc. it has the properties of the node it is in. Level defaults to 0, the higher the level the smaller the cell. XYZ is the position in the octree. Near defaults to 0, this is the minimum distance at which that node is visible, if 0 that node is always visible, if higher the mesh/block won't be rendered when it's closer. Far defaults to 1000, this is the maximum distance at which the node can be split in children, if the node is set at a higher range than the camera, its children won't be rendered.

Function OctreeMesh( octree:TOcTree,mesh:TMesh,level:Int,X:Float,Y:Float,Z:Float,Near:Float=0,Far:Float=1000 )
DescriptionPlace mesh into a node of an octree, the mesh can't be duplicated so to do that use CopyEntity.

Function ParticleColor( sprite:TSprite,r:Float,g:Float,b:Float,a:Float=0 )
DescriptionSet color of particle trails.

Function ParticleTrail( sprite:TSprite,length:Int )
DescriptionSet number of particles in trail.

Function ParticleVector( sprite:TSprite,x:Float,y:Float,z:Float )
DescriptionSet vector (direction and speed) of particle trails.

Function PositionAnimMesh( mesh:TMesh,px#,py#,pz# )
DescriptionMoves all vertices of mesh and every child mesh.

Function PostFXBuffer( fx:TPostFX,pass_no:Int,source_pass:Int,index:Int,slot:Int )
Descriptionundocumented.

Function PostFXFunction( fx:TPostFX,pass_no:Int,PassFunction() )
Descriptionundocumented.

Function PostFXShader( fx:TPostFX,pass_no:Int,shader:TShader )
Descriptionundocumented.

Function PostFXShaderPass( fx:TPostFX,pass_no:Int,name:String,v:Int )
Descriptionundocumented.

Function PostFXTexture( fx:TPostFX,pass_no:Int,tex:TTexture,slot:Int,frame:Int=0 )
Descriptionundocumented.

Function RepeatMesh:TMesh( mesh:TMesh,parent:TEntity=Null )
DescriptionLike CopyMesh but for instancing effects.

Function ResetShadow( shad:TShadowObject )
DescriptionReset created flag to update static shadow.

Function RotateAnimMesh( mesh:TMesh,rx#,ry#,rz# )
DescriptionRotates all vertices of mesh and every child mesh.

Function ScaleAnimMesh( mesh:TMesh,sx#,sy#,sz# )
DescriptionScales all vertices of mesh and every child mesh.

Function SetFloat( material:TShader,name:String,v1:Float )
DescriptionSet a shader variable name of a uniform float type to a float value.

Function SetFloat2( material:TShader,name:String,v1:Float,v2:Float )
DescriptionSet a shader variable name of a uniform vec2 type to 2 float values.

Function SetFloat3( material:TShader,name:String,v1:Float,v2:Float,v3:Float )
DescriptionSet a shader variable name of a uniform vec3 type to 3 float values.

Function SetFloat4( material:TShader,name:String,v1:Float,v2:Float,v3:Float,v4:Float )
DescriptionSet a shader variable name of a uniform vec4 type to 4 float values.

Function SetInteger( material:TShader,name:String,v1:Int )
DescriptionSet a shader variable name of a uniform int type to an integer value.

Function SetInteger2( material:TShader,name:String,v1:Int,v2:Int )
DescriptionSet a shader variable name of a uniform ivec2 type to 2 integer values.

Function SetInteger3( material:TShader,name:String,v1:Int,v2:Int,v3:Int )
DescriptionSet a shader variable name of a uniform ivec3 type to 3 integer values.

Function SetInteger4( material:TShader,name:String,v1:Int,v2:Int,v3:Int,v4:Int )
DescriptionSet a shader variable name of a uniform ivec4 type to 4 integer values.

Function SetShadowColor( R:Int,G:Int,B:Int,A:Int )
DescriptionSet color R/G/B in range 0..255 and A in range 0..1.

Function SetString:String( obj:Object,strPtr:Byte Ptr,strValue:String )
DescriptionSets a C string from a Blitz string.

Function ShadeEntity( ent:TEntity,material:TShader )
DescriptionApply shader to an entity.

Function ShadeMesh( mesh:TMesh,material:TShader )
DescriptionApply shader to a mesh.

Function ShaderFunction( material:TShader,EnableFunction(),DisableFunction() )
Descriptionundocumented.

Function ShaderMaterial( material:TShader,tex:TMaterial,name:String,index:Int=0 )
DescriptionSet a 3d texture for sampling.

Function ShaderTexture:TTexture( material:TShader,tex:TTexture,name:String,index:Int=0 )
DescriptionLoad a texture for 2D texture sampling.

Function ShadeSurface( surf:TSurface,material:TShader )
DescriptionApply shader to a surface.

Function SkinMesh( mesh:TMesh,surf_no_get:Int,vid:Int,bone1:Int,weight1:Float=1.0,bone2:Int=0,weight2:Float=0,bone3:Int=0,weight3:Float=0,bone4:Int=0,weight4:Float=0 )
DescriptionSet animated surface (vid is vertex index) for each of the bone no and weights arrays.
Informationbone no references the bones list in a mesh, weights is a normalizing value.

Function SpriteRenderMode( sprite:TSprite,Mode:Int )
DescriptionIf mode is 1 rendering is normal, 2 is batch sprites on a single surface, 3 is batch particles.

Function StencilAlpha( stencil:TStencil,a:Float )
DescriptionSet stencil alpha value.

Function StencilClsColor( stencil:TStencil,r:Float,g:Float,b:Float )
DescriptionSet stencil clear screen color in range 0..255.

Function StencilClsMode( stencil:TStencil,cls_color:Int,cls_zbuffer:Int )
DescriptionSet stencil clear screen modes.
InformationCls_color is true to use the color buffer, cls_zbuffer is true to use the depth buffer.

Function StencilMesh( stencil:TStencil,mesh:TMesh,Mode:Int=1 )
DescriptionSet mesh to be used as stencil.
InformationMode is stencil action for glStencilOp in range -2..2 where 1 is INCR (default), 2 is INCR for stencil shadow meshes and negative values are DECR.

Function StencilMode( stencil:TStencil,m:Int,o:Int=1 )
DescriptionSet stencil render modes.
InformationM is stencil action mode for glStencilOp in range -2..2 where 1 is INCR (default), 2 is INCR for stencil shadow meshes and negative values are DECR. O is comparison operator for glStencilFunc in range 0..3 which stands for one of NOTEQUAL, EQUAL, LEQUAL or GEQUAL.

Function StringPtr:String( inst:Byte Ptr )
DescriptionReturns string cast of byte pointer.

Function SurfsRendered:Int()
DescriptionNumber of surfaces currently being rendered.

Function TexToBuffer( tex:TTexture,buffer:Byte Ptr,frame:Int=0 )
DescriptionCopy texture to a pixmap buffer, buffer must be a byte ptr.

Function TextureAnIsotropic( tex:TTexture,f:Float )
DescriptionSet texture anisotropic factor, usually from 2-16.

Function TextureFlags( tex:TTexture,flags:Int )
DescriptionSet texture flags, see LoadTexture for values.

Function TextureGLTexEnvf( tex:TTexture,target:Int,pname:Int,param:Float )
DescriptionGL equivalent, param is a float, limited to 12 calls per texture, experimental.

Function TextureGLTexEnvi( tex:TTexture,target:Int,pname:Int,param:Int )
DescriptionGL equivalent, param is a const, limited to 12 calls per texture, experimental.

Function TextureLoader( texid:String,lf0:Int=0,fr1:Int=0,rt2:Int=0,bk3:Int=0,dn4:Int=0,up5:Int=0 )
DescriptionSet texture loaders to use (default is streamed), also sets cubemap faces or frames.
InformationSet texid to "bb" or "bmx" for Blitzmax streamed textures, use "cpp", "lib" or "open" for Openb3d library textures (only loads local files). As an extra feature you can define the cubemap face order with "faces",0,1,2,3,4,5 and cubemap anim texture frame order with "frames",0,1,2,3,4,5 (these are the default layouts).

Function TextureMultitex( tex:TTexture,f:Float )
DescriptionSet texture multitex factor, used in interpolate and custom TexBlend options.

Function TrisRendered:Int()
DescriptionNumber of triangles currently being rendered.

Function UpdateTexCoords( surf:TSurface )
DescriptionRecalculates the surface's uvw coord set 1 based on vertices.

Function UseEntity( material:TShader,name:String,ent:TEntity,mode:Int )
Descriptionundocumented.

Function UseFloat( material:TShader,name:String,v1:Float Var )
DescriptionBind a float variable to a shader variable name of a uniform float type.

Function UseFloat2( material:TShader,name:String,v1:Float Var,v2:Float Var )
DescriptionBind 2 float variables to a shader variable name of a uniform vec2 Type.

Function UseFloat3( material:TShader,name:String,v1:Float Var,v2:Float Var,v3:Float Var )
DescriptionBind 3 float variables to a shader variable name of a uniform vec3 type.

Function UseFloat4( material:TShader,name:String,v1:Float Var,v2:Float Var,v3:Float Var,v4:Float Var )
DescriptionBind 4 float variables to a shader variable name of a uniform vec4 type.

Function UseInteger( material:TShader,name:String,v1:Int Var )
DescriptionBind an integer variable to a shader variable name of a uniform int type.

Function UseInteger2( material:TShader,name:String,v1:Int Var,v2:Int Var )
DescriptionBind 2 integer variables to a shader variable name of a uniform ivec2 type.

Function UseInteger3( material:TShader,name:String,v1:Int Var,v2:Int Var,v3:Int Var )
DescriptionBind 3 integer variables to a shader variable name of a uniform ivec3 type.

Function UseInteger4( material:TShader,name:String,v1:Int Var,v2:Int Var,v3:Int Var,v4:Int Var )
DescriptionBind 4 integer variables to a shader variable name of a uniform ivec4 type.

Function UseMatrix( material:TShader,name:String,Mode:Int )
DescriptionSends matrix data to a shader variable name of a uniform mat4 type.

Function UseStencil( stencil:TStencil )
DescriptionStencil to use, set to Null to disable stencil.

Function UseSurface( material:TShader,name:String,surf:TSurface,vbo:Int )
DescriptionSends surface data to a shader variable name.
InformationVbo is in range 1..6 which selects what vertex buffer data to access, where 1 is vertex positions, 2/3 is tex coords 0/1, 4 is vertex normals, 5 is vertex color, 6 is triangles.

Function VertsRendered:Int()
DescriptionNumber of vertices currently being rendered.

Function VoxelSpriteMaterial( voxelspr:TVoxelSprite,mat:TMaterial )
DescriptionSet material for voxel sprite.

Types

Type TAction
DescriptionAction.

Type TAnimationKeys
DescriptionAnimationKeys data.

Type TBatchSprite Extends TSprite
DescriptionBatch sprite entity.

Type TBatchSpriteMesh Extends TMesh
DescriptionBatch sprite mesh entity.

Type TBlitz2D
DescriptionBlitz2D.

Type TBlob Extends TEntity
DescriptionBlob entity.

Type TBone Extends TEntity
DescriptionBone entity.

Type TBrush
DescriptionBrush.

Type TCamera Extends TEntity
DescriptionCamera entity.

Type TConstraint
DescriptionConstraint.

Type TEntity
DescriptionEntity.

Type TFluid Extends TMesh
DescriptionFluid mesh entity.

Type TGeosphere Extends TTerrain
DescriptionGeosphere terrain entity.

Type TGlobal3D
DescriptionGlobal.
InformationRenamed to fix conflict with BRL.Reflection.

Type THardwareInfo ' by klepto2
DescriptionHardware info.
InformationContains Function GetInfo() And DisplayInfo(LogFile:Int=False).

Type TLight Extends TEntity
DescriptionLight entity.

Type TMaterial Extends TTexture
DescriptionMaterial texture.

Type TMatrix
DescriptionMatrix functions.

Type TMesh Extends TEntity
DescriptionMesh entity.

Type TMeshLoader
DescriptionMesh loader.
Methods Summary
LoadAnimMesh Call animated mesh loader implementation.
LoadMesh Call mesh loader implementation.
Method LoadAnimMesh:TMesh(file:TStream, url:Object, parent:TEntity = Null) Abstract
DescriptionCall animated mesh loader implementation.
Method LoadMesh:TMesh(file:TStream, url:Object, parent:TEntity = Null) Abstract
DescriptionCall mesh loader implementation.

Type TOcTree Extends TTerrain
DescriptionOctree terrain entity.

Type TParticleBatch Extends TMesh
DescriptionParticle Batch mesh entity.

Type TParticleEmitter Extends TEntity
DescriptionParticle Emitter entity.

Type TPick
DescriptionPick.

Type TPivot Extends TEntity
DescriptionPivot entity.

Type TPostFX
DescriptionPost effects object.

Type TQuaternion
DescriptionQuaternion functions.

Type TRigidBody
DescriptionRigid Body.

Type TShader
DescriptionShader.

Type TShaderObject
DescriptionShader object.

Type TShadowObject
DescriptionShadow object.

Type TSprite Extends TMesh
DescriptionSprite mesh entity.

Type TStencil
DescriptionStencil.

Type TSurface
DescriptionSurface.

Type TTerrain Extends TEntity
DescriptionTerrain entity.

Type TTexture
DescriptionTexture.

Type TVector
DescriptionVector functions.
Methods Summary
Add Add a vector to another vector, returns a new vector.
Clear Clear a vectors values, returns nothing.
Copy Copy a vector, returns a new vector.
Cross Cross product of two vectors, returns a new vector.
Distance Distance between two vectors, returns a float.
Divide Divide a vector by a float, returns a new vector.
Divide2 Divide a vector by another vector, returns a new vector.
Dot Dot product (or squared length) of two vectors, returns a new vector.
Length Length (or magnitude) of a vector, returns a float.
Multiply Multiply a vector by a float, returns a new vector.
Multiply2 Multiply a vector by another vector, returns a new vector.
Negate Negate a vector, returns a new vector.
Normalize Normalize a vector, returns nothing.
Normalized Normalize a vector, returns a new vector.
Pitch Pitch (or x angle) in degrees of a vector, returns a float.
Subtract Subtract another vector from a vector, returns a new vector.
Yaw Yaw (or y angle) in degrees of a vector, returns a float.
Functions Summary
Create Create a new vector from three float values, returns a new vector.
Magnitude Magnitude (or length) of a vector from three float values, returns a float.
Method Add:TVector( vec2:TVector )
DescriptionAdd a vector to another vector, returns a new vector.
Informationnew_vec=vec.Add(vec2)
Method Clear()
DescriptionClear a vectors values, returns nothing.
Informationvec.Clear()
Method Copy:TVector()
DescriptionCopy a vector, returns a new vector.
Informationnew_vec=vec.Copy()
Method Cross:TVector( vec2:TVector )
DescriptionCross product of two vectors, returns a new vector.
Informationnew_vec=vec.Cross(vec2)
Method Distance:Float( vec2:TVector )
DescriptionDistance between two vectors, returns a float.
Informationfloat=vec.Distance(vec2)
Method Divide:TVector( scale:Float )
DescriptionDivide a vector by a float, returns a new vector.
Informationnew_vec=vec.Divide(scale)
Method Divide2:TVector( vec2:TVector )
DescriptionDivide a vector by another vector, returns a new vector.
Informationnew_vec=vec.Divide2(vec2)
Method Dot:Float( vec2:TVector )
DescriptionDot product (or squared length) of two vectors, returns a new vector.
Informationfloat=vec.Dot(vec2)
Method Length:Float()
DescriptionLength (or magnitude) of a vector, returns a float.
Informationfloat=vec.Length()
Method Multiply:TVector( scale:Float )
DescriptionMultiply a vector by a float, returns a new vector.
Informationnew_vec=vec.Multiply(scale)
Method Multiply2:TVector( vec2:TVector )
DescriptionMultiply a vector by another vector, returns a new vector.
Informationnew_vec=vec.Multiply2(vec2)
Method Negate:TVector()
DescriptionNegate a vector, returns a new vector.
Informationnew_vec=vec.Negate(vec2)
Method Normalize()
DescriptionNormalize a vector, returns nothing.
Informationvec.Normalize()
Method Normalized:TVector()
DescriptionNormalize a vector, returns a new vector.
Informationnew_vec=vec.Normalized()
Method Pitch:Float()
DescriptionPitch (or x angle) in degrees of a vector, returns a float.
Informationfloat=vec.Pitch()
Method Subtract:TVector( vec2:TVector )
DescriptionSubtract another vector from a vector, returns a new vector.
Informationnew_vec=vec.Subtract(vec2)
Method Yaw:Float()
DescriptionYaw (or y angle) in degrees of a vector, returns a float.
Informationfloat=vec.Yaw()
Function Create:TVector( x:Float,y:Float,z:Float )
DescriptionCreate a new vector from three float values, returns a new vector.
Informationnew_vec=TVector.Create(x,y,z)
Function Magnitude:Float( v0:Float,v1:Float,v2:Float )
DescriptionMagnitude (or length) of a vector from three float values, returns a float.
Informationfloat=TVector.Magnitude(x,y,z)

Type TVoxelSprite Extends TMesh
DescriptionVoxelsprite mesh entity.

Module Information

Version1.25
Licensezlib
CopyrightWrapper - 2014-2018 Mark Mcvittie, Bruce A Henderson
CopyrightLibrary - 2010-2018 Angelo Rosina