BLACKSPIRIT
.ch

Introduction

All demos have some things in common (except for the Swing Demo)

In the bottom right corner the current frames per second get displayed.

Actions

KeysAction
Alt+Q, ESC Closes the demo.
S Switches vsync on and off.

Image Demo

ImageDemo

The image demo gives an overview of the image rendering features provided by Blackspirit Graphics.

KeysAction
Arrows Move the character.

Demo | Source

Scene Demo

SceneDemo

The scene demo gives an impression of how the features provided by Blackspirit Graphics can be used to create scene lighting effects.

Drawing on images together with drawing modes helps creating nice effects.

KeysAction
Arrows Move the character.

Demo | Source

Shape Demo

ShapeDemo

The shape demo gives an overview of basic and advanced shape features provided by Blackspirit Graphics.

Demo | Source

Primitive Demo

PrimitiveDemo

The primitive render demo shows Triangle, Line and Point drawing.
On the right side triangles get drawn randomly.

Demo | Source

Capture Demo

CaptureDemo

The capture demo shows how the features of Blackspirit Graphics can be used to capture the current scene as an image. The content of the canvas gets copied to an images cache and read out to the images buffer. Then it gets converted to a BufferedImage using the AWTUtil and saved with AWTs ImageIO.

KeysAction
Arrows Move the character.
I A snapshot of the current content is taken and a dialog opens to save it.
Due to a bug in the FileSaveService for Webstart any file extension can be chosen, but the image saved is always a PNG.

Demo

Swing Demo

SwingDemo

The Swing demo shows the integration of Blackspirit Graphics into a Swing application. A Swing frame with a little menu gets created that contains an AWTCanvas and some images get drawn.

Opening the menu shows the proper lightweight integration into Swing as the menu overlaps the AWTCanvas.

The event based rendering shows when changing the camera position by moving the mouse while holding the left mouse button pressed.

Demo | Source

Particle Demo

ParticleDemo

The particle demo shows a fire and a spring effect created with a configurable particle system.
This demonstrates the performance of Blackspirit Graphics and preview of the particle system to be added in the future.

The particle system seen in this demo is ment only for demonstration purposes and not yet included in the Blackspirit Graphics distribution.

Demo

Video Demo

VideoDemo

The video demo shows the Java Media Framework (JMF) in action together with FOBS4JMF which provides the native codecs. Video data is read from JMF and drawn using Blackspirit Graphics in fullscreen mode.
When starting the application a dialog will appear to choose a movie.

The updated version of this demo solves the JMF Webstart issues and is now also available as a Webstart demo. For the solution of the JMF Webstart issues see JMFInitializer.java which helps loading the jmf.properties configuration file.

KeysAction
1 to 5 Change size of the displayed video.
Left, Right Rotate the video.

So you don't have to search for movies yourself here are three examples:

The VideoRenderer is meant only for demonstration purposes and not yet included in the Blackspirit Graphics distribution.

Demo | Source (VideoDemo.java, VideoRenderer.java, JMFInitializer.java)

Debug Demos

The demos listed here are the same as the demos above but with tracing and OpenGL debugging turned on.
If the demos above fail these help to provide information for a bug report.

To get the information printed, logging for webstart applications must be turned on. You can turn logging for webstarts on in Windows as follows:

  • Start->Settings->Control Panel->Java->Advanced->Settings->Debugging->Enable tracing and logging

Log files on Windows should be created in the following folder:

  • "Drive":\Documents and Settings\"username"\Application Data\Sun\Java\Deployment\log

Links

Links

BSGraphics

3rd Party Libraries