Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (487)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (553)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2] 3 4
  ignore  |  Print  
  Your opinion about DirectX10 and OpenGL?  (Read 23281 times)
0 Members and 1 Guest are viewing this topic.
Offline Jeff

JGO Coder




Got any cats?


« Reply #30 - Posted 2006-08-01 21:54:33 »

But if MSFT actually suceeds in killing OGL on the PC   Then we mayhave no chocie but to come up with a DX support layer for Java. 

Who's we? The Java developers or Sun?
As a Java developer I want options, not being a pawn in some company struggle or domination. I wouldn't be surprise if Sun is against supporting DirectX in Java but why should I care?

...

DirectX is the preferred low-level graphics API for gaming on Windows so why shouldn't Java support it now?

Java DOES support it now. Its called JNI.  Go write your own JNI wrappers.

But if you want Sun to provide those JNI wrappers for you then the first part of your post makes absoltuely no sense, right?


Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline uj

Junior Member





« Reply #31 - Posted 2006-08-02 08:43:06 »

[Java DOES support it now. Its called JNI.  Go write your own JNI wrappers.

Java has a native interface so it supports everything. What a convenient definition of support. Did you make it up all by yourself?

Quote
But if you want Sun to provide those JNI wrappers for you then the first part of your post makes absoltuely no sense, right?

What makes no sense?
Offline uj

Junior Member





« Reply #32 - Posted 2006-08-02 09:09:04 »

I can't say I understand why you're making such a big deal out of the DirectX thing.

Well I'm pushing the issue a little. Nothing wrong with that, is it?  Wink

Quote
Obviously nobody has felt a big enough need for a directx binding to actually go out and make one.

First Sun didn't feel a need for a JOGL. Then they did. Things change.

Quote
I think that if you choose Java as your development platform, cross platform support is probably important to some degree. If that is the case OpenGL, OpenAL and other cross platform apis seem like a natural choice.

I can understand your argument if the cross-platform ability of Java is your only reason for using it? What if you just like Java and would rather use it instead of any .NET language including J#?

The importance of being cross-platform is also very much application dependent. Is it so important to you that your new game runs on Solaris that you're prepared to lessen its chances on Windows?

You can never fully rely on the programming language to achieve cross-platformity. Sometimes you have to achieve it at the application level by supporting several alternatives that may not each be individually portable but very suitable where they do run.

Quote
If your going to develop for windows only, maybe C#/Managed DirectX is a better fit than Java in the first place.

It may be but the question I'm asking is - does it have to be that way?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline uj

Junior Member





« Reply #33 - Posted 2006-08-02 09:32:36 »

There is a choice - you can always go and use C# if you want to use DX. Since DX ties you to windows anyway you're not exactly loosing anything.

Sure but then I wouldn't be a Java programmer anymore. I could quit programming altogether too. Just imagine how many problems that would solve, apart from maybe where my next paycheck was going to come from.  Smiley

Offline dsellars

Junior Member




Need to write more games


« Reply #34 - Posted 2006-08-02 10:40:20 »

I'm probably missing somthign here but does directx actually offer any thing that opengl dosn't?

Or probably more to the point what do you want to do in directx that you can't in opengl?  Or why don't you wan to use opengl? 

From what I understand (and it is a very long time since I looked into it in any way) directx is not as friendly a api as opengl either.

I'm not trying to get into an argument on which is 'right' just trying to undrstand why there is a problem Smiley.

Best ragards
Dan.
Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #35 - Posted 2006-08-02 11:43:38 »

>I'm probably missing somthign here but does directx actually offer any thing that opengl dosn't?

Slightly higher compatibility on windows (well, depends on the dx version).

Doesnt really seem to be worth the trouble. Same like making a game run on a 300mhz cpu instead of a 500mhz one. ROI wise its unlikely to pay off. (Unless you're using some abstraction layer or some engine which handles the api differences... obviously. Which would be surely great, but not necessarily great enough for spending some years of spare time on it. Well, there is java2d which sorta kinda does that kind of thing.)

弾幕 ☆ @mahonnaiseblog
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #36 - Posted 2006-08-02 12:50:51 »

I'm probably missing somthign here but does directx actually offer any thing that opengl dosn't?
Wrong comparison. OpenGL provides roughly the same functionality as Direct3D, but DX includes more than that. However all the additional bits have their own analogs - DirectInput is wrapped with JInput, DirectSound is roughly equivilent to OpenAL. The only bit that doesn't have a direct equivilent is D3DX which is a bunch of utility classes for doing vector math, model loading, etc. But you can always find lots of java code for that kind of thing lying around.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline dsellars

Junior Member




Need to write more games


« Reply #37 - Posted 2006-08-02 12:56:23 »

ah ok.  Grin

But still there isn't really an issue here is there?  It's a bit like saing you want pepsi instead of coke?

Dan.
Offline g666

Junior Member





« Reply #38 - Posted 2006-08-02 13:42:30 »

Well dx10 is supposed to be a much more efficent api for modern cards, but future versions of opengl will probably make up for that.

desperately seeking sanity
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #39 - Posted 2006-08-02 14:05:23 »

I think the issue here is not wether or not dx is friendlier, has more features or something, I think the issue here is that dx (or more specifically, D3D) is a major rendering API with a lot of experience from D3D developers and support on (for java) the most important gaming platform, windows. Compatibility of java games on windows would probably improve, if it was using D3D instead of OGL.
IMO, it would definitely be a Good Thing if there would be a d3d wrapper for windows, although it should be clear that OGL would be the api of choice if instant cross-platformness is a requirement.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline cylab

JGO Ninja


Medals: 43



« Reply #40 - Posted 2006-08-02 15:43:53 »

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.

(...)
I could quit programming altogether too. Just imagine how many problems that would solve
(...)

... mmm-u-st... rrr-e-sist...   Lips SealedGrinTongue

Mathias - I Know What [you] Did Last Summer!
Offline Badmi

Senior Newbie




Java games rock!


« Reply #41 - Posted 2006-08-03 03:01:31 »

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.
Offline Jeff

JGO Coder




Got any cats?


« Reply #42 - Posted 2006-08-03 03:30:17 »

[Java DOES support it now. Its called JNI.  Go write your own JNI wrappers.

Java has a native interface so it supports everything. What a convenient definition of support. Did you make it up all by yourself?

Quote
But if you want Sun to provide those JNI wrappers for you then the first part of your post makes absoltuely no sense, right?

What makes no sense?


You

<troll filter engaged>

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline uj

Junior Member





« Reply #43 - Posted 2006-08-03 03:59:18 »

Quote
What makes no sense?

You

<troll filter engaged>

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.
Offline uj

Junior Member





« Reply #44 - Posted 2006-08-03 04:48:29 »

I think "freedom of choice" is really the only good answer to the "Why no DX" question.   And it addressse both sides:

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.  Smiley

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

Junior Member




Java games rock!


« Reply #45 - Posted 2006-08-03 06:49:11 »

Quote
So in the name of the greater good the individual has to give - Java shouldn't support DirectX.
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
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 783
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #46 - Posted 2006-08-03 07:27:10 »

I think the issue here is not wether or not dx is friendlier, has more features or something, I think the issue here is that dx (or more specifically, D3D) is a major rendering API with a lot of experience from D3D developers and support on (for java) the most important gaming platform, windows. Compatibility of java games on windows would probably improve, if it was using D3D instead of OGL.
IMO, it would definitely be a Good Thing if there would be a d3d wrapper for windows, although it should be clear that OGL would be the api of choice if instant cross-platformness is a requirement.

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.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #47 - Posted 2006-08-03 08:40:23 »

I think the issue here is not wether or not dx is friendlier, has more features or something, I think the issue here is that dx (or more specifically, D3D) is a major rendering API with a lot of experience from D3D developers and support on (for java) the most important gaming platform, windows. Compatibility of java games on windows would probably improve, if it was using D3D instead of OGL.
IMO, it would definitely be a Good Thing if there would be a d3d wrapper for windows, although it should be clear that OGL would be the api of choice if instant cross-platformness is a requirement.

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  Smiley. 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.

Offline princec

JGO Kernel


Medals: 365
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #48 - Posted 2006-08-03 10:51:48 »

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

Cas Smiley

Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #49 - Posted 2006-08-03 23:50:54 »

Think of all the knowledge and experience we'll gain once we support DX and developers begin to flood in.

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.

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #50 - Posted 2006-08-04 07:37:30 »

Quote
Why would that attract developers to Java?  You wouldn't get the cross-platform benefit so if you are sticking to Windows
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.
Oh I agree, but a good starting point for that would be a java D3D binding, wouldn't it?   Cheesy


Offline uj

Junior Member





« Reply #51 - Posted 2006-08-06 06:40:40 »

I will spare you all the rant about competition being "good" when it is coming from an evil monopolist that can 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.

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?


Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #52 - Posted 2006-08-06 09:12:27 »

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? Roll Eyes)

弾幕 ☆ @mahonnaiseblog
Offline zingbat

Senior Member




Java games rock!


« Reply #53 - Posted 2006-08-06 12:08:18 »

What reasons would there be for Java not to support it? To put Java at a disadvantage so people will use C++ instead?

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.

Is that such a good way of channelling your hatred of Microsoft?

No it's because Microsoft is evil and we are doing it for your own good.  Grin

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. Grin
Offline zero

Junior Member





« Reply #54 - Posted 2006-08-06 12:19:05 »

DirectX uses the left handed coordinate system with Y up for no reason besides complicating.

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

Offline zingbat

Senior Member




Java games rock!


« Reply #55 - Posted 2006-08-06 15:08:40 »

That's simply wrong: you can choose between a left-handed and a right-handed coordinate system in Direct3D

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

- and freedom of choice is a good thing as some have noted here Wink

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.
Offline zero

Junior Member





« Reply #56 - Posted 2006-08-06 15:53:34 »


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.


so you can use a right-handed CS by calling functionRH instead of functionLH and reverse backface culling..



- and freedom of choice is a good thing as some have noted here Wink

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.

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
Offline zingbat

Senior Member




Java games rock!


« Reply #57 - Posted 2006-08-06 19:34:03 »

so you can use a right-handed CS by calling functionRH instead of functionLH and reverse backface culling..

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.
Offline zero

Junior Member





« Reply #58 - Posted 2006-08-06 19:50:59 »

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!
Offline Amos Wenger

Senior Member




Everything's possible, but not everything's fun...


« Reply #59 - Posted 2006-08-07 12:19:14 »

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)

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Pages: 1 [2] 3 4
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

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

The first screenshot will be displayed as a thumbnail.

TehJavaDev (14 views)
2014-08-28 18:26:30

CopyableCougar4 (25 views)
2014-08-22 19:31:30

atombrot (38 views)
2014-08-19 09:29:53

Tekkerue (33 views)
2014-08-16 06:45:27

Tekkerue (32 views)
2014-08-16 06:22:17

Tekkerue (19 views)
2014-08-16 06:20:21

Tekkerue (29 views)
2014-08-16 06:12:11

Rayexar (66 views)
2014-08-11 02:49:23

BurntPizza (42 views)
2014-08-09 21:09:32

BurntPizza (34 views)
2014-08-08 02:01:56
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!