help needed, show you screenshots

Started by
17 comments, last by nickwinters 19 years, 7 months ago
im working towards something similar. If you use a bufferedimage and get the pixel data as an array you can write your own poly filler with gouraud shading and it wont be to much slower. What frame rate are you getting now?
--------------------------------Dr Cox: "People are ***tard coated ***tards with ***tard filling."
Advertisement
The primary advantages of a software renderer are that it needs fewer libraries and is more portable. Unfortunately, it tends to be slower and lower quality than hardware (speed tradeoff). It also can take a long time to write. I've personally found that you can easily spend a week just messing around getting it to work, particularily if you are using sub-pixel precision - which looks better - compare the original Quake's world rendering with the monsters for some idea.
-- Jonathan
I've done the same thing, making a 3D renderer, but with textures, smooth shading and Z-buffering I couldn't get it to run at more than 20 FPS, and this is not enough to make really nice effects. I converted to using JOGL, a Java wrapper around OpenGL. It's quite easy to pick up once you've created your own renderer. For tutorials, I recommend the Red Book, and NeHe (many lessons have JOGL versions downloadable at the bottom of the page). It's fairly simple to convert any C++ tutorials you find; the only big difference from C++ is that you must use direct-mapped ByteBuffer objects in places where you would use pointers in C++; these can be created easily with the net.java.games.jogl.util.BufferUtils class.
Yes, the Red Book (Programmer's Guide) is excellent. (Up to Fourth Edition now IIRC). If you are feeling flush with cash, there's the Blue book (Reference) - which I don't own - and the Orange book (Shaders) - this is quite advanced (get familiar with the basics first!) and the shaders are applicable to I think OpenGL 1.5+ (Radeon 9800/Geforce FX hardware) upwards.
-- Jonathan
the GLSL shaders are infact OpenGL2.0 and up in core, and will work on teh GGFX range and the 9500 up from ATI (ie any DirectX9.0 class hardware)
so much for openGL stuff. i know they're really great. i've added some libraries in my jdk. i got java3D and lwjgl. i still have to find out which works better. if jogl would prove better, maybe i would look for that, too. so, which is which, java3D, lwjgl, jogl?

i've got a problem working with visualizations. something like casting spells, adding dynamic visuals for it. with my system, vertex -> edge -> triangle, it's really hard. i have to work with some equations, like making a sphere, enlarging it, then it bursts, damaging anything surrounding it... or work with lightnings and thunder. if you have ideas on how to do it, please share it with me.

thanks
Quote:Original post by davenirline
so much for openGL stuff. i know they're really great. i've added some libraries in my jdk. i got java3D and lwjgl. i still have to find out which works better. if jogl would prove better, maybe i would look for that, too. so, which is which, java3D, lwjgl, jogl?

After having used all of them quite a bit:
- Java3D is a scene-graph library, which means you deal with things on a much higher level. Geometry objects, camera objects, etc. and let it do the rendering for you. Nice but not really very flexible for games since you'll find yourself fighting against it rather than with it most of the time.
- Jogl is still very buggy, especially on different bits of hardware. No fullscreen support.
- LWJGL is much more reliable. Like Jogl its direct access to OpenGL (so much more low level and no scene graph). Fullscreen support that works. Dead easy to setup and use. :)
lwjgl tutorials is very hard to find. looking at some source codes, i guess i still have to learn openGL. what i'm really looking for is the basic recipe in a java app to get it to work, especially about the basic objects to use.

could someone guide me to a good lwjgl tutorial? once i get the hang of it, i can adjust easily.

thanks again.
Nehe has LWJGL and JOGL code. What may really help is getting a book like the OpenGL Bible or the Red Book and getting an understanding of OpenGL first. Then, lookin at examples that come with LWJGL and JOGL, combined with Nehe should help you.

And to be honest, right now, OpenGL and LWJGL have little different, except that LWJGL is OO, so you prefix all the commands with GL.

A good community for both libraries is http://www.javagaming.org.

This topic is closed to new replies.

Advertisement