NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
glCircleDemo.nxc

This is an example of how to use the glInit, glBox, glSetAngleX, glBeginRender, glAddToAngleY, glAddToAngleX glCallObject, glSet, and glFinishRender functions.

/*------------------------------------------------------------------------------
; File : glBoxDemo.nbc
; Description : A program demonstrating a 3D box with circles on the edges...
; Programmed by : Arno van der Vegt, avandervegt@home.nl
;-----------------------------------------------------------------------------*/
task main()
{
// Initialize the 3D engine...
glInit();
// Create a box, this is the first object which will be object id 0...
glBox(GL_POLYGON, 30, 30, 30);
// Create a box, this is the second object which will be object id 1...
glBox(GL_CIRCLE, 30, 30, 30);
// Set the main view x-angle...
while (true)
{
// Rotate the main view....
// Setup for rendering...
// Call the object with id 0...
// Call the object with id 1...
// Finish, clear the screen, rotate and render the called objects...
}
}