Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.

Guest Anonymous Poster

d. buffering with Directx in Java

This topic is 6864 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

__Java and DirectX?! That might be your problem right there.
__Well, if it isn't I (unfortunately) can't help. I'm geared toward OpenGL (and don't know much about it, either.) I took my Java class in the Business Department at college so someone, please, correct me if I'm wrong.
__Animation is usually done via multithreading in Java. (Java automatically handles multithreading.) Basically one thread is used to repaint the screen while the other monitors the clock and triggers the first thread (indirectly, I believe) when it is time to repaint. I never had a chance to get it working right (too many other assignments.)
__As for the error(s), it could just be you forgot to handle ("catch") exceptions that are normally thrown by DirectX. Exceptions happen a LOT in Java, especially with input.

[This message has been edited by SonicSilcion (edited December 29, 1999).]

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
Thanks, I will check that out. As you can imagine I am having a very hard time finding anyone else who has worked with Directx and Java. Other than the documentation that came with the Microsoft Java SDK I haven't found much information on it

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
I want to get rid of the flicker when my screen gets updated but I am unable to get double buffering working with Directx and Java. When I run it the applet gives me a "com.ms.com.ComFailException:Unknown error
(0x887600647)". This happens if I set either the "DDSD_BACKBUFFERCOUNT"
or the "DDSCAPS_FLIP" or "DSCAPS_COMPLEX" flags. In the examples I have
seen these flags seem to be necessary for double buffering.

This is my code:
ddsd = new DDSurfaceDesc();
ddsd.backBufferCount = 1;
ddsPrimary = dd.createSurface(ddsd);

I'm hoping that I'm just missing a step. If anyone has done this and
can send me a working example of double buffering with Directx in Java
it would be greatly appreciated. Thanks.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!