Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (753)
Games in Android Showcase (228)
games submitted by our members
Games in WIP (842)
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 1881 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  

ivj94 (579 views)
2018-03-24 14:47:39

ivj94 (43 views)
2018-03-24 14:46:31

ivj94 (362 views)
2018-03-24 14:43:53

Solater (59 views)
2018-03-17 05:04:08

nelsongames (104 views)
2018-03-05 17:56:34

Gornova (138 views)
2018-03-02 22:15:33

buddyBro (681 views)
2018-02-28 16:59:18

buddyBro (89 views)
2018-02-28 16:45:17

xxMrPHDxx (491 views)
2017-12-31 17:17:51

xxMrPHDxx (727 views)
2017-12-31 17:15:51
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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!