org.lwjgl.d3d Progress / Thoughts

Started by gaarazero, March 13, 2008, 18:07:42

Previous topic - Next topic

elias

Quote from: princec on March 23, 2008, 22:29:19
That's probably not so much of an issue as it at first sounds because most people can ship a current VM with bigger projects and for smaller projects... meh who cares :) About time people upgraded!

Cas :)

There's always the ever-present problem with Mac OS X 10.3 and not being able to upgrade to 1.5. Not supporting OS X 10.3 would be stupid, IMHO.

- elias

elias

...Of course there's the possibility of splitting lwjgl in multiple jars, some 1.4 compatible, some 1.5 compatible:

1. lwjgl-core.jar with Display, Mouse, Keyboard and support classes for the other packages (1.4)
2. lwjgl-gl2.jar with GL*, ARB* (1.4)
3. lwjgl-d3d.jar with everything d3d related (1.5 since it will only be used on windows, where we can require 1.5)
4. lwjgl-gl3.jar with everything gl3 related (might as well be 1.5 since mac os x 10.3 will probably never support gl3)

5. lwjgl_util.jar, lwjgl_applet etc. (1.4)

the native dlls might be split up accordingly but it's not as important, compatibility wise.

- elias

Matzon

so Mac 10.3 will be able to run DX ? ;)
we require 1.5 to compile anyway - so I dont see a problem.

elias

We only require 1.5 in the pre-process compiling, the actual lwjgl.jar is compiled to java 1.4. And yes, you can allow the 1.5 requirement if all d3d code is split from the main lwjgl.jar.

- elias

princec

Here's a thought - is there any useful generification could be done in the util / applet packages that might require 1.5? And could it then be Retroweaved to 1.4?

Oh and while I'm thinking about this - could we please change the build output so that LWJGL downloads as one single fat zip instead of lots of little zips that all unzip to slightly different root directories? Or at least, a single fat zip containing all the other zips, and all pointing at the same root?

Cas :)

elias

Quote from: princec on March 24, 2008, 10:09:27
Here's a thought - is there any useful generification could be done in the util / applet packages that might require 1.5? And could it then be Retroweaved to 1.4?

I would think most 1.5 work could be layered upon a 1.4 core. I'm not quite sure how Enums is done, but I would suspect that the actual HRESULT (int) returning methods would exist in core regardless and that the translation to/from enums would be done by a separate layer anyway (along with the exception mapping?).

- elias

princec

Yes, a wrapper layer to Javafy the API would be best.

Cas :)

kappa

do agree that there are too many LWJGL packages (lazy), one big bundle would be nice.

P.S. princec i think your signature is missing a "[" at the beginning :)

princec

Now how the hell has that happened? I haven't changed that sig in years.

Cas :)

Matzon

Quote from: princec on March 24, 2008, 18:33:56
Now how the hell has that happened? I haven't changed that sig in years.

Cas :)
when we upgraded to SMF - something broke  :-*

gaarazero

Getting back on track here...

To make this wrapper as much 1:1 as possible, enums should be used since the original API is type safe.  Instead of using the built in Enums 1.5 has, I could just use the 'Enum Pattern' to make it run in 1.4, but still have type safe values.  Either way, they both do the same thing.

I started implementing the Display class over the weekend.  Once that and the device interface are done, I'd like to release a pre-pre-alpha.  Here is the link for the D3D documentation, so those who are not familiar with it wont be flabbergasted, too much, when looking at the example code.

-gz
JNewton 0.8 - Newton Dynamics wrapper for Java!
org.lwjgl.d3d - Currently Working On

elias

Quote from: gaarazero on March 24, 2008, 20:19:51
I started implementing the Display class over the weekend.

Eventually, the original Display (and AWTGLCanvas) of LWJGL should be able to handle d3d (and gl3) contexts, so don't waste too much time on this.

- elias

elias

Another small niggle I came to think of: Should the package name be org.lwjgl.d3d9, anticipating a future org.lwjgl.d3d10? I'm under the impression that the two APIs are similar but still distinct enough that they can't be used at the same time (like for example GL11 and GL12).

- elias

princec

AFAIK D3D9 and D3D10 are fairly dissimilar beasts so we should probably want to keep them separate.

Cas :)

gaarazero

Quote from: elias on March 24, 2008, 21:38:24
Eventually, the original Display (and AWTGLCanvas) of LWJGL should be able to handle d3d (and gl3) contexts, so don't waste too much time on this.
Thanks, that's good to know :).

And yes, D3D9 and D3D10 are quite dissimilar.  Separating them would be a good idea.

-gz
JNewton 0.8 - Newton Dynamics wrapper for Java!
org.lwjgl.d3d - Currently Working On