LWJGL Forum

Archive => DirectX => Topic started by: CaptainJester on August 02, 2007, 02:03:24

Title: Update. Success!
Post by: CaptainJester on August 02, 2007, 02:03:24
Woo hoo, I finally got Direct 3D to display a Triangle in LWJGL.  It's not much, but it is a start.  There are still some minor problems with the Display messages, but at least I can move forward now.

(http://www.myjavaserver.com/~captainjester/DirectXScreen.gif)
Title: Re: Update. Success!
Post by: Matzon on August 02, 2007, 05:56:16
When are you ready to put something into SVN ?
I am eager to get some more eyes on it, especially with gaarazero code hanging around too

I imagine it living in org.lwjgl.directx
Title: Re: Update. Success!
Post by: Evil-Devil on August 02, 2007, 11:55:32
Very nice :)
Any chance for small demo app?
Title: Re: Update. Success!
Post by: CaptainJester on August 02, 2007, 12:02:40
Quote from: Matzon on August 02, 2007, 05:56:16
When are you ready to put something into SVN ?
I am eager to get some more eyes on it, especially with gaarazero code hanging around too

I imagine it living in org.lwjgl.directx

I can put it in anytime.  The package is org.lwjgl.d3d.

I'll put it in today.
Title: Re: Update. Success!
Post by: CaptainJester on August 02, 2007, 12:03:32
Quote from: Evil-Devil on August 02, 2007, 11:55:32
Very nice :)
Any chance for small demo app?

Not yet.  Need to add more funcitonality and fix the Display messaging issues.
Title: Re: Update. Success!
Post by: Matzon on August 02, 2007, 12:14:35
Could you make a source drop before adding it to SVN ?
Would probably be nice to go over it before adding it all
Title: Re: Update. Success!
Post by: CaptainJester on August 02, 2007, 12:53:01
Sure.  You can get the source here: http://www.myjavaserver.com/~captainjester/lwjgld3d.zip (http://www.myjavaserver.com/~captainjester/lwjgld3d.zip)

Once you are ready for me to add it to SVN, I need to be given permissions to the repository.

It shouldn't cause any problems.  No code outside the org.lwjgl.d3d package has been changed.
Title: Re: Update. Success!
Post by: gaarazero on August 02, 2007, 16:12:59
Quote from: CaptainJester on August 02, 2007, 12:53:01
Sure.  You can get the source here: http://www.myjavaserver.com/~captainjester/lwjgld3d.zip (http://www.myjavaserver.com/~captainjester/lwjgld3d.zip)

Sweet!  I'll definitely be reading over this.  :)

When I was making mine, at first I used the Java 'long' to store the pointers to the devices, but found it not to work some times.  I think it was because the Java 'long' is 64 bits and the C 'long', on my computer at least, is 32 bits.  'jint' is defined as a C 'long' so thats why I switched to the Java 'int' to store the pointers.  A 'jlong' is defined as a '__int64'.  Switching to the Java 'int' made it work a lot better.  Just something if your having some problems.

Quote from: Matzon on August 02, 2007, 05:56:16
I imagine it living in org.lwjgl.directx
Me too.  :P

-gz
Title: Re: Update. Success!
Post by: CaptainJester on August 03, 2007, 00:59:38
I will be going on vacation for the next week.  So nothing will be added to SVN until I get back.  If someone could give me SVN access, I can do it when I return.
Title: Re: Update. Success!
Post by: CaptainJester on August 03, 2007, 11:12:27
One more thing.  I forgot to include a test case for the code.  I have added it to the zip and uploaded it to the server.  If you grab it again, you can try the test case out.  There is a problem with Display and Keyboard, however.  You will have to terminate the process to end the test case.  Or in Eclipse, just push the stop button on the console.
Title: Re: Update. Success!
Post by: Matzon on August 05, 2007, 22:09:23
a quick glance over the code and it looks fine.
However the code duplication should be possible to get rid of?
can't you just use the existing window creation code and then grab the hwnd ?
Title: Re: Update. Success!
Post by: CaptainJester on August 12, 2007, 17:20:41
I talked to Cas and he suggested that I copy over the needed code.  I agreed.  I also found a lot of OpenGL dependencies that I had to get rid of.  Once I get it working, I might be able to bring all the code togther to make it less of a mess.  Right now I'll concentrate on getting all the native code put in and debugging the current problems.
Title: Re: Update. Success!
Post by: elias on August 13, 2007, 22:52:45
Copying code is probably the fastest way to get something interesting on the screen. And we'll probably have to abstract out some opengl dependencies before we can fit in direct3d support. I'll try and help with that as much as possible when you code is mature enough.

- elias
Title: Re: Update. Success!
Post by: gus0650 on September 07, 2007, 09:17:11
Jester, this is FANTASTIC!!

In our game (runs as Applet), we are having so many problems with users who don't have OpenGL enabled graphics drivers.

Being able to offer DX as an alternative to OpenGL would totally boost our customer base.

Please keep up the good work! Three thumbs up!!!