Jump to content

  • Log In with Google      Sign In   
  • Create Account


[java] Any experience with DirectX under MS Java?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 javanerd   Members   -  Reputation: 122

Like
Likes
Like

Posted 16 February 2000 - 06:05 AM

I''ve got one implementation of the engines in my GameFrame for Java library that uses DirectX 3.0 under Microsoft Java 3.x or higher. But I''ve ran into couple of problems with it. The first problem is that there seems to be no support for semitransparent DDSurfaces under that version of DirectDraw. This is quite stupid as it can be done under Java 1.1 and Java 2. Is this really the case or am I missing something? The second problem is that there seems to be no way to get hold of the raw DirectDrawSurface data. The bitmap effects (rotation, flip, color replacing etc.) I''ve implemented reload the used bitmap with pure Java code, process it and then save it to a temporary file that is then loaded by DirectX as a new DDSurface. Needles to say that is sssslllloooowwww process. Again am I missing something or is this just one more stupid truncation of the DirectDraw API when you use the Microsoft''s DirectX for Java thingie. If both cases are true, then I think I either will have to abandon DirectX at some point OR write C++ wrapper that uses DirectX 5.0/6.0/7.0 and that is then accessed from Java through JNI.

Sponsor:

#2 Ingenu   Members   -  Reputation: 875

Like
Likes
Like

Posted 17 February 2000 - 09:02 PM

mmhhh...
Well, you can go to the java.sun site, and there you''ll find Java3d api for Direct3D...
It should help you.
I don''t know if it allow access to other DirectX elements, but I know it include 3Dsound api.

Hope it helps.


-* Sounds, music and story makes the difference between good and great games *-

#3 javanerd   Members   -  Reputation: 122

Like
Likes
Like

Posted 22 February 2000 - 10:08 PM

Ummm... Sorry but that is of no help at all. I''m not trying to use any 3D stuff here.

I''m allready using the DirectDraw for 2D graphics in one of my engines, but these aforementioned points are like splinters under my fingernails. Every time I try to do something more involved than just load a bitmap and draw it on the screen I get set back by the non-complete Java to DirectX API mappings. I just wanted to know if anyone has found some kind of magical workaround to these limitations.

3D sound? Well that could be fun, but I''d satisfy in some sort of level and panning settings in Java 2''s audio clips. Or better yet, access to some low level mixing abilities where I could e.g. unpack MP3 stream and mix it to the sound effects stream. Propably I should be able to do this kind of stuff with Java Media API, but my experiences with that API otherwise aren''t that good. E.g. it has a huge latency (the time between the moment I tell a sound to play to the moment it actually can be heard).

#4 Ingenu   Members   -  Reputation: 875

Like
Likes
Like

Posted 22 February 2000 - 11:08 PM

Ok, I understand the problem.
It''s pointers matter.
Although JAVA had pointers, they''re hidden.
Not sure you can use them with DirectX...

Something that I don''t understand, is why using JAVA with DirectX ?
C++ with DirectX will be fast but for WIN32 only, while JAVA with OpenGL is available for many platform, so it could be interesting.

If you don''t use OpenGL I think that id Java2d don''t use DX, you''ll have to write a wrapper, which will take much tims.

DDraw and DirectX is a low featured API, it''s not well implemented and had high end feature while forgeting sme basic ones...

If you want to switch to JAVA+OpenGL, tell me I''m interested in doing that.


-* Sounds, music and story makes the difference between good and great games *-




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS