Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Jonas

Pages: 1 [2] 3
German corner / Re: Software/Hardware Renderer?
« on: March 14, 2008, 06:18:56 pm »

hardware renderer greift via Lwjgl+OpenGL auf deine Grafikkarte zu, der software renderer nicht.

Vorteil am Software renderer ist das du keine der nativen libraries(*.dll für windows zB.) benötigst die für den hardware modus benötigt werden. Vor allem für Applets nützlich. Dafür ists halt ein wenig langsamer.

News / Re: jPCT on my new...
« on: March 13, 2008, 09:46:33 am »
nice gadget that is.

I'd be more interested in the game however ;D

Support / Re: How to setup environment
« on: March 06, 2008, 03:09:13 pm »

If you want to use software just use the components graphics object to paint the framebuffer on to the component..


For the hardware mode you could use a canvas like this and add it to a jpanel(if you want to use both, soft and hardware modus you can then just replace the canvas in the jpanel by its software counterpart). I think there could be some problems with that because of Swing/awt integration..this one needs to call render() after every update to the world you want rendered...:

Code: [Select]
public class HardwareCanvas extends Canvas

   private FrameBuffer _buffer;
   private World _world;

   private Canvas myCanvas;
   private boolean isWireframeMode = false;
   public HardwareCanvas(World myWorld)
      this.myWorld = myWorld;
      createCanvas(800, 800);
    *  Set up the panel and listener, and create a framebuffer
    *  in hardwarerendering mode.

   private void createCanvas(int height, int width) {
      if(myCanvas == null)
         myFramebuffer = new FrameBuffer(

         myCanvas = myFramebuffer.enableGLCanvasRenderer(); // Enable hardware rendering

         /* Your listeners go here*/
         myCanvas.addKeyListener( new KeyAdapter() {} );
/* Render the world...could use a render loop as well so you dont have to call it after every update */

   public void render() {

         //Render the scene onto an image

         if (!isWireframeMode) {
         } else {
            myWorld.drawWireframe(myFramebuffer, Color.white);

         SwingUtilities.invokeLater(new Runnable() {

            public void run()

   public void changeWireframeMode()
      isWireframeMode = !isWireframeMode;

News / Re: Release candidate of 1.16
« on: March 02, 2008, 08:20:35 pm »
Works for me now, thanks.

News / Re: Release candidate of 1.16
« on: March 02, 2008, 07:00:48 pm »
I get that msg from winrar:

!    CRC failed in jpct\lib\lwjgl-1.1.4\jinput.jar. The file is corrupt
!    CRC failed in jpct\lib\lwjgl-1.1.4\lwjgl.jar. The file is corrupt
!    CRC failed in jpct\lib\lwjgl-1.1.4\lwjgl_test.jar. The file is corrupt

Support / Re: 2nd object
« on: February 11, 2008, 01:13:15 pm »

Loading a 3ds model may result in more than one Object3D(e.g. in the cartoon example theres an object for the hand, one for the body and so on...).

So what that code does is to rotate all these parts of the loaded model. It is then merged into one bigger object3d representing the whole model.

If you want to load multiple models that way, just pack it into a method. Like

Code: [Select]
public Object3D loadModel(String filename, float scale)
Object3D[] model = Loader.load3DS(filename, scale);

Object3D o3d = new Object3D(0);
Object3D temp = null;
  for (int i=0; i<obj.length; i++)
  temp.setRotationMatrix(new Matrix());
  o3d=Object3D.mergeObjects(o3d, temp);
return o3d;           

and use this one in your code.

Support / Re: Serializing Object3Ds to file
« on: February 10, 2008, 10:01:22 pm »

To get it to work you would have to either set it to null again or make the poly manager transient in object3d befor reading the object(when you start adding userobjects thats probably going to be the same problem)...


you could also just create a dummy world, put that object3d into it and use the xml serializer that the jpct loader offers? :)

Support / Re: How to make quality better in sw mode...
« on: January 29, 2008, 08:13:40 pm »
You could use oversampling(see framebuffer samplingmodes..) or just render a higher resolution.

German corner / Re: Alpha-Blending
« on: January 28, 2008, 11:14:42 pm »
Hab mir die Seite auch eben angeschaut..nice work :) ... auch wenn ich WoW nicht mag ;D

News / Re: Software renderer and Java6 Update10
« on: January 18, 2008, 01:01:29 pm »
The idea of a default d3d-pipeline just sucks imho.

Agreed ;D

News / Re: Software renderer and Java6 Update10
« on: January 18, 2008, 10:37:04 am »
Well I guess best is to turn it off by default ;D.

Wouldn't something like this in the main class help?

Code: [Select]
         System.setProperty("sun.java2d.d3d", "false");

That should work for applets too

News / Re: Software renderer and Java6 Update10
« on: January 17, 2008, 04:15:37 pm »
Yes but that should be possible to do using an OpenGl pipeline as least to my humble understanding ;D.

Java3d also offers a direct3d modus which is used by quite a few people. Kinda wierd..since it's not possible to access it directly I guess there must be some kind of gain when using d3d on windows or some such..

News / Re: Software renderer and Java6 Update10
« on: January 17, 2008, 03:00:51 pm »
I don't quite understand why anyone is interested in a d3d pipeline for java anyway..I mean..after all AWT should be platform independent :).
Especially for a 2d toolkit..oh well..

News / Re: Software renderer and Java6 Update10
« on: January 17, 2008, 02:13:04 pm »

ouch ... and this pipeline is turned on by default? Sounds like a step into the wrong direction;D

Thanx for the hint

Bugs / Re: Bug in CollisionListener I think.
« on: January 07, 2008, 03:12:04 pm »
Nice work :)

Pages: 1 [2] 3