ok,
discuss… java2d api can be accelarated using opengl and maybe direct 3d… so that makes it as fast as java3D. can java2D be used to create high performance 3d app and games like quake 2 ??
discuss…
peace
ok,
discuss… java2d api can be accelarated using opengl and maybe direct 3d… so that makes it as fast as java3D. can java2D be used to create high performance 3d app and games like quake 2 ??
discuss…
peace
Although Java2D (potentially) is a layer on top of OpenGL, it doesn’t expose any 3D functionality.
You can fake a 3D effect, by layering graphics on top of eachother, but it would still be 2D.
Considering the type of question, my advice to you would be: make a 2D game, it’s hard enough!
i believe that java3d and any 3D api really simulate 3D and there is nothing that is read 3D when it comes to the screen as it is 2D surface, + the canvas is 2D surface.
I think Riven is making reference to how the Java2D API doesn’t expose any of the hardware accelerated 3D stuff that graphics cards can do when called to do so by OGL or Direct3D. I don’t know what that stuff is, but I assume that things like shadows can be done on the graphics card thru OGL or D3D but using Java2D it would have to be done in ‘software’ on the CPU which is slower.
Keith
The book “Developing Games in Java” by David Brackeen shows you how to make a full 3d engine using java2d, however as mentioned java 2d just isn’t good enough to get nice fast 3d graphics with if you really need to make 3d game you are better of using a direct opengl binding like LWJGL or JOGL, or if you need more abstraction something like Java3D, JMonkey Engine or Xith.
I guess to argue here any further won’t make much sence ^^
AFAIK we weren’t argueing that much anyway
You can use OpenGL acceleration for Java2D, yes. Google for “Java2D OpenGL”.
[quote]can java2D be used to create high performance 3d app and games like quake 2
[/quote]
Creating a 3D game using a 2D API is a bad bad idea. But, you can create 2D games using a 3D API.
It is much much simpler to simply learn 3D programming rather to trying to use some 2D API to simulate a 3D effect…gahh…what a awful idea