Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (707)
Games in Android Showcase (206)
games submitted by our members
Games in WIP (781)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Bug using Xith3D and LWJGL  (Read 1457 times)
0 Members and 1 Guest are viewing this topic.
Offline jeep

Senior Newbie

« Posted 2005-10-10 06:21:13 »

I tried both the May and August release of LWJGL. I'm using the August 19 release of Xith3D and using Java 1.5 Update 5. Sapphire ATI Radeon 9800 Pro on WinXP. It looks like it may be in LWJGL from the GL11 JNI:

   public static void glGetInteger(int pname, IntBuffer params) {
      long function_pointer = GLContext.getCapabilities().GL11_glGetIntegerv_pointer;
      BufferChecks.checkBuffer(params, 16);
      nglGetIntegerv(pname, params, params.position(), function_pointer);
   private static native void nglGetIntegerv(int pname, IntBuffer params, int params_position, long function_pointer);

     [exec] int1: java.nio.DirectIntBufferU[pos=0 lim=16 cap=16]
    exec]     at org.lwjgl.opengl.GL11.glGetInteger(
    exec]     at com.xith3d.render.lwjgl.CanvasPeerImpl.render(
     [exec]     at com.xith3d.scenegraph.View.renderOnce(
    exec]     at
    exec]     at com.xith3d.render.lwjgl.CanvasPeerImpl.render(
     [exec]     at com.xith3d.scenegraph.View.renderOnce(
    exec]     at
    exec]     at com.xith3d.render.lwjgl.CanvasPeerImpl.renderStart(
     [exec]     at com.xith3d.render.lwjgl.CanvasPeerImpl.display(
     [exec]     ... 5 more

comes after this code executes....which is from the getting started tutorial....

    private void buildBaseSceneGraph()
        // Construct the root of the scene graph
        universe = new VirtualUniverse();
        view = new View();
        locale = new Locale();
        scene = new BranchGroup();

        // Create an initial rotation transformation
        Transform3D rotate = new Transform3D();
            (float) Math.PI/4,
            (float) Math.PI/5,
            (float) Math.PI/2);
        TransformGroup objRotate = new TransformGroup(rotate);

        // Add to rotation object to scene graph

        // Create an add an initial cube to the rotation object
        Geometry g = Cube.createCubeViaTriangles(0, 0, 0, 1, true);
        Shape3D sh = new Shape3D(g);

        // draw a quad in the lower-left corner
        Shape3D sh4 = new Shape3D(createQuad(), new Appearance());

        // Compile the scene for the renderer. Not necessary here.

        // Now we still need a Canvas for displaying our cube. We use
        // RenderPeer and CanvasPeer, which are an abstraction layer enabling
        // us to use Jogl and LWJGL. We can specify the owner, the dimension,
        // the color depth and fullscreen mode.
        RenderPeer rp;
        if (rendererType == RendererType.JOGL)
            rp = new com.xith3d.render.jogl.RenderPeerImpl();
            rp = new com.xith3d.render.lwjgl.RenderPeerImpl();
        CanvasPeer cp = rp.makeCanvas(null, 640, 480, 32, false);
        Canvas3D canvas = new Canvas3D();

        // After adding the canvas to the view component of our scenegraph
        // the only thing remaining is to set back the position of the viewer.
        // We do this by modifying a Transform3D component of view. The first
        // vector is the position of the eye of the viewer. Because the z-axis
        // is pointing towards us we use a positive z value. The value should
        // be large enough to be outside the cube. The next vector specifies
        // the center of view. The third vector specifies the up direction which
        // is the positive y-axis here.
            new Vector3f(0, 0, 2.41f), // location of eye
            new Vector3f( 0, 0, 0), // center of view
            new Vector3f( 0, 1, 0)); // vector pointing up

     * QuadArray is used here. Four points are one quad.
    public Geometry createQuad()
        Point3f[] coords = new Point3f[]
            new Point3f( 0,  0, 0),
            new Point3f(-1,  0, 0),
            new Point3f(-1, -1, 0),
            new Point3f( 0, -1, 0),

        Color3f[] colors = new Color3f[]
            new Color3f(1,0,0),
            new Color3f(1,1,1),
            new Color3f(0,1,0),
            new Color3f(1,1,1)

        QuadArray g = new QuadArray(coords.length, GeometryArray.COORDINATES
            | GeometryArray.COLOR_3);

        return g;
Offline William Denniss

JGO Coder

Projects: 2

Fire at will

« Reply #1 - Posted 2005-10-11 11:07:35 »

Do you think the bug is in LWJGL or Xith3D?  They have possibly fixed it if it is LWJGL.


Offline jeep

Senior Newbie

« Reply #2 - Posted 2005-10-15 12:03:18 »

could be anything:

1. bug with with jni and lwjgl, either caused internally by my graphics card setup or lwjgl
2. something being passed incorrectly by xith3d
3. something i'm not doing to load lwjgl correctly where it works with jogl

of course i don't want to point the finger at myself with #3. i rather point it at poor documentation. Wink

i could of course improve my debugging skills with a debugger, find out the values being passed around, and find out what the "... 5 more" is.

i'm thinking it could have just been the fact i was using a non-power-of-2 texture. but i think i get the same thing without textures. i'll double check on it once i get a code reorganization complete to test geometry again....i got sidetracked with trying to get jogl to do true fullscreen.
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Galdo (285 views)
2017-01-12 13:44:09

Archive (448 views)
2017-01-02 05:31:41

0AndrewShepherd0 (908 views)
2016-12-16 03:58:39

0AndrewShepherd0 (845 views)
2016-12-15 21:50:57

Lunch (980 views)
2016-12-06 16:01:40

ral0r2 (1211 views)
2016-11-23 16:08:26

ClaasJG (1312 views)
2016-11-10 17:36:32

CoffeeChemist (1334 views)
2016-11-05 00:46:53

jay4842 (1416 views)
2016-11-01 19:04:52

theagentd (1223 views)
2016-10-24 17:51:53
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!