Your opinion about DirectX10 and OpenGL?

Actually I am surprised that noone created a DX binding for java by now…

To me it seems clear that such an effort has to arise out of the community and can’t be pushed by SUN, since the “write once, run everywhere” buzz is a central point of JAVAs marketing strategy. Providing a platform dependent official library simply does not match with that.

… mmm-u-st… rrr-e-sist… :-X;D:P

Some people seem to be afraid that Microsoft will sabotage there OpenGL binding for vista. I think that would be extremely unlikely because it would mean many games will not work on vista witch would deter people to switch, Microsoft’s biggest fear.

You

Your authorative style doesn’t impress me at all. From what I know Sun employees haven’t been granted any special rights here. It’s a discussion forum and not a place where you tell people what to think. If you have no arguments then why not just exercise your right to remain silent.

Interesting argumentation in the utilitarian tradition. You start with the proposition that “Java shouldn’t support DirectX”. Then you continue to compare the impact of this for two parties, namely “society” as a whole on one hand and the individual developer on the other. You arrive at the conclussion that your proposition is justified because “society” has more to gain than the individual developer has to lose.

So in the name of the greater good the individual has to give - Java shouldn’t support DirectX. It’s just that in my book the balance looks different. I think it’s more to gain if the individual Java developer is given the chance to come up with the next killer game using DirectX if he so wishes (*).

So here we stand. :slight_smile:

(*) I’m talking about a real chance here which requires an existing and supported DirectX binding for Java.

[quote]So in the name of the greater good the individual has to give - Java shouldn’t support DirectX.
[/quote]
As has been said before, exposing a platform specific api doesn’t fit well with the whole java wora philosophy. For that reason there will probably never be a jsr for a directx binding. As far as I know there’s no precedent for that (correct me if I’m wrong here please).
I don’t think anybody’s saying that there should never be a java direct3d binding, but if sun isn’t interested and nobody in the community is motivated enough to make a binding, then nothing’s going to happen.
The way I see it this leaves you with a couple of options

  • Make a direct3d binding yourself. As Jeff said, nothing’s preventing you from doing it via JNI. This is no different from the way the opengl bindings are implemented
  • Find a way to motivate someone to make it for you
  • Use opengl instead :wink:

This is actually pretty interesting. Think of all the knowledge and experience we’ll gain once we support DX and developers begin to flood in.

Further, choice is good, even if the other choice is considered ‘less’ for one or more reasons, which might not apply for certain developers.

Yes, exactly my thoughts :). We need to be a little bit more practical.
To me it makes sense that Sun won’t be investing in a D3D binding, but java is not just Sun. No need to blame them for not having D3D in java, there’s nothing really stopping us from doing it ourselves.
For making porting easier, we can also think about delegating D3D functions to OGL calls on other platforms.

Elias and I talked about adding a D3D binding to LWJGL as an optional add-on. Basically all it needs is volunteers.

Cas :slight_smile:

[quote=“Riven,post:47,topic:27824”]
Why would that attract developers to Java? You wouldn’t get the cross-platform benefit so if you are sticking to Windows you already have the CLR and managed code to get similar benefits to Java… granted the tools still don’t compare to what Java offers… but I just don’t see Direct X/3D support as a motivating factor.

I think it makes much more sense to have Direct X/3D support just like the Java 3D team did it… where it is completely hidden behind a more portable framework. JInput seems to work like that as well. I actually wish that Sun would improve Java sound so things like OpenAL bindings weren’t needed.

Supporting the 3D on Windows in the most compatible/stable way makes sense… but not if I have to write Windows-only code. As I understand it Windows will have OpenGL 1.4 emulation via Direct 3D - They should open source that so people can keep it up to date with the latest OpenGL specs and simply let that BE the way OpenGL works on Windows. As long as the full OpenGL spec is supported without a significant performance hit that’s all that really matters. It would make more sense for Microsoft to not put the burden of Direct X and OpenGL support on the graphics card driver writers anyway. Get them to do good Direct 3D implementations only and then have one Open GL implementation that was very stable, layered on top of Direct 3D. As long as it worked “good enough” everyone would be happy.

I will spare you all the rant about competition being “good” when it is coming from an evil monopolist that doesn’t have “real” competition because of the monopoly. If it wasn’t Microsoft behind Direct 3D I would welcome the competition for another cross-platform 3D API. Direct 3D isn’t cross-platform though and it is supported by a criminal company that has never done anything to support the computing industry on good will.

[quote]Why would that attract developers to Java? You wouldn’t get the cross-platform benefit so if you are sticking to Windows
[/quote]
Well, it’s just a rendering API. Everything else will still be as portable if the windows-only game turns out to be successful enough to port it to other systems if the need should arise later. CLR doesn’t give you that kind of portability even you would use OGL (unless you want to take a risk and use mono).

[quote]I think it makes much more sense to have Direct X/3D support just like the Java 3D team did it… where it is completely hidden behind a more portable framework.
[/quote]
Oh I agree, but a good starting point for that would be a java D3D binding, wouldn’t it? :smiley:

I suppose this is the true resaon why many people oppose DirectX for Java. It’s because Microsoft is behind it.

Java is highly portable but that doesn’t mean it cannot be used with non-portable API’s. Think of Java as just another programming language and DirectX as just another non-portable API. What reasons would there be for Java not to support it? To put Java at a disadvantage so people will use C++ instead? Is that such a good way of channelling your hatred of Microsoft?

Oh please.

The vast majority isnt against a DX binding in any way, but that doesnt mean that they go ahead and write one. You also didnt write one. Is that your way to channel your hatred of Microsoft?

(Cant you see how flawed that reasoning is? ::))

Theres the obvious reason that people will waste resources on it and very few games support both apis at the same time. The reason is that you don’t just have to do a binding like that you have to provide fixes for all the major screwups from ati and nvidia drivers running in tipical system configurations. That is if you want a prophessional binding. Just binding it directly to the API would not solve shit.

Also everything we need to make great games is provided by jogl with several driver fixes already in place. No way in hell i would wish for someone to have to go with that driver bug hunting again for a directx binding. But if anyone is masochist enough go ahead and try it. Theres just no point on doing it for someone who just wants to do a game. And you certainly don’t need to go to C++ because you have a fully functional cg api that is as good as directx and much more portable.

No it’s because Microsoft is evil and we are doing it for your own good. ;D

People are disgusted with Microsoft for a reason. If not look at just a few decisions made by them to turn cg apis for PCs into a swamp. Its their usual war tactics of dividing to conquer. DirectX uses the left handed coordinate system with Y up for no reason besides complicating. UV coordinates are screen cordinates with (0,0) being the top-left corner and Y going down again for no reason. To complicate things even further they store matrix data in the same order (column-major) as opengl does and thats because its easy to make calculations. It’s no wander that people try to avoid DX shit whenever they have a chance.

Because MS wants to make you her bitch. ;D

That’s simply wrong: you can choose between a left-handed and a right-handed coordinate system in Direct3D - and freedom of choice is a good thing as some have noted here :wink:

Microsoft docs cleary state it is left-handed.
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_m/directx/direct3d/gettingstarted/3dcoordinatesystems/coordinatesystems.asp

So who’s taking away your freedom of choice? Im just pointing out some reasons why in my opinion this would be only freedom to waste your time. But go ahead, do a D3D binding and show im wrong.

On that site you can read:

[quote]To obtain what amounts to a right-handed world, use the PerspectiveRH and PerspectiveLH methods to define the projection transform. However, be careful to use the corresponding LookAtRH function, reverse the backface-culling order, and lay out the cube maps accordingly.
[/quote]
so you can use a right-handed CS by calling functionRH instead of functionLH and reverse backface culling…

I never wrote that I wanted a D3D-Binding … in contrast, some posts earliar I said that I this doesn’t make sense IMHO, because Managed DX will always be one step ahead… all I wanted to say is that anyone who wants to write one should do that, as you noted too

My point is not if you can use that system or not. You can simulate any cs you want in any graphics 3d api. DirectX is still a left-handed coordinate system unless you write some code to simulate a different one. Besides it’s not just as simple as flipping the camera and reverse backface culling. Read the rest.

[quote]Microsoft Direct3D uses a left-handed coordinate system. If you are porting an application that is based on a right-handed coordinate system, you must make two changes to the data passed to Direct3D.

* Flip the order of triangle vertices so that the system traverses them clockwise from the front. In other words, if the vertices are v0, v1, v2, pass them to Direct3D as v0, v2, v1.
* Use the view matrix to scale world space by -1 in the z direction. To do this, flip the sign of the M31, M32, M33, and M34 fields of the Matrix structure that you use for your view matrix.

To obtain what amounts to a right-handed world, use the PerspectiveRH and PerspectiveLH methods to define the projection transform. However, be careful to use the corresponding LookAtRH function, reverse the backface-culling order, and lay out the cube maps accordingly.

Although left-handed and right-handed coordinates are the most common systems, there is a variety of other coordinate systems used in 3-D software. For example, it is not unusual for 3-D modeling applications to use a coordinate system in which the y-axis points toward or away from the viewer, and the z-axis points up. In this case, right-handedness is defined as any positive axis (x, y, or z) pointing toward the viewer. Left-handedness is defined as any positive axis (x, y, or z) pointing away from the viewer. If you are porting a left-handed modeling application where the z-axis points up, you must do a rotation on all the vertex data in addition to the previous steps.

The essential operations performed on objects defined in a 3-D coordinate system are translation, rotation, and scaling. You can combine these basic transformations to create a transform matrix.

When you combine these operations, the results are not commutative: the order in which you multiply matrices is important.
[/quote]

Flipping the order of triangle vertices and and adjusting the matrices is needed for converting the data from RH to LH. By dying so, you will to call functionLH…

If you want to use a right hand CD and your data is defeined in right-handed CS, you have to use functionRH and only reverse the cull-mode (and s.th. for cube maps…). Not using cube maps means changing exaclty one flag more when using a RH insterad of an LH CS!

I think what “uj” is trying to do is to prevent Java from becoming a widely used gaming development platform by sucking in devs time in worthless and endless discussions.

(Do you remember his wonderful troll about C++/Java)