Initialization

GetGLProcAddressCast(X)

Sub VoxInit (GlExtFetch As Function Stdcall(ByRef Proc As Const ZString) As Any Ptr, Flags As UInteger = 0)
Initializes the library by loading OpenGL functions and setting up a default Voxel Screen. GlExtFetch is the address of a function that will be called to retrieve the address of OpenGL functions. GetGLProcAddressCast is a macro used to suppress a compiler warning generated when passing the GlExtFetch function pointer. Flags may be omitted or one of the following:
VOXEL_SCREEN32
VOXEL_SCREEN64
VOXEL_SCREEN128
VOXEL_SCREEN256
VOXEL_SCREEN512
If flags is VOXEL_SCREEN.Z then a default Z x Z x Z screen will be created. The screen size can also be set by a later function.


Sub VoxScreenRes (Size As Vec3I, BackColor As UInteger = 0)
Sub VoxScreenRes (SizeX As Integer, SizeY As Integer, SizeZ As Integer, BackColor As UInteger = 0)
Sets up a Voxel Screen of dimensions SizeX x SizeY x SizeZ. If BackColor is specified it will set the default background color. The background color can also be changed using the OpenGL function glClearColor.

Volume Creation

Function VoxNewVolume (T As VoxVolumeType = 0) As Vox_Volume
Function VoxNewVolume (Size As Vec3I, T As VoxVolumeType = 0) As Vox_Volume
Function VoxNewVolume (SizeX As Integer, SizeY As Integer, SizeZ As Integer, T As VoxVolumeType = 0) As Vox_Volume
Creates a new volume of dimensions SizeX x SizeY x SizeZ, and returns a reference to it. T specifies the type of the volume which is Volume_Dynamic if T is omitted.


Sub VoxSizeVolume (Size As Vec3I)
Sub VoxSizeVolume (SizeX As Integer, SizeY As Integer, SizeZ As Integer)
Changes the size of the current volume to the new dimensions SizeX x SizeY x SizeZ erasing the contents of the volume in the process.


Function VoxGetVolumeSize (V As Vox_Volume = -1) As Vec3I
Returns the size of the volume referenced by V, or the current volume if no valid volume is specified.