Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  Blog: Easy 2D/3D Mixing in Swing  (Read 16316 times)
0 Members and 1 Guest are viewing this topic.
Offline campbell

Full Member
**

Posts: 179
Medals: 2


Java games rock!


« on: 2006-10-16 02:35:13 »

Since it may be relevant to folks on this forum (especially newcomers), I just wanted to mention a blog entry I wrote last week about mixing Java2D, JOGL, and Swing:
http://weblogs.java.net/blog/campbell/archive/2006/10/easy_2d3d_mixin.html

Source code and webstarted demo included.  Covers things like a simplified version of GLJPanel, using Chet's timingframework in a 2D/3D/Swing environment, the TextureIO utility classes, and more...

Thanks,
Chris
Offline Ken Russell

JGO Kernel
*****

Posts: 3446
Medals: 3


Java games rock!


« Reply #1 on: 2006-10-16 13:47:29 »

Cool stuff. I've added a link to your blog entry to the JOGL demos page and made this topic sticky for now.
Offline campbell

Full Member
**

Posts: 179
Medals: 2


Java games rock!


« Reply #2 on: 2007-01-23 15:55:06 »

I just posted another blog entry that covers things from the other perspective -- using Java 2D elements (text, animated rendering, etc) from within a JOGL application:
http://weblogs.java.net/blog/campbell/archive/2007/01/java_2d_and_jog.html

Source code and webstarted demo included.

Thanks,
Chris
Games published by our own members! Go get 'em!
Offline Ken Russell

JGO Kernel
*****

Posts: 3446
Medals: 3


Java games rock!


« Reply #3 on: 2007-01-23 18:40:09 »

Excellent. I've linked to your blog posting from the jogl-demos web page as well.
Offline DarkDerivative

JGO n00b
*

Posts: 4



« Reply #4 on: 2007-06-29 21:44:22 »

Hi Chris,

Your "flip side" article is great, thanks!

These features are very exciting.  Excuse the newb question.  I'm
new to Java2D, and somewhat new to jogl.  (Not to mention new
to posting)

I've tried the TextRenderer class, and it's very easy to print
text over my jogl/openGL 3D animation.  Very cool!

However, for a "chat box" I'd like a background, and also
boundry the TextRenderer text to the effective box boundries.

So I'm assuming this would be done with the Overlay class
you mention?

Are these two classes meant to operate together in this fashion?

Are there any examples of something like this?


Thanks much,

DarkDerivative
---------------------
Offline DarkDerivative

JGO n00b
*

Posts: 4



« Reply #5 on: 2007-07-02 00:57:05 »


OK, from some study it looks like I need to use the TextureRenderer directly
instead of the TextRenderer or Overlay.

This is quite cool.  Wish there was a little more docs for those of us who
are not so far along in jogl and/or Java2D.  Am still kinda confused on
all the functions and copies (backing to texture to screen).

Not sure from the class docs why I seem to need both begin/end OrthoRendering,
and drawOrthoRect.  But I guess it will hopefully become clear after more experiments.

But yeah, just wildly cool.  I was kind of depressed looking at fonts in openGL earlier.
This came at a perfect time.

Thanks much,

DarkDerivative
--------------------
Offline DaveLloyd

Jr. Member
**

Posts: 88


Making things happen fast with Java!


« Reply #6 on: 2007-07-30 17:52:40 »

It's been mentionned that the TextureRenderer might use the JOGL / Java2D bridge. Any idea if/when that might happen?

Offline Saxer

Full Member
**

Posts: 115



« Reply #7 on: 2007-09-03 04:40:52 »

The http://weblogs.java.net/blog/campbell/archive/2007/01/java_2d_and_jog.html demo seems to be broken with newer jogl-webstart-versions. In get an GLException when the demo tries to sync() the renderer.
Offline darkpegasus

JGO n00b
*

Posts: 30



« Reply #8 on: 2007-10-10 13:18:52 »

I think import com.sun.opengl.util.j2d.* has been renamed in newer versions. Has anyone posted an updated version of this demo anywhere?

While it may be a trivial change once you know what you're doing, I'm a big believer of having a demo that works first for those of us that are slow learners  Smiley
Offline emzic

JGO Ninja
***

Posts: 506



« Reply #9 on: 2007-10-10 13:25:45 »

wasnt the sync() method replaced by markdirty()?

www.embege.com - personal website
webstart blendinspect - OpenGL BlendingModes visualization.
Games published by our own members! Go get 'em!
Offline broumbroum

Sr. Member
**

Posts: 384



« Reply #10 on: 2007-10-10 16:18:34 »

PhotoCube has been debugged to 1.5+ from source-code by myself : http://broumbroum84mirror3.ifrance.com/jnlp/demos/  Cheesy

::::... :..... :::::: ;;;:::™ b23:production 2006 GNU/GPL @ http://b23prodtm.webhop.info
on sf.net: /projects/sf3jswing
Java (1.6u10 plz) Web Start pool
dev' VODcast[/ur
Offline campbell

Full Member
**

Posts: 179
Medals: 2


Java games rock!


« Reply #11 on: 2007-10-11 16:53:12 »

All: I'm ashamed that it took me over six months to update the (one line of) source code to account for the change from sync() to markDirty() in the BezierAnim3D demo. Mea culpa. I've updated the source code and webstart binaries linked in the blog entry accordingly.  I'll hopefully post a more interesting demo in the near future...

Thanks, Chris.
Offline Roxxor

JGO n00b
*

Posts: 37



« Reply #12 on: 2009-07-11 17:13:58 »

The below classes:

org.jdesktop.animation.timing.Cycle;
org.jdesktop.animation.timing.Envelope;
org.jdesktop.animation.timing.TimingController;
org.jdesktop.animation.timing.TimingEvent;
org.jdesktop.animation.timing.TimingListener;
org.jdesktop.animation.timing.interpolation.ObjectModifier;
org.jdesktop.animation.timing.interpolation.PropertyRange;

...seem to be gone now from the TimingFramework. Will there be an update of this demo soon?
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.104 seconds with 21 queries.