Archived

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

openGl and java

This topic is 5622 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

Hi every one this is a great site its my first time here and this is my first topic i had a question and a problem q= we (my team) are making a game in java and i really wanne add some good 3d graphics to it so i thought why not 3d, i donwloaded j3d and every thing but would you think it be better idea if we use openGL its so much powerfull right and it would run on every comptuer since our code will be java, but we will game be slow since the engine will be in java using openGl ? p= i dont knwo if this is a right forum for this problem that i have sorry if its not please help if you can thank you i downloaed openGl for java from sun webstie but when i install it my compiler,(JBULIDER 7) dosnot see gl4 package or packages related to OpenGl did any one had this problem if so how did you solve it thanks in advance OpenGl fan Amir =) here is our site for the project i was telling you about that i was invovled in http://www.mycgiserver.com/~game/main.jsp

Share this post


Link to post
Share on other sites
quote:

...i donwloaded j3d and every thing but would you think it be better idea if we use openGL its so much powerfull right and it would run on every comptuer since our code will be java, but we will game be slow since the engine will be in java using openGl ?


I''m not sur to have precisely understood the question (what a long sentence!).

quote:

i donwloaded j3d and every thing but would you think it be better idea if we use openGL


Java3D uses openGL !

quote:

but we will game be slow since the engine will be in java using openGl ?


openGL''s performances are quite good. The more important question is about java, it''s rapidity was an issue for a long time since it was far away from c++''s speed. As far as i know, the gap get''s closer and closer. To get enough performances out of your java code, i suggest you inform yourself about the latest VM and JIT.


JBULIDER 7 isn''t a compiler, it''s an IDE. And since i don''t use it, i''m sorry i can''t help you for this problem.

Share this post


Link to post
Share on other sites
ok i got few things to add
first of all sorry for my bad english.
second you are right i ment to say IDE not compiler!
and last no j3d dosnot use openGL but sun came up with a packages that for developers that wanne use openGl in their programs
thats why NeHe code uses the java version if you look at it
but thanks for you reply pal =)


Loves_java thank you for your reply the site was great
helped alot any more goodeis like that ?


Share this post


Link to post
Share on other sites
thats why NeHe code uses the java version if you look at it
but thanks for you reply pal =)



should read


thats what NeHe code uses the java version if you look at it
but thanks for you reply pal =)

Share this post


Link to post
Share on other sites
J3D uses OpenGL or DirectX as an underlying API depending on which version of J3D you install. However you can''t actually access OpenGL/DX commands, you use J3D''s higher level API. Sun does not provide any OpenGL bindings, but there are some 3rd party ones that do this and allow you to use OpenGL directly as you would from C/C++/whatever. Goggle for GL4Java and you''ll find the ones used in the examples on NeHe.

Performance? Don''t worry about it. Odds are your graphics card will be the bottleneck not your java code. Java isn''t as slow as people think as well.

Also, have a look at www.javagaming.org ...

Share this post


Link to post
Share on other sites
quote:
Original post by OrangyTang
. Sun does not provide any OpenGL bindings, but there are some


here check this
http://java.sun.com/products/java-media/3D/

thats openGl my brother =)

but thanks for you relpy
i will take a look at that site you recommened

Share this post


Link to post
Share on other sites
quote:
Original post by AmirYO
here check this
http://java.sun.com/products/java-media/3D/

thats openGl my brother =)



That is not OpenGL, it's Java3D. Java3D is a completely seperate API than OpenGL that might use OpenGL under the hood for hardware acceleration. They also have Direct3D implementations.
You cannot directly call OpenGL functions from Java3D.


[edited by - wayfarerx on July 25, 2002 4:37:44 PM]

Share this post


Link to post
Share on other sites