Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (754)
Games in Android Showcase (229)
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   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / Xith3D Forums / Re: Add a Canvas3D to the JPanel on: 2003-10-30 08:21:26
Thanks for your reply.

I need to start a view even though that is not visible.
For example, Let's say I use a JTabbedPane and add three tabs.
The last one contains Canvas3D that is connected to view.
So at first, the third tab is not seen.
I want to start a view at the construct time of the third tab and
forget about it.
In this case, how can I accomplish this?

2  Java Game APIs & Engines / Xith3D Forums / Re: Add a Canvas3D to the JPanel on: 2003-10-29 23:41:49
Hi, Here is modified HelloXith3D version.

           JFrame frame = new JFrame();
           frame.setBounds(100, 100, 500, 400);
           JButton click = new JButton("Click");
           frame.getContentPane().add(click, BorderLayout.NORTH);
           JPanel panel = new JPanel();

-->            frame.setVisible(true);

           // create the virtual univers
           VirtualUniverse universe = new VirtualUniverse();

           // add a view to the universe
           View view = new View();

           // add a locale
           Locale locale = new Locale(5.0f, 0.0f, 10.0f);

           // create a BranchGroup
           BranchGroup scene = new BranchGroup();

           // let objects along this path rotate
           Transform3D rotate = new Transform3D();
           TransformGroup objRotate = new TransformGroup(rotate);

           // create Cube
           Geometry geo = Cube.createCubeViaTriangles(0, 0, 0, 1, true);
           Shape3D sh = new Shape3D(geo, new Appearance());

           // turn the scene into a render friendly format

           // create a canvas for our graphics
           RenderPeer rp = new RenderPeerImpl();
           CanvasPeer cp = rp.makeCanvas(panel, 500, 380, 32, false);
           Canvas3D canvas = new Canvas3D();

           // modify our view so we can see the cube
                 new Vector3f(0, 0,    2f),    // location of eye
                 new Vector3f( 0, 0, 0),    // center of view
                 new Vector3f( 0, 1, 0));    // vector pointing up
-->            view.startView();

There is a problem.
When I call frame.setVisible(true) before view.startView().
It works.
But When I change the order, I always see the "invalid drawable". error message.

I tested this code on MacOS X Panther(7B95) with September 5th build.

Is this only a problem related with MacOS JOGL implementation?
Which situation can I see "invalid drawable" message?

P.S) My program(other one) use IndexedTriangleStripArray and GeometryUpdater for dynamic geometry update. When I port Java3D code to Xith3D code,
Could you tell me about pitfalls that I must care?

And I use a JTabbedPane in which Canvas3D is attached.
But there is painting problem.
3  Java Game APIs & Engines / Xith3D Forums / Add a Canvas3D to the JPanel on: 2003-10-29 09:48:23

I started to convert my Java3D code to Xith3D code.
But I couldn't add a Canvas3D object to the JPanel.
Here is a code fragment.

// create a canvas for our graphics
RenderPeer rp = new RenderPeerImpl();
CanvasPeer cp = rp.makeCanvas(panel, 384 + 54, 384 + 54, 32, offScreen);
Canvas3D canvas3d = new Canvas3D();

Is this feature not yet implemented?
Please give me a advice...
4  Java Game APIs & Engines / JOGL Development / Re: JoGL ports: Post them here on: 2003-10-27 08:35:16
I downloaded Nehe tutorial demos and tested those.
But it didn't work.
(I couldn't see no window on windows mode and
could see just a white screen on full screen mode)
On windows mode, I've encountered the following message.
; 2003-10-28 20:23:18.941 java[478] invalid drawable

What's wrong with me?
I tested these on Mac OS X 10.3 with September 5th build JOGL.
Please give me a advice.
Pages: [1]
DesertCoockie (22 views)
2018-05-13 18:23:11

nelsongames (73 views)
2018-04-24 18:15:36

nelsongames (68 views)
2018-04-24 18:14:32

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

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

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

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

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

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

buddyBro (1048 views)
2018-02-28 16:59:18
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!