Main Menu

Update. Success!

Started by CaptainJester, August 02, 2007, 02:03:24

Previous topic - Next topic

CaptainJester

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.

The problems of this world cannot possibly be solved by skeptics or cynics whose horizons are limited by the obvious realities.  We need men and women who can dream of things that never were. - John Fitzgerald Kennedy(35th US President)
8)

Matzon

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

Evil-Devil

Very nice :)
Any chance for small demo app?

CaptainJester

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.
The problems of this world cannot possibly be solved by skeptics or cynics whose horizons are limited by the obvious realities.  We need men and women who can dream of things that never were. - John Fitzgerald Kennedy(35th US President)
8)

CaptainJester

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.
The problems of this world cannot possibly be solved by skeptics or cynics whose horizons are limited by the obvious realities.  We need men and women who can dream of things that never were. - John Fitzgerald Kennedy(35th US President)
8)

Matzon

Could you make a source drop before adding it to SVN ?
Would probably be nice to go over it before adding it all

CaptainJester

Sure.  You can get the source here: 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.
The problems of this world cannot possibly be solved by skeptics or cynics whose horizons are limited by the obvious realities.  We need men and women who can dream of things that never were. - John Fitzgerald Kennedy(35th US President)
8)

gaarazero

Quote from: CaptainJester on August 02, 2007, 12:53:01
Sure.  You can get the source here: 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
JNewton 0.8 - Newton Dynamics wrapper for Java!
org.lwjgl.d3d - Currently Working On

CaptainJester

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.
The problems of this world cannot possibly be solved by skeptics or cynics whose horizons are limited by the obvious realities.  We need men and women who can dream of things that never were. - John Fitzgerald Kennedy(35th US President)
8)

CaptainJester

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.
The problems of this world cannot possibly be solved by skeptics or cynics whose horizons are limited by the obvious realities.  We need men and women who can dream of things that never were. - John Fitzgerald Kennedy(35th US President)
8)

Matzon

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 ?

CaptainJester

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.
The problems of this world cannot possibly be solved by skeptics or cynics whose horizons are limited by the obvious realities.  We need men and women who can dream of things that never were. - John Fitzgerald Kennedy(35th US President)
8)

elias

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

gus0650

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!!!