Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3508 Members - Latest Member: NevilleKemp

26. May 2012, 06:18:16 pm
Xith3D CommunityGeneral CategorySupport (Moderator: Marvin Fröhlich)beginner's problem: window not reacting
Pages: [1]
Print
Author Topic: beginner's problem: window not reacting  (Read 301 times)
8arracuda
Just dropped in

Offline Offline

Posts: 3


View Profile
« on: 12. October 2011, 12:51:02 pm »

Hello,

I'm using eclipse for my developement. After getting "xith3d" and "xith-tk" via svn to my eclipse I want to get started now. First I tried the "Chapter01a" example Code from the XIN. But there is the my problem:
eclipse opens a grey window. The rainbow-ball on my Mac (lion) system is rotating all the time...
I can't close the window; the buttons in the upper left corner are grey and don't react if I try to press them.

I tried Chapter02 too and I still just see the the grey window. nothing was drawn in there...


Eclipse's console shows that:
----------------------------
2011-10-12 14:42:27.491 java[4268:407] [Java CocoaComponent compatibility mode]: Enabled
2011-10-12 14:42:27.507 java[4268:407] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
2011-10-12 14:42:28.631 java[4268:d303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x7f9aea186080> '(null)') unlocked when not locked
2011-10-12 14:42:28.631 java[4268:d303] *** Break on _NSLockError() to debug.
2011-10-12 14:42:28.732 java[4268:d303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x7f9aea185a80> '(null)') unlocked when not locked
2011-10-12 14:42:28.732 java[4268:d303] *** Break on _NSLockError() to debug.
2011-10-12 14:42:28.838 java[4268:d303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x7f9aea191720> '(null)') unlocked when not locked
2011-10-12 14:42:28.839 java[4268:d303] *** Break on _NSLockError() to debug.
2011-10-12 14:42:28.940 java[4268:d303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x7f9ae8c26d60> '(null)') unlocked when not locked
2011-10-12 14:42:28.940 java[4268:d303] *** Break on _NSLockError() to debug.
2011-10-12 14:42:29.042 java[4268:d303] *** -[NSConditionLock unlock]: lock (<NSConditionLock: 0x7f9aea191200> '(null)') unlocked when not locked
2011-10-12 14:42:29.042 java[4268:d303] *** Break on _NSLockError() to debug.
----------------------------


I'm using Mac OS X 10.7.1 with a 3 Ghz CPU and 12 GB Ram.
all updates done

java -version says:
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-383-11A511)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-383, mixed mode)

Eclipse is version 3.7.1


It would be nice if someone had a solution for my problem
Thanks in advance
Logged
lonesomeStranger
Becoming dependent
**
Offline Offline

Posts: 111

197432680
View Profile
« Reply #1 on: 13. October 2011, 09:15:23 am »

I'm not sure but maybe this will help: http://xith.org/forum/index.php/topic,1550.0.html
Logged

Anton
8arracuda
Just dropped in

Offline Offline

Posts: 3


View Profile
« Reply #2 on: 16. October 2011, 10:38:59 am »

I'm not sure but maybe this will help: http://xith.org/forum/index.php/topic,1550.0.html

I saw the sticky article before posting my question. It could be that this is my problem Wink But unfortunately I can't solve the problem myself with the infos from that thread.

The code I have is this:

Code:
package org.xith3d.test;

/**
 * Copyright (c) 2003-2010, Xith3D Project Group all rights reserved.
 *
 * Portions based on the Java3D interface, Copyright by Sun Microsystems.
 * Many thanks to the developers of Java3D and Sun Microsystems for their
 * innovation and design.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 *
 * Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the following disclaimer in the documentation
 * and/or other materials provided with the distribution.
 *
 * Neither the name of the 'Xith3D Project Group' nor the names of its
 * contributors may be used to endorse or promote products derived from this
 * software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) A
 * RISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE
*/

import org.openmali.vecmath2.Point3f;
import org.openmali.vecmath2.Vector3f;

import org.xith3d.loop.RenderLoop;
import org.xith3d.render.Canvas3DFactory;
import org.xith3d.base.Xith3DEnvironment;

/**
 * XIN - "Adjusting the camera" example coding.
 *
 * @author Marvin Froehlich (aka Qudus)
 */
public class Chapter02 extends RenderLoop
{
    public Chapter02()
    {
        super( 120f );
       
        Point3f eyePosition = new Point3f( 0f, 0f, 5f );
        Point3f viewFocus = Point3f.ZERO;
        Vector3f vecUp = Vector3f.POSITIVE_Y_AXIS;
       
        Xith3DEnvironment env = new Xith3DEnvironment( eyePosition,
                                                       viewFocus,
                                                       vecUp,
                                                       this
                                                     );
       
        // or alternatively...
        env.getView().lookAt( eyePosition, viewFocus, vecUp );
       
        env.addCanvas( Canvas3DFactory.createWindowed( 800, 600, "My empty scene" ) );
    }
   
    public static void main( String[] args )
    {
        Chapter02 rl = new Chapter02();
       
        rl.begin();
    }
}

This is the code from XIN Chapter02.

Where I have to integrate the code to include the program to an swt window?
Logged
lonesomeStranger
Becoming dependent
**
Offline Offline

Posts: 111

197432680
View Profile
« Reply #3 on: 18. October 2011, 08:38:36 am »

Where I have to integrate the code to include the program to an swt window?
Try to use the following:
Code:
        env.addCanvas( Canvas3DFactory.createWindowed( OpenGLLayer.JOGL_SWT, 800, 600, FSAA.OFF, "My empty scene" ));
Logged

Anton
8arracuda
Just dropped in

Offline Offline

Posts: 3


View Profile
« Reply #4 on: 18. October 2011, 06:39:29 pm »

Hello again, sorry for my stupidness Wink
But I have no idea how to come along with xith3d....


I replaced the existing line from "Chapter02.java"

Code:
env.addCanvas( Canvas3DFactory.createWindowed( 800, 600, "My empty scene" ) );
with the line you pasted here:
Code:
env.addCanvas( Canvas3DFactory.createWindowed( OpenGLLayer.JOGL_SWT, 800, 600, FSAA.OFF, "My empty scene" ));

After running it Eclipse showed me that explanation (error message):

Code:
2011-10-18 20:33:08.653 java[1146:407] [Java CocoaComponent compatibility mode]: Enabled
2011-10-18 20:33:08.654 java[1146:407] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
Exception in thread "main" java.lang.IllegalArgumentException: To construct an SWT Canvas, you must provide an owner of type org.eclipse.swt.Composite. At present, this means that you need to run as an Eclipse plug-in or as an Eclipse Rich Client Platform application.  In the future, we will provide XithRCP to simplify this process; however, it is fairly easy to create a default RCP application using the Eclipse wizard 'New plug-in project' and selecting 'Yes' when asked 'Do you want to create a rich client application' on the 2nd page.
at org.xith3d.render.jsr231.CanvasPeerImplSWT.<init>(CanvasPeerImplSWT.java:226)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.xith3d.render.Canvas3DFactory.create(Canvas3DFactory.java:132)
at org.xith3d.render.Canvas3DFactory.create(Canvas3DFactory.java:166)
at org.xith3d.render.Canvas3DFactory.create(Canvas3DFactory.java:180)
at org.xith3d.render.Canvas3DFactory.create(Canvas3DFactory.java:290)
at org.xith3d.render.Canvas3DFactory.create(Canvas3DFactory.java:478)
at org.xith3d.render.Canvas3DFactory.createWindowed(Canvas3DFactory.java:772)
at org.xith3d.render.Canvas3DFactory.createWindowed(Canvas3DFactory.java:830)
at org.xith3d.test.Chapter02.<init>(Chapter02.java:72)
at org.xith3d.test.Chapter02.main(Chapter02.java:77)





I went through the explanation to create an "eclipse plug-in" as a rich client application.
I've done a lot of imports there but I don't really know what I'm doing there  Huh
Finally I got the same error message (that that I posted above)

Now I really have no idea how to get the things working...
Just need to do some scene-graphing stuff for my university....
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #5 on: 19. October 2011, 08:24:05 am »

I don't remember exactly, since I never used it. But I think, you need to pass in this eclipse component as an owner to the canvas constructor.
Logged
lonesomeStranger
Becoming dependent
**
Offline Offline

Posts: 111

197432680
View Profile
« Reply #6 on: 19. October 2011, 08:38:57 am »

Here is the topic related to your problem:

http://xith.org/forum/index.php/topic,866.0.html
Logged

Anton
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic