OGLFunctions.pb

Included Files:
API-FileHandle.pbi, glext.pbi, glu.pbi, glxext.pbi, OGL_Constants.pb, OpenGL.pbi, wglext.pbi
Included in:

Overview


Description

OGLFunctions by remi_meier (@gmx.ch) and Thorsten Will - "Mr.Vain of Secretly!" ©2006
All functions with an underscore (_) at the beginning of the name are only used internally!

The coordinate system looks like this (screen):
1024=y
|
|
|
|
0---------------1280=x
you can change the coordinate resolution with a call to OGLCoordinatesChange()

It's the same for images, its coordinates are measured from the lower left corner of the image
to the lower left corner of the screen.

Texture coordinates measured the same, except they are in the range of 0 to 1. With any other
value, you can multiply the texture as you want ;)

The z component is used for layers, the higher the value, the higher the layer. The highest
layer will be drawn above all the others! Between OGLStart-/StopBlending(), layers are inactive,
that means everything will be drawn like the order of function calls to draw! z is normally 0,
it can be between -2048 and 2048


Nearly every function has standard parameters, without using them, normally the standard behaviour
will be chosen!

Top, Back


Constants
#e
#WGL_FONT_POLYGONS

Top, Back


Structures and Interfaces
DIMGHEADER
OGLIMAGE
OGLPARTICLE
OGLPARTICLEEMITTER
OGLPoint
RAWHEADER
TGAHEADER

Top, Back


Global Variables
*_OGLRenderToImage

Top, Back


Functions and Macros
HIWORD(Value)
LOWORD(Value)
NEAR.l(f1.f, f2.f)
OGLBlendingStart(Scr.l = #GL_SRC_ALPHA, Dest.l = #GL_ONE_MINUS_SRC_ALPHA)
Starts blending of the alpha channel.
OGLBlendingStop()
Deactivates blending, enables layer support again
OGLBlurAccum(Value.f)
SLOW!
OGLBlurStart(Value.f = 1.0)
SLOW!
OGLBlurStop(Value.f = 1.0)
SLOW!
OGLBufferImageCreate.l(Width.l, Height.l)
Reserves the memory for the image
OGLBufferImageFree(*bImg._OGLBUFFERIMAGE)
Frees the memory of a buffer image
OGLBufferImagePlot.l(*bImg._OGLBUFFERIMAGE, x.l, y.l, r.l = 255, g.l = 255, b.l = 255, a.l = 255)
Sets the color of a point in the buffer image
OGLBufferImageToImage.l(*bImg._OGLBUFFERIMAGE)
Converts a buffer image to an ogl image for image functions
OGLCoordinatesChange(Width.f, Height.f)
Changes the x and y range of the coordinates shown in the screen
OGLCoordinatesToOGL(x.d, y.d, *ogl.OGLPoint)
Translates x and y form normal windows coordinates to ogl ones (returned in *ogl)
OGLCoordinatesToWindow(x.d, y.d, *win.OGLPoint)
Translates x and y ogl coordinates to normal windows ones (returned in *win)
OGLFontDraw(x.f, y.f, Text.s, r.f, g.f, b.f, a.f = 1.0, z.f = 0.0)
Draws text with the current Font
OGLFontLoad(Name.s, Height.l = 10, Bold.l = 0, Italic.l = 0, Underline.l = 0, StrikeOut.l = 0)
Loads a font for OGLFontDraw, needs time, so don't use it in a loop! (multiple fonts loaded at the same time not possible for now.
OGLImageCatchDIMG.l(*mem, ar.l, ag.l, ab.l)
Catch a DIMG directly from Memory (IncludeBinary)
OGLImageCollision(*Image1.OGLIMAGE, x1.l, y1.l, *Image2.OGLIMAGE, x2.l, y2.l, z1.l = 0, z2.l = 0)
Box collision with layer and zoom support.
OGLImageCreateAlpha.l(Type.l, Size.l, param.f = 0)
creates an image with only alpha channel filled up with formulas
OGLImageDataCreate.l(*Image.OGLIMAGE, Channels.l, Format.l)
Creates an ogl image.
OGLImageDraw(*Image.OGLIMAGE, x.f, y.f, z.f = 0.0)
Draws the Image
OGLImageFree(*Image.OGLIMAGE)
Frees the memory used by *Image (also *Image\mem if not #NULL)
OGLImageFromWindow.l(x.l, y.l, Width.l, Height.l)
creates an image out of a part of the screen.
OGLImageGetAlpha.f(*Image.OGLIMAGE)
OGLImageGetAlphaTest.l(*Image.OGLIMAGE)
OGLImageGetAngle.f(*Image.OGLIMAGE)
OGLImageGetColorB.f(*Image.OGLIMAGE)
OGLImageGetColorG.f(*Image.OGLIMAGE)
OGLImageGetColorR.f(*Image.OGLIMAGE)
OGLImageGetGLTexture.l(*Image.OGLIMAGE)
OGLImageGetHeight.l(*Image.OGLIMAGE)
OGLImageGetWidth.l(*Image.OGLIMAGE)
OGLImageGetZoomX.f(*Image.OGLIMAGE)
OGLImageGetZoomY.f(*Image.OGLIMAGE)
OGLImageLoadDIMG.l(File.s, ar.l, ag.l, ab.l)
Loads a DIMG from a file.
OGLImageLoadRaw.l(File.s)
Loads a RAWImage and returns *Image
OGLImageLoadTGA.l(File.s)
Loads a TGAImage and returns *Image
OGLImageQuality(*Image.OGLIMAGE, Quality.l = #True)
If zooming shall be raw or interpolated
OGLImageRenderToStart.l(*Image.OGLIMAGE)
Starts rendering on an image.
OGLImageRenderToStop.l()
Stops rendering to the image.
OGLImageSetAlpha(*Image.OGLIMAGE, Alpha.f = 1.0)
Sets alpha channel for whole Image -> Transparency when blending
OGLImageSetAlphaTest(*Image.OGLIMAGE, Flag.l)
Enables/disables alpha test für OGLImageDraw()
OGLImageSetAngle(*Image.OGLIMAGE, Angle.f = 0.0)
Sets the rotation angle for the image
OGLImageSetClip(*Image.OGLIMAGE, x.f = 0, y.f = 0, Width.f = 1, Height.f = 1)
To draw only the area defined by x,y,width,height of the texture.
OGLImageSetColor(*Image.OGLIMAGE, r.f = 1, g.f = 1, b.f = 1)
Sets the overall color of the image, you can set some channels to 0 when you dont want to see for example the red channel.
OGLImageSetZoom(*Image.OGLIMAGE, ZoomX.f = 1.0, ZoomY.f = 1.0)
Set zoom values for the Image, the values shouldn't be negative
OGLParticleEmitterCreate.l(ParticleCount.l, CFunc.OGLColorFunc)
Creates a new ParticleEmitter.
OGLParticleEmitterDraw(*pEmit.OGLPARTICLEEMITTER)
Draws all particles of the emitter
OGLParticleEmitterFree(*pEmit.OGLPARTICLEEMITTER)
Frees Memory
OGLParticleEmitterSetData(*pEmit.OGLPARTICLEEMITTER, x.f, y.f, Mode.l, SpeedMin.f, SpeedMax.f, Size.f, Range.f, Gravity.f, TtlMin.l, TtlMax.l, Direction.f, Probability.f)
Sets all parameters at once.
OGLParticleEmitterSetDirection(*pEmit.OGLPARTICLEEMITTER, a.f)
Sets main direction of the emitter.
OGLParticleEmitterSetGravity(*pEmit.OGLPARTICLEEMITTER, Gravity.f)
Sets the acceleration in y-direction.
OGLParticleEmitterSetMode(*pEmit.OGLPARTICLEEMITTER, Flag.l)
Mode: #True means that particles start with a size of 0 and grow to the size you set before.
OGLParticleEmitterSetPos(*pEmit.OGLPARTICLEEMITTER, x.f, y.f)
Sets the position of the emitter.
OGLParticleEmitterSetProbability(*pEmit.OGLPARTICLEEMITTER, Prob.f)
Sets the probability (0.
OGLParticleEmitterSetRange(*pEmit.OGLPARTICLEEMITTER, a.f)
Sets the spreading range.
OGLParticleEmitterSetSize(*pEmit.OGLPARTICLEEMITTER, Size.f)
Sets the start/end size of the particles (depending on Mode).
OGLParticleEmitterSetSpeed(*pEmit.OGLPARTICLEEMITTER, SpeedMax.f, SpeedMin.f)
Speed means the starting speed of the particles -> this is also the range of how far particles can be spread.
OGLParticleEmitterSetTTL(*pEmit.OGLPARTICLEEMITTER, TtlMin.l, TtlMax.l)
Sets TimeToLive for the particles.
OGLParticleEmitterUpdate(*pEmit.OGLPARTICLEEMITTER)
Updates position of particles and create new ones
OGLRect(x1.f, y1.f, x2.f, y2.f, r.f, g.f, b.f, a.f = 1.0, z.f = 0.0)
Draws an simple rect (including glBegin_() and glEnd_())
OGLScreenClear(r.f, g.f, b.f, a.f = 0.0)
Clears the screen and resets the matrix.
OGLSpeech(Text.s)
Speaks a text!
OGLStart.l(InitFunc.DrawingCallback, DrwFunc.DrawingCallback, Width.l, Height.l, Depth.l, Fullscreen.l, Title.s)
Start OGL-Scene
OGLSwapBuffers()
Exchanges front and backbuffer -> makes the whole scene visible
OGLTimerCreate.l(LoopTime.l)
creates a loop timer to simply time some looping movements
OGLTimerFree(*timer._OGLLOOPTIMER)
frees a timer
OGLTimerGetTime.f(*timer._OGLLOOPTIMER)
gets the current loop time (between 0.
OGLTimerPause(*timer._OGLLOOPTIMER, Pause.l)
stops the timer in the current state -> time will freeze
OGLTimerReset(*timer._OGLLOOPTIMER)
resets the loop state to start (time = 0.
OGLVertex(x.f, y.f, r.f, g.f, b.f, a.f = 1.0, z.f = 0.0)
Sets a vertex inside glBegin_() and glEnd_()
TODEG(Value)
TORAD(Value)

Top, Back


DIMGHEADER

Elements:

CountOfColors.c
DataPos.w
DataSize.l
Encoded.b
Height.w
id.l
Width.w

Top, Back


OGLIMAGE

Elements:

*mem
Alpha.f
Angle.f
b.f
CallList.l
cHeight.f
cWidth.f
cx.f
cy.f
g.f
Height.l
r.f
TexID.l
UseAlphaTest.l
Width.l
ZoomX.f
ZoomY.f

Top, Back


OGLPARTICLE

Elements:

ca.f
cb.f
cg.f
cr.f
Size.f
StartX.f
StartY.f
sTime.l
Ttl.l
vx.f
vy.f
x.f
y.f

Top, Back


OGLPARTICLEEMITTER

Elements:

*Particles
CFunc.OGLColorFunc
Direction.f
Gravity.f
Image.l
ParticleCount.l
Probability.f
Range.f
Size.f
Small2Big.l
SpeedMax.f
SpeedMin.f
StartX.f
StartY.f
TtlMax.l
TtlMin.l

Top, Back


OGLPoint

Elements:

x.d
y.d
z.d

Top, Back


RAWHEADER

Elements:

DataPos.l
Height.l
id.l
Width.l

Top, Back


TGAHEADER

Elements:

CMS.b[5]
CMT.b
Depth.b
Height.w
id.b
IDB.b
ITC.b
Width.w
x.w
y.w

Top, Back


HIWORD(Value)

Parameters:

Value

Top, Back


LOWORD(Value)

Parameters:

Value

Top, Back


NEAR.l(f1.f, f2.f)

Parameters:

f1
f2

Top, Back


OGLBlendingStart(Scr.l = #GL_SRC_ALPHA, Dest.l = #GL_ONE_MINUS_SRC_ALPHA)

Starts blending of the alpha channel.
If you want to have transparency with alpha channel use OGLStartBlending() with standardparameters.
Layer support is disabled while using blending!

Parameters:

Dest
Specifies how the red, green, blue, and alpha destination-blending factors are computed. Eight symbolic constants are accepted:
#GL_ZERO, #GL_ONE, #GL_SRC_COLOR, #GL_ONE_MINUS_SRC_COLOR, #GL_SRC_ALPHA, #GL_ONE_MINUS_SRC_ALPHA, #GL_DST_ALPHA, And #GL_ONE_MINUS_DST_ALPHA.
Scr
Specifies how the Red, Green, Blue, And Alpha source-blending factors are computed. Nine symbolic constants are accepted:
#GL_ZERO, #GL_ONE, #GL_DST_COLOR, #GL_ONE_MINUS_DST_COLOR, #GL_SRC_ALPHA, #GL_ONE_MINUS_SRC_ALPHA, #GL_DST_ALPHA, #GL_ONE_MINUS_DST_ALPHA, And #GL_SRC_ALPHA_SATURATE.

Top, Back


OGLBlendingStop()

Deactivates blending, enables layer support again

Top, Back


OGLBlurAccum(Value.f)

SLOW!

Parameters:

Value

Top, Back


OGLBlurStart(Value.f = 1.0)

SLOW!

Parameters:

Value

Top, Back


OGLBlurStop(Value.f = 1.0)

SLOW!

Parameters:

Value

Top, Back


OGLBufferImageCreate.l(Width.l, Height.l)

Reserves the memory for the image
returns an ID

Parameters:

Height
of the Image
Width
of the image

Top, Back


OGLBufferImageFree(*bImg._OGLBUFFERIMAGE)

Frees the memory of a buffer image

Parameters:

*bImg

Top, Back


OGLBufferImagePlot.l(*bImg._OGLBUFFERIMAGE, x.l, y.l, r.l = 255, g.l = 255, b.l = 255, a.l = 255)

Sets the color of a point in the buffer image

Parameters:

*bImg
a
b
g
r
x
y

Top, Back


OGLBufferImageToImage.l(*bImg._OGLBUFFERIMAGE)

Converts a buffer image to an ogl image for image functions
You can free the buffer image afterwards
returns the *Image

Parameters:

*bImg

Top, Back


OGLCoordinatesChange(Width.f, Height.f)

Changes the x and y range of the coordinates shown in the screen
this does not affect the size of the window!

Parameters:

Height
Width

Top, Back


OGLCoordinatesToOGL(x.d, y.d, *ogl.OGLPoint)

Translates x and y form normal windows coordinates to ogl ones (returned in *ogl)

Parameters:

*ogl
x
y

Top, Back


OGLCoordinatesToWindow(x.d, y.d, *win.OGLPoint)

Translates x and y ogl coordinates to normal windows ones (returned in *win)

Parameters:

*win
x
y

Top, Back


OGLFontDraw(x.f, y.f, Text.s, r.f, g.f, b.f, a.f = 1.0, z.f = 0.0)

Draws text with the current Font
x, y: Position
Text: text to draw
r,g,b,a: Color and alpha
z: Layer

Parameters:

a
b
g
r
Text
x
y
z

Top, Back


OGLFontLoad(Name.s, Height.l = 10, Bold.l = 0, Italic.l = 0, Underline.l = 0, StrikeOut.l = 0)

Loads a font for OGLFontDraw, needs time, so don't use it in a loop! (multiple fonts loaded at the same time not possible for now... will be implemented if you ask very kindly ;)

Parameters:

Bold
1/0
Height
Height
Italic
1/0
Name
like "Arial"
StrikeOut
1/0
Underline
1/0

Top, Back


OGLImageCatchDIMG.l(*mem, ar.l, ag.l, ab.l)

Catch a DIMG directly from Memory (IncludeBinary)
Parameters are the same as OGLImageLoadDIMG() File replaced by *mem, the pointer to the imagedata
AlphaTest enabled as standard

Parameters:

*mem
ab
ag
ar

Top, Back


OGLImageCollision(*Image1.OGLIMAGE, x1.l, y1.l, *Image2.OGLIMAGE, x2.l, y2.l, z1.l = 0, z2.l = 0)

Box collision with layer and zoom support. It only works with integer coordinates!

Parameters:

*Image1
first image
*Image2
second image
x1
first Image Position
x2
second Image Position
y1
first Image Position
y2
second Image Position
z1
layer of frist image
z2
layer of second image

Top, Back


OGLImageCreateAlpha.l(Type.l, Size.l, param.f = 0)

creates an image with only alpha channel filled up with formulas

Parameters:

param
Parameter for different types
Size
Width And Height of the Image, 1-256
Type
0 ... 9

Top, Back


OGLImageDataCreate.l(*Image.OGLIMAGE, Channels.l, Format.l)

Creates an ogl image. Information is given through *Image, Channels and Format, when it returns not #False, you can use *Image as the ImageIdentifier for other OGLImage**() functions
Channels: number of color channels, ImageDepth / 4
Format is one of these constants: #GL_COLOR_INDEX, #GL_RED, #GL_GREEN, #GL_BLUE, #GL_ALPHA, #GL_RGB, #GL_RGBA, #GL_BGR_EXT, #GL_BGRA_EXT, #GL_LUMINANCE, or #GL_LUMINANCE_ALPHA.
You can now free *Index\mem and you must set *Index\mem = 0 when freeing

Parameters:

*Image
Channels
Format

Top, Back


OGLImageDraw(*Image.OGLIMAGE, x.f, y.f, z.f = 0.0)

Draws the Image
x,y: Position of the lower left corner
z: layer, if higher it's in front of all things with a lower 'z'. Can't be used while blending

Parameters:

*Image
x
y
z

Top, Back


OGLImageFree(*Image.OGLIMAGE)

Frees the memory used by *Image (also *Image\mem if not #NULL)

Parameters:

*Image

Top, Back


OGLImageFromWindow.l(x.l, y.l, Width.l, Height.l)

creates an image out of a part of the screen. All coordinates are measured in window coordinates, not OpenGL ones. Use OGLCoordinatesToWindow() to calculate them.

Parameters:

Height
Width
x
y

Top, Back


OGLImageGetAlpha.f(*Image.OGLIMAGE)

Parameters:

*Image

Top, Back


OGLImageGetAlphaTest.l(*Image.OGLIMAGE)

Parameters:

*Image

Top, Back


OGLImageGetAngle.f(*Image.OGLIMAGE)

Parameters:

*Image

Top, Back


OGLImageGetColorB.f(*Image.OGLIMAGE)

Parameters:

*Image

Top, Back


OGLImageGetColorG.f(*Image.OGLIMAGE)

Parameters:

*Image

Top, Back


OGLImageGetColorR.f(*Image.OGLIMAGE)

Parameters:

*Image

Top, Back


OGLImageGetGLTexture.l(*Image.OGLIMAGE)

Parameters:

*Image

Top, Back


OGLImageGetHeight.l(*Image.OGLIMAGE)

Parameters:

*Image

Top, Back


OGLImageGetWidth.l(*Image.OGLIMAGE)

Parameters:

*Image

Top, Back


OGLImageGetZoomX.f(*Image.OGLIMAGE)

Parameters:

*Image

Top, Back


OGLImageGetZoomY.f(*Image.OGLIMAGE)

Parameters:

*Image

Top, Back


OGLImageLoadDIMG.l(File.s, ar.l, ag.l, ab.l)

Loads a DIMG from a file.
ar, ag, ab: Transparent color, for this color, the alpha channel will be 0.0 (transparent). Each of these parameters can be from 0 to 255
AlphaTest enabled as standard

Parameters:

ab
ag
ar
File

Top, Back


OGLImageLoadRaw.l(File.s)

Loads a RAWImage and returns *Image
Raw is a 32bit format

Parameters:

File

Top, Back


OGLImageLoadTGA.l(File.s)

Loads a TGAImage and returns *Image
Can only load 32bit uncompressed TGA-Files (incl. alpha channel)!

Parameters:

File

Top, Back


OGLImageQuality(*Image.OGLIMAGE, Quality.l = #True)

If zooming shall be raw or interpolated
Quality is always #True after a Load or Catch Image!

Parameters:

*Image
Quality

Top, Back


OGLImageRenderToStart.l(*Image.OGLIMAGE)

Starts rendering on an image. Like that, the screen will be transformed and shrank to the image. The coordinates system will be the same as for the screen, so if you want to fill out the image, use the same coordinates as for filling the screen.
The image dimensions must be of a size 2^n! You can stretch it to normal dimensions later with OGLImageSetZoom().
Returns 0 when failed

Parameters:

*Image

Top, Back


OGLImageRenderToStop.l()

Stops rendering to the image. Quality for this image will be raw (must).

Top, Back


OGLImageSetAlpha(*Image.OGLIMAGE, Alpha.f = 1.0)

Sets alpha channel for whole Image -> Transparency when blending
While using alpha test, alpha is always set to 1 (doesn't make sens otherwise, does it?)

Parameters:

*Image
Alpha
0 (not visible) to 1 (fully visible)

Top, Back


OGLImageSetAlphaTest(*Image.OGLIMAGE, Flag.l)

Enables/disables alpha test für OGLImageDraw()
Flag: #True if enable, #False if disable
When enabled, OGLImageDraw() draws only areas with an alpha value higher than 0.01 (in a range of 0.0 to 1.0)

Parameters:

*Image
Flag

Top, Back


OGLImageSetAngle(*Image.OGLIMAGE, Angle.f = 0.0)

Sets the rotation angle for the image

Parameters:

*Image
Angle
Angle in degrees

Top, Back


OGLImageSetClip(*Image.OGLIMAGE, x.f = 0, y.f = 0, Width.f = 1, Height.f = 1)

To draw only the area defined by x,y,width,height of the texture. Texture coordinates go from 0.0 to 1.0, any other value will have funny effects ;)

Parameters:

*Image
Height
Width
x
y

Top, Back


OGLImageSetColor(*Image.OGLIMAGE, r.f = 1, g.f = 1, b.f = 1)

Sets the overall color of the image, you can set some channels to 0 when you dont want to see for example the red channel.
r, g, b: Colorvalues

Parameters:

*Image
b
g
r

Top, Back


OGLImageSetZoom(*Image.OGLIMAGE, ZoomX.f = 1.0, ZoomY.f = 1.0)

Set zoom values for the Image, the values shouldn't be negative

Parameters:

*Image
ZoomX
Width-Scale, not zoom = 1
ZoomY
Height-Scale, not zoom = 1

Top, Back


OGLParticleEmitterCreate.l(ParticleCount.l, CFunc.OGLColorFunc)

Creates a new ParticleEmitter.
Returnvalue: pEmit (Identifier)

Parameters:

CFunc
Callback function for choosing colors when creatingnew particles. Prototype OGLColorFunc(*Particle.OGLPARTICLE)
ParticleCount
Overall count of particles.

Top, Back


OGLParticleEmitterDraw(*pEmit.OGLPARTICLEEMITTER)

Draws all particles of the emitter
Best viewed within Blending-section

Parameters:

*pEmit

Top, Back


OGLParticleEmitterFree(*pEmit.OGLPARTICLEEMITTER)

Frees Memory

Parameters:

*pEmit

Top, Back


OGLParticleEmitterSetData(*pEmit.OGLPARTICLEEMITTER, x.f, y.f, Mode.l, SpeedMin.f, SpeedMax.f, Size.f, Range.f, Gravity.f, TtlMin.l, TtlMax.l, Direction.f, Probability.f)

Sets all parameters at once. For each parameter see the appropriate functions!

Parameters:

*pEmit
Direction
Gravity
Mode
Probability
Range
Size
SpeedMax
SpeedMin
TtlMax
TtlMin
x
y

Top, Back


OGLParticleEmitterSetDirection(*pEmit.OGLPARTICLEEMITTER, a.f)

Sets main direction of the emitter.

Parameters:

*pEmit
a
Angle in RADIAN

Top, Back


OGLParticleEmitterSetGravity(*pEmit.OGLPARTICLEEMITTER, Gravity.f)

Sets the acceleration in y-direction. Positive means accelerated in positive y-direction.

Parameters:

*pEmit
Gravity
Acceleration in y-direction.

Top, Back


OGLParticleEmitterSetMode(*pEmit.OGLPARTICLEEMITTER, Flag.l)

Mode: #True means that particles start with a size of 0 and grow to the size you set before.
Mode: #False (standard) means particles start with the size specified and get smaller with the time

Parameters:

*pEmit
Flag

Top, Back


OGLParticleEmitterSetPos(*pEmit.OGLPARTICLEEMITTER, x.f, y.f)

Sets the position of the emitter.
x, y: Coordinates of starting point.

Parameters:

*pEmit
x
y

Top, Back


OGLParticleEmitterSetProbability(*pEmit.OGLPARTICLEEMITTER, Prob.f)

Sets the probability (0..1) that a particle is shot when it isn't used anymore

Parameters:

*pEmit
Prob

Top, Back


OGLParticleEmitterSetRange(*pEmit.OGLPARTICLEEMITTER, a.f)

Sets the spreading range. This is the tolerance angle (in RADIAN) in which the particles are thrown at their creation time. This angle is in the direction of a.

Parameters:

*pEmit
a
Angle in RADIAN

Top, Back


OGLParticleEmitterSetSize(*pEmit.OGLPARTICLEEMITTER, Size.f)

Sets the start/end size of the particles (depending on Mode). It's a zoom value between 0 and 1 for a texture of the size 256x256!

Parameters:

*pEmit
Size
Zoom of 256-Texture 0..1

Top, Back


OGLParticleEmitterSetSpeed(*pEmit.OGLPARTICLEEMITTER, SpeedMax.f, SpeedMin.f)

Speed means the starting speed of the particles -> this is also the range of how far particles can be spread. For speed of particles, you have to adjust Speed AND TTL!
Speed will be chosen between those Max and Min speed

Parameters:

*pEmit
SpeedMax
Max-Speed
SpeedMin
Min-Speed

Top, Back


OGLParticleEmitterSetTTL(*pEmit.OGLPARTICLEEMITTER, TtlMin.l, TtlMax.l)

Sets TimeToLive for the particles. Together with Speed you can adjust the speed and range for the emitter. TTL is in ms (milliseconds)

Parameters:

*pEmit
TtlMax
Maximal TTL
TtlMin
Minimal TTL

Top, Back


OGLParticleEmitterUpdate(*pEmit.OGLPARTICLEEMITTER)

Updates position of particles and create new ones
Use in each loop to update particles!

Parameters:

*pEmit

Top, Back


OGLRect(x1.f, y1.f, x2.f, y2.f, r.f, g.f, b.f, a.f = 1.0, z.f = 0.0)

Draws an simple rect (including glBegin_() and glEnd_())
x1, y1: first corner
x2, y2: second corner
r,g,b,a,z: see OGLVertex(), here for the whole rect!

Parameters:

a
b
g
r
x1
x2
y1
y2
z

Top, Back


OGLScreenClear(r.f, g.f, b.f, a.f = 0.0)

Clears the screen and resets the matrix. r, g, b, a: See OGLVertex()

Parameters:

a
b
g
r

Top, Back


OGLSpeech(Text.s)

Speaks a text!

Parameters:

Text

Top, Back


OGLStart.l(InitFunc.DrawingCallback, DrwFunc.DrawingCallback, Width.l, Height.l, Depth.l, Fullscreen.l, Title.s)

Start OGL-Scene

Parameters:

Depth
... of the window or screen
DrwFunc
Pointer to a function called in the event loop to draw the scene onto the window. Can be #NULL.
When a somebody tries to close the window, the hwnd.l-parameter is #NULL when called. If you don't want to finish the program then, you can return #True to prevent from ending. Else the program just quits after returning from the callback function.
Fullscreen
#True when fullscreen mode, #False when windowed mode
Height
... of the window or screen
InitFunc
Pointer to a function called once after creating the window. The function must be a 'DrawingCallback' function (see Prototype), can be #Null
Title
Title of the window
Width
... of the window or screen

Top, Back


OGLSwapBuffers()

Exchanges front and backbuffer -> makes the whole scene visible

Top, Back


OGLTimerCreate.l(LoopTime.l)

creates a loop timer to simply time some looping movements
returns a timer object .LoopTime: How long the timer shall need to count from 0 to 1

Parameters:

LoopTime

Top, Back


OGLTimerFree(*timer._OGLLOOPTIMER)

frees a timer

Parameters:

*timer

Top, Back


OGLTimerGetTime.f(*timer._OGLLOOPTIMER)

gets the current loop time (between 0.0 and 1.0)

Parameters:

*timer

Top, Back


OGLTimerPause(*timer._OGLLOOPTIMER, Pause.l)

stops the timer in the current state -> time will freeze

Parameters:

*timer
Pause
#True to stop, #False to continue

Top, Back


OGLTimerReset(*timer._OGLLOOPTIMER)

resets the loop state to start (time = 0.0)

Parameters:

*timer

Top, Back


OGLVertex(x.f, y.f, r.f, g.f, b.f, a.f = 1.0, z.f = 0.0)

Sets a vertex inside glBegin_() and glEnd_()

Parameters:

a
alpha value
b
Blue [0.0, 1.0]
g
Green [0.0, 1.0]
r
Red [0.0, 1.0]
x
Position
y
Position
z
layer, 0 is standard, higher is above standard layer, lower is behind standard layer

Top, Back


TODEG(Value)

Parameters:

Value

Top, Back


TORAD(Value)

Parameters:

Value

Top, Back