Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (117)
games submitted by our members
Games in WIP (564)
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: Xith3d release + newest JOGL release? on: 2006-04-20 01:23:50
Well, I bit the bulllet and got the latest CVS. After changing the CubeTest to use jsr231, all seems well.

I would recommend though that you guys update your downloadable build a little more often, and maybe update the demos so that they can use different renderers "out of the box". It would lower the initial frustration somewhat. It was easy for me because I'm on Mac OS X and CVS is "built in", but Windows people might not be happy with the trouble they have to go to just to get a working build. Also, it might help if there was a more prominent link on the xith3d.org page to the CVS - on initial glance, it looks like the release is all that is there.
2  Java Game APIs & Engines / Xith3D Forums / Re: Xith3d release + newest JOGL release? on: 2006-04-16 18:34:41
Hmmm. That's not really a good solution for me. I'd like to be able to keep that version of JOGL since I already have code that works with it. I'd love to try out Xith3d. Will newer versions of Xith3d support the new JOGL? When can we expect a new release? Are there developer builds that already support the new JOGL?

Thanks
3  Java Game APIs & Engines / Xith3D Forums / Xith3d release + newest JOGL release? on: 2006-04-15 22:22:37
I already had a JOGL release installed (JSR-231 beta 03, Feb 17 2006) when I installed the Xith3D release (Aug-31-2005), but they don't seem compatible. When I try "java -cp libs/xith3d.jar com.xith3d.test.CubeTest", I get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: net/java/games/jogl/GLEventListener

I know JOGL works, because I've used it in other programs. Looking at the JOGL library, there is no net.java.games.jogl package. So, I'm guessing that JOGL has changed and Xith hasn't caught up? Or is there something else going on? Can someone please explain?
4  Game Development / Newbie & Debugging Questions / Re: "Capturing" the mouse in a Frame or JPanel on: 2006-03-10 23:28:36
I never would have thought to look there .. thanks all.
5  Game Development / Newbie & Debugging Questions / Re: Reading an Image into an IntBuffer for textures on: 2006-03-10 23:28:07
If you're using jogl, consider the com.sun.opengl.util.texture package. It lets you do this:

1  
2  
3  
Texture myTexture;
URL url = new URL("data/texture.png");
myTexture = TextureIO.newTexture(url, mipmapped, null);


(you need some exception handling in there too, but you get the gist)

Then, when you want to use the texture in your rendering:

1  
myTexture.bind();


Pretty simple.
6  Game Development / Newbie & Debugging Questions / "Capturing" the mouse in a Frame or JPanel on: 2006-03-10 23:08:31
When the user puts the mouse cursor in a certain frame, I would like to make the pointer disappear and capture the mouse's movement until the button is released. However, I'd ALSO like the mouse cursor to remain where it was when the user originally started the drag.

I understand how to use MouseListener, MouseMotionListener, and MouseWheelListener, and I'm also pretty sure I can make the cursor disappear. The tricky part seems to be keeping the mouse cursor from moving. How can I do that? Is there some way I can move the cursor to an arbitrary point? It seems like there is probably an interface to do that, but I can't find it...

Thanks.
7  Java Game APIs & Engines / Java 2D / Re: Drawing to off-screen buffer on: 2003-02-09 15:55:16
Yes, I believe you are correct. Thanks for replying!
8  Java Game APIs & Engines / Java 2D / Re: Drawing to off-screen buffer on: 2003-02-08 16:39:13
well, this is just an example that I cooked up. I'm trying to pre-render some images to blit during the display process, and this was just a test to figure out how to do it.

There must be something simple that I'm missing here!
9  Java Game APIs & Engines / Java 2D / Drawing to off-screen buffer on: 2003-02-07 20:44:03
Can anyone tell me why this code puts a white rectangle on the screen as opposed to a red one? There is something simple that I'm missing.

Also, is my second call to getDefaultConfiguration necessary?


1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
    public FullScreenTest3(int numBuffers, GraphicsDevice device) {
        try {

            GraphicsConfiguration gc = device.getDefaultConfiguration();
           
            mainFrame = new Frame(gc);

            mainFrame.addKeyListener(new KeyAdapter() {
                public void keyTyped(KeyEvent e)
                {
                    char keyChar = e.getKeyChar();
                    if (keyChar=='q' || keyChar=='Q') {
                        quitFlag = true;
                    }
                } });
           
                                       
            mainFrame.setUndecorated(true);
            mainFrame.setIgnoreRepaint(true);
            device.setFullScreenWindow(mainFrame);
            if (device.isDisplayChangeSupported()) {
                chooseBestDisplayMode(device);
            }

            gc = device.getDefaultConfiguration();

            myImage = gc.createCompatibleImage(16, 16);
            myImage.getGraphics().setColor(Color.red);
            myImage.getGraphics().fillRect(0,0,16,16);

            /*
            ** added this to avoid race condition
            */

            Thread.sleep(1000);
            mainFrame.createBufferStrategy(numBuffers);
            BufferStrategy bufferStrategy = mainFrame.getBufferStrategy();
            while (quitFlag == false) {
                Graphics g = bufferStrategy.getDrawGraphics();
                if (!bufferStrategy.contentsLost()) {

                    g.setColor(Color.black);
                    g.fillRect(0,0,SCREEN_WIDTH,SCREEN_HEIGHT);

                    g.drawImage(myImage, 200, 200, null);

                    bufferStrategy.show();
                    g.dispose();
                }
                try {
                    Thread.sleep(lag);
                } catch (InterruptedException e) {}
            }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            device.setFullScreenWindow(null);
        }
    }
Pages: [1]
 

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

The first screenshot will be displayed as a thumbnail.

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

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

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

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

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

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

BurntPizza (33 views)
2014-09-19 03:14:18

Dwinin (48 views)
2014-09-12 09:08:26

Norakomi (75 views)
2014-09-10 13:57:51

TehJavaDev (107 views)
2014-09-10 06:39:09
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!