GLBasic User Manual

Main sections

Tools

Tools




Keycodes


This is a simple program that displays the corresponding keycodes (used with the KEY() command) when you hit a key.

Font Creator


This tool creates bitmap graphics from a TrueType font which can be used with GLBasic's LOADFONT command. GLBasic uses this method to display graphics efficiently and not waste resources in the OpenGL/graphics window.

Shoebox


A program to compress a folder into a shoebox archive (see SETSHOEBOX command)

Calculator


A handy calculator with scientific functions.
Basic maths:
+, -, *, /, ^, ==
Functions:
abs, floor, ceil, mod(n,m)
degrad(deg), raddeg(rad)
sin(rad), cos, tan
acos, asin, atan, atan2(dy,dx)
ln, log, exp(n,e), pow(n,e), sqrt
int - integer (cutoff)
asl(n,s), asr(n,s) - bit shift
set($varname, value) - Assign variable
if(cond,true,false) - calculate conditionals

Folder To Zip


zip a folder for backup and sharing your work.

Setup Pack&Go


A very simple tool that creates a setup utility for your program. It also includes an uninstaller, but only for Windows.

3D convert


Use this tool to convert several 3D formats to GLBasic's native .ddd format.

Open folder


Opens an explorer for the current project's folder. This is a very convenient tool.

Export File as Library


With this tool you can convert the current source code file (.gbas) to a library that is compressed and encrypted. In this way you can provide the functionality of a source code file without having to share the source code itself. This is also useful if you don't want to confuse people looking at your code due to complex use of INLINE calls.
The file extension is ".gbal" for a GLBasic library.

Create Help


With the context menu item "Tools/Create Help" you can create a html help file from your current .gbas file.
You really should attach a help file to a library to help users take advantage of its functionality.

These comments are used for the help:

//! : Simple help text (primary language)
//? : Help text in alternative language
// \param pname : description | description, alternative language
// \\return : What is returned? | return value, alternative language

Connected '//!' and '\param' blocks will be assigned to the next function or subroutine to follow. If you split a block with a simple comment (//), this text block will be put as a separate text block.

Example:
//! GLBasic's DoctorGBAS - Test
//! ---------------------------
//! Some English text
//? Ein deutscher Text

//! Makes a + b
//? Macht a + b
// \param a - Number 1 | a - Zahl 1
// \param b - Number 2 | b - Zahl 2
// \return a plus b | a plus b
@FUNCTION Plus: a, b
    RETURN a + b
ENDFUNCTION

//! Thanks a lot
//? Vielen Dank


Macros


From version 7 onwards, GLBasic features macro files integrated into the IDE. These macros can be used to change parts of your project.
GLBasic sets up some environment variables that may be useful to use as part of your macros (here at the example of the SEUCK project on my PC).
%GLB_PROJ_NAME%=SEUCK  
%GLB_PROJ_PATH%=C:\Users\gf\Documents\GLBasic\SEUCK
%GLB_MAIN_PATH%=c:\Program Files\GLBasic
%CYG_GLB_PROJ_PATH%=/cygdrive/C/Users/gf/Documents/GLBasic/SEUCK
%CYG_GLB_MAIN_PATH%=/cygdrive/c/Users/gf/Documents/SourceCode/frisch/fun/GLBasic


If you edit the macros, the first line must start with "::" which introduces a batch comment. Everything after that comment is used as a tool tip for the macro toolbar button.

See also...