Graphical matters

A couple of extra words towards people that are interested working with the graphical tool-set of XBasic:
I'm not really an advanced graphics programmer so anyone who has nice a piece of well commented code is welcome to send it to me, I'll put it online.


Though Yahoo Groups has a couple of great examples, it might be interesting to highlight them here...

The first example is coded by Achilles Mina
The second is done by Tom Stout
The third example is done by me
The last example is converted from QB but I wasn't able yet to locate the dude who did it... I'm working on this!

Let's start with the first simple example:

Dog.X

"Dog" demonstrates a simple use of the Xgr library in combination with the TrueType fontsets.
(click the picture to download the example source)

 


The next example demonstrates a field of 2D-balls that bounces against the window-borders or each other, a Random Number Generator assembled by Vic Drastic is used to randomly generate balls and positions.

Though the examples does not seem perfect yet, it's fun to play with it's code.
(click the picture to download the example source) 

Then we have the third example which uses the GUI designer mode to work with a bitmap image.
You can select the image and drag it across the grid, also the mousepointer changes when entering different areas.
(click the picture to download the example source) 

 

The last example demonstrates a 3D vector filled polygon piramid with shadow effect.
It has two methods to display smooth rotating of the object, one of them is obsolete but can be used to create transparent windowing effects with the desktop background.
 (click the picture to download the example source)

 

 


I know there are a lot of coders pretty intrested in Hardware 3D-coding.
One of the XBasic users (Kris Dawson) created a support library for OpenGl.
I'm not skilled in using specific libraries but you can download it here (780K)