Main Page

From JPCT
Revision as of 07:43, 24 April 2009 by AGP (Talk | contribs)

Jump to: navigation, search

The jPCT wiki


jPCT is a free, small, fast and easy to learn 3D engine for Java. It offers support for software and hardware rendering. This Wiki should help people with tutorials, instructions and samples. If you think that you have something to contribute, just create an account and go for it...


jPCT ressources

The jPCT homepage

The jPCT community


Installation

Requirements

How to install


How to start

First steps

Hello World

Loading models

Advanced example

Applets

Advanced topics

The different renderers

Collision detection

Multithreading

Compiled objects

Shaders

Physics


Setting non-standard Applet heap size in html: Just add <param name="java_arguments" value="-Xmx256m"> where 256m can be the size in MB of your heap. Ex.:

<APPLET archive="MyApplet.jar" code="MyApplet" width="640" height="320"> <param name="java_arguments" value="-Xmx256m"> </APPLET>

Initializing the lwjgl joystick: Controllers controllers = new Controllers(); try {

     controllers.create();
     if (controllers.getControllerCount() > 0) {

joystick = controllers.getController(0); System.out.println("Joystick has "+joystick.getButtonCount() +" buttons. Its name is "+joystick.getName());

     }
     else joystick = null;

} catch (org.lwjgl.LWJGLException e) {System.err.println("Couldn't initialize Controllers: "+e.getMessage());}

Using the lwjgl joystick: Inside the main applet loop: if (joystick != null) { joystick.poll(); rotateZ += joystick.getXAxisValue()/2f; if (joystick.isButtonPressed(0))  ;//DO SOMETHING }