Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (567)
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  
  Using in eclipse + Canvas3D and SWING  (Read 3937 times)
0 Members and 1 Guest are viewing this topic.
Offline Grand Poeba

Junior Member





« Posted 2006-06-29 16:28:59 »

Hi am user of together borland for eclipse but when i want to run my app
it gives error unstatisfied link no jogl found

i have included all jars into my project and put the jogl.jar and dll in the same dir of project as well

what do i need to do more?
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #1 - Posted 2006-06-29 16:40:02 »

Hi am user of together borland for eclipse but when i want to run my app
it gives error unstatisfied link no jogl found

i have included all jars into my project and put the jogl.jar and dll in the same dir of project as well

what do i need to do more?
Select your .jars files and do Right Click -> Build path -> Add to build path

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline kevglass

JGO Kernel


Medals: 171
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #2 - Posted 2006-06-29 16:42:38 »

Um, wouldn't:

Quote
it gives error unstatisfied link no jogl found

Imply its the native not the jars that are the problem - unsatisfied linking? How are you running your program?

Kev


Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Grand Poeba

Junior Member





« Reply #3 - Posted 2006-06-29 16:46:48 »

Um, wouldn't:

Quote
it gives error unstatisfied link no jogl found

Imply its the native not the jars that are the problem - unsatisfied linking? How are you running your program?

Kev

found the problem
it seems i just put jar with dlls in folder instead of the dlls extracted from the jar
now it is working fine thanks for the help anyway Smiley

can you perhaps answer another small question can i add a canvas to a JPanel in any way? or how can i view somehting inside a Jpanel?

thx for the respons
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #4 - Posted 2006-06-29 16:48:41 »

Just use org.xith3d.render.Canvas3DPanel. This is done for you previously.
Well, this is part of 0.8.0. So be sure to have a recent version.

Qudus
Offline Grand Poeba

Junior Member





« Reply #5 - Posted 2006-06-29 16:50:25 »

Just use org.xith3d.render.Canvas3DPanel. This is done for you previously.
Well, this is part of 0.8.0. So be sure to have a recent version.

Qudus


yes i have new version but wasnt aware of that new feature Smiley
cool thx Wink

is t his canvas3Dpanel and actual canvas3D yet or do you have to add a canvas3D to it?
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #6 - Posted 2006-06-29 17:08:08 »

is t his canvas3Dpanel and actual canvas3D yet or do you have to add a canvas3D to it?

A Canvas3DPanel creates a Canvas3D on its own.

Please have a look at the release notes of 0.8.0. They are really short and easy to read. You will get a hint of the most important new features of 0.8

Here is a link: http://www.java-gaming.org/forums/index.php?action=dlattach;topic=14194.0;id=496
Offline Grand Poeba

Junior Member





« Reply #7 - Posted 2006-06-29 20:54:16 »

is t his canvas3Dpanel and actual canvas3D yet or do you have to add a canvas3D to it?

A Canvas3DPanel creates a Canvas3D on its own.

Please have a look at the release notes of 0.8.0. They are really short and easy to read. You will get a hint of the most important new features of 0.8

Here is a link: http://www.java-gaming.org/forums/index.php?action=dlattach;topic=14194.0;id=496

do you perhaps have small appl which uses a canvas3dpanel? so i can see how this now works? thx
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #8 - Posted 2006-06-29 21:54:22 »

do you perhaps have small appl which uses a canvas3dpanel? so i can see how this now works? thx

Yes, I do. Take a look at org.xith3d.test.ui.SwingGUIEnvironmentTest. Dig into the method initGUI, it is used there. But you should use the CVS version. I have simplified this test a little. But the version in the release works as well.

The basic usage of Canvas3DPanel is very simple. Treat it like any other Component and add it to another Container like this:
1  
2  
3  
4  
JFrame f = new JFrame("sdfsdfsdf");
f.setLayout(new GridLayout(1, 1));
Canvas3DPanel c3dp = new Canvas3DPanel(); // there are other constructors that could be interesting, too.
f.getContentPane().add(c3dp, null);


Add it to an (Ext)Xith3DEnvironment like this:
1  
2  
ExtXith3DEnvironment env = new ExtXith3DEnvironment();
env.addCanvas(c3dp);


Or add it to a View if you are not using Xith3DEnvironment:
1  
2  
View view = new View();
view.addCanvas3D(c3dp.getCanvas());


Hope this helps.

Qudus
Offline Grand Poeba

Junior Member





« Reply #9 - Posted 2006-06-30 12:47:51 »

do you perhaps have small appl which uses a canvas3dpanel? so i can see how this now works? thx

Yes, I do. Take a look at org.xith3d.test.ui.SwingGUIEnvironmentTest. Dig into the method initGUI, it is used there. But you should use the CVS version. I have simplified this test a little. But the version in the release works as well.

The basic usage of Canvas3DPanel is very simple. Treat it like any other Component and add it to another Container like this:
1  
2  
3  
4  
JFrame f = new JFrame("sdfsdfsdf");
f.setLayout(new GridLayout(1, 1));
Canvas3DPanel c3dp = new Canvas3DPanel(); // there are other constructors that could be interesting, too.
f.getContentPane().add(c3dp, null);


Add it to an (Ext)Xith3DEnvironment like this:
1  
2  
ExtXith3DEnvironment env = new ExtXith3DEnvironment();
env.addCanvas(c3dp);


Or add it to a View if you are not using Xith3DEnvironment:
1  
2  
View view = new View();
view.addCanvas3D(c3dp.getCanvas());


Hope this helps.

Qudus

i tried to adjust my code so i took your advise here and pasted it in but i get an error
Exception in thread "main" java.lang.StackOverflowError
   at gui.XithView.getCanvas3D(XithView.java:42)

the jar with code can be found here: (I am sorry but my comments are in dutch since i am belgian Wink )
http://users.skynet.be/fa006997/FourPanelSplitPane.jar
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #10 - Posted 2006-06-30 13:08:23 »

You're doing View v = new View() but you have a field named view. Shouldn't you do view = new View(), simply ?

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline Grand Poeba

Junior Member





« Reply #11 - Posted 2006-06-30 18:34:01 »

You're doing View v = new View() but you have a field named view. Shouldn't you do view = new View(), simply ?

it is basicly the same since the method returns an object of the type View
so that shouldnt be a problem
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #12 - Posted 2006-06-30 18:42:16 »

You missed the super constructor call.

EDIT: You're extending the Canvas3DPanel class and have you own constructor. Call the constructor of the super class (Canvas3DPanel) and it will be initialized. You should always call a super constructor when extending classes.
Offline Grand Poeba

Junior Member





« Reply #13 - Posted 2006-06-30 21:23:57 »

You missed the super constructor call.

EDIT: You're extending the Canvas3DPanel class and have you own constructor. Call the constructor of the super class (Canvas3DPanel) and it will be initialized. You should always call a super constructor when extending classes.

you dont have to explicit call the super in the constructor so that is not the problem
i have added it as well and the error remains
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #14 - Posted 2006-06-30 21:35:36 »

You missed the super constructor call.

EDIT: You're extending the Canvas3DPanel class and have you own constructor. Call the constructor of the super class (Canvas3DPanel) and it will be initialized. You should always call a super constructor when extending classes.

you dont have to explicit call the super in the constructor so that is not the problem
i have added it as well and the error remains

Try it this way: (class XithView)
1  
2  
3  
4  
   public Canvas3D getCanvas3D(){
-       return getCanvas3D();
+          return super.getCanvas();
   }


But you can even directly use the inherited method getCanvas() of the Cavas3DPanel class and leave this whole method. But if you like this method to be named like this...
Offline Grand Poeba

Junior Member





« Reply #15 - Posted 2006-06-30 22:33:26 »

You missed the super constructor call.

EDIT: You're extending the Canvas3DPanel class and have you own constructor. Call the constructor of the super class (Canvas3DPanel) and it will be initialized. You should always call a super constructor when extending classes.

you dont have to explicit call the super in the constructor so that is not the problem
i have added it as well and the error remains

Try it this way: (class XithView)
1  
2  
3  
4  
   public Canvas3D getCanvas3D(){
-       return getCanvas3D();
+          return super.getCanvas();
   }


But you can even directly use the inherited method getCanvas() of the Cavas3DPanel class and leave this whole method. But if you like this method to be named like this...

i just removed the complete method and now it works but when when i want to resize now the dragging is almost directly stopped so i cant resize the panels fluently
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #16 - Posted 2006-06-30 22:40:00 »

i just removed the complete method and now it works but when when i want to resize now the dragging is almost directly stopped so i cant resize the panels fluently

Well, I think what you want to say, is that the canvas gets resized when the mouse is released. If this is the case, it is caused by the fact, that the event causing the children of a container component to be resized is fired when the mouse is released. AFAIK this is fixed to the window environment (M$ Windows in your case).

But maybe I misunderstood you.
Offline Grand Poeba

Junior Member





« Reply #17 - Posted 2006-06-30 23:27:37 »

i just removed the complete method and now it works but when when i want to resize now the dragging is almost directly stopped so i cant resize the panels fluently

Well, I think what you want to say, is that the canvas gets resized when the mouse is released. If this is the case, it is caused by the fact, that the event causing the children of a container component to be resized is fired when the mouse is released. AFAIK this is fixed to the window environment (M$ Windows in your case).

But maybe I misunderstood you.

well i have the same program but with jpanels and that works fine
the panels are dynamicly resized when you drag mouse like you do with a jsplitpane but when the panels are vcanva3Dpanel it gets all lagy and resizing isnt good at all
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #18 - Posted 2006-07-01 12:06:57 »

vcanva3Dpanel???  Grin hmm...

well i have the same program but with jpanels and that works fine
the panels are dynamicly resized when you drag mouse like you do with a jsplitpane but when the panels are vcanva3Dpanel it gets all lagy and resizing isnt good at all

Good to know. I used a Panel and not a JPanel as super class for Canvas3DPanel, because I thought, only this was necessary and I would free the way to use AWT and not Swing.

But I think, nobody actually uses AWT and no Swing. So I can try it with a JPanel and finally switch to it.

thanks for the advice.
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #19 - Posted 2006-07-01 12:13:31 »

Tried it. It's just the same behaviour with JPanels.

So please describe your symptoms again and with other words. Maybe I get you right this time.
Offline Grand Poeba

Junior Member





« Reply #20 - Posted 2006-07-01 12:20:08 »

Tried it. It's just the same behaviour with JPanels.

So please describe your symptoms again and with other words. Maybe I get you right this time.

as long as i keep my mousepointer over the dividers while i resize
everything goes fine
but as soon as my mousepointer gets mover over a canvas3dPanel the resizing stops eventhougth you are still dragging

the resizing cant keep up with the mouse
or should i first add Canvas3dPanel to a Jpanel and then add JPanel to JFrame? now is directly kinda add Canvas3dPanel to JFrame -> has evne worse result

i have uploaded the 2 versions (all including code)
http://users.skynet.be/fa006997/FourPanelSplitPaneUsingJPanel.jar
http://users.skynet.be/fa006997/FourPanelSplitPane.jar
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #21 - Posted 2006-07-02 00:01:06 »

First of all, you should remove the scene.compile() call, because it does nothing and the method is removed in the current CVS version and won't be available in the next version.

But now for the real problem...

Update your CVS and take a look at the following two classes:

org.xith3d.render.canvas.FourViewsPanel
org.xith3d.test.ui.FourViewsPanelTest

Start org.xith3d.test.Xith3DTestStarter and select the ui.FourViewsPanelTest.

I think, this will help you.

Unfortunately there seems to be a problem with multiple Views on one VirtualUniverse. Only one View gets rendered. I found a quite old thread, where this problem was discussed. But it seems not to be solved. Does anybody know something about it?
Offline Grand Poeba

Junior Member





« Reply #22 - Posted 2006-07-05 11:51:31 »

Got a question about Xith3DEnvironment.
does this replace the code with the universe and where you add a scene and view to it? or is this something else?
thx
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #23 - Posted 2006-07-05 14:25:24 »

Got a question about Xith3DEnvironment.
does this replace the code with the universe and where you add a scene and view to it? or is this something else?
thx

Look into the constructor of Xith3DEnvironment. There are VirtualUniverse, Locale and View created and stored in the instance. You can access them through appropriate methods. In the current CVS version there is the possibility to add more Views to an instance of (Ext)Xith3DEnvironment.

You can anyway add a scene to the Environment by calling addChild on the (Ext)Xith3DEnvironment instance.
Offline Grand Poeba

Junior Member





« Reply #24 - Posted 2006-07-05 19:26:47 »

Got a question about Xith3DEnvironment.
does this replace the code with the universe and where you add a scene and view to it? or is this something else?
thx

Look into the constructor of Xith3DEnvironment. There are VirtualUniverse, Locale and View created and stored in the instance. You can access them through appropriate methods. In the current CVS version there is the possibility to add more Views to an instance of (Ext)Xith3DEnvironment.

You can anyway add a scene to the Environment by calling addChild on the (Ext)Xith3DEnvironment instance.

How does this cvs thing work? is thare a jar available with all cvs in or do you no need to manualy dl and intergrate eme?
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #25 - Posted 2006-07-05 20:47:40 »

How does this cvs thing work? is thare a jar available with all cvs in or do you no need to manualy dl and intergrate eme?

There is no recent cvs snapshot release. And I can't upload one.

You will have to register on dev.java.net. Then request a read-only role on the xith-tk project (on dev.java.net). You certainly use eclipse. Just create a new project and select java->cvs_project in the project wizzard. Type in the information you will get from dev.java.net to link the eclipse project with the cvs project. Then synchronize and checkout. Whoala, you have the recent cvs code in your eclipse.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Pippogeek (39 views)
2014-09-24 16:13:29

Pippogeek (30 views)
2014-09-24 16:12:22

Pippogeek (19 views)
2014-09-24 16:12:06

Grunnt (44 views)
2014-09-23 14:38:19

radar3301 (27 views)
2014-09-21 23:33:17

BurntPizza (63 views)
2014-09-21 02:42:18

BurntPizza (32 views)
2014-09-21 01:30:30

moogie (40 views)
2014-09-21 00:26:15

UprightPath (50 views)
2014-09-20 20:14:06

BurntPizza (54 views)
2014-09-19 03:14:18
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org 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‑gaming.org
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!