Software Renderer: Java

Started by
5 comments, last by GameDev.net 19 years, 7 months ago
I want to write a software renderer in Java. The trouble is, I can't find any tutorials on it! I can find plenty on how to write one in C. Can someone point out a tutorial to me, or better yet, give me the rudiments of applying the C concepts in Java?
Advertisement
the algorithms are completely independant of the coding language. the C algorithms/tutorials you've found should be pretty simple to port to java. you just need to figure out how to draw things in java and then all the 3D transform code/clipping/etc is exactly the same (with the obvious language differences like no pointers in java, etc).

if you really want to be doing software rendering i _strongly_ suggest buying this book:

http://www.amazon.com/exec/obidos/tg/detail/-/1568811829/qid=1095195389/sr=8-1/ref=pd_cps_1/104-4912179-0591120?v=glance&s=books&n=507846

-me
Quote:Original post by Palidine
you just need to figure out how to draw things in java and then all the 3D transform code/clipping/etc


Java has a type called VolatileImage that is basically a directx surface (on ms windows that is) and here is some faqs about them.

something that maybe of use/help, fullscreen exclusive mode & buffer strategies tutorial

Quote:Original post by Palidine
with the obvious language differences like no pointers in java, etc.


oh contray, java has pointers up the wazoo! you just can't do what you can normally do with pointers in other languages and you can only have pointers of user-defined types & arrays (as there objects).

[Edited by - snk_kid on September 14, 2004 4:13:52 PM]
You also might want to look in to MemoryImageSource
I'm using the series of tutorials on Devmaster.net. The information you're giving me is all well and good, but it isn't helping me in this task. Can you give me more specific guidance now that I've told you what tutorial I am using?
Quote:Original post by CodeTitan
I'm using the series of tutorials on Devmaster.net. The information you're giving me is all well and good, but it isn't helping me in this task.


I think it does help because you need to be able to rasterize primitives towards the end and actually see if your code is working [smile].

Quote:Original post by CodeTitan
Can you give me more specific guidance now that I've told you what tutorial I am using?


The concept is independent of language, google for the graphics pipeline because that is what your trying to implement.
Quote:Original post by CodeTitan
I'm using the series of tutorials on Devmaster.net. The information you're giving me is all well and good, but it isn't helping me in this task. Can you give me more specific guidance now that I've told you what tutorial I am using?


1. Posting this in the JAVA forum would probably get better results.

2. They were helping you. You just didn't know it. So to renderer triangles you must have an image and access to the pixels of the image. Using MemoryImageSource is one way to do this. BufferedImage.getWriteableRaster() is another.

3. Using a software renderer to learn java is probably a 'bad idea' (tm). I feel justified implying you don't know java because given the clues people gave you above you could have searched the java docs and at least found some clues.

4. You are about 4 years too late when it comes to doing software rendering in java. It used to be big, but nobody does it much any more.

5. Google for 'idx3d' and 'jgl' for some code to sink you teeth into.

6. When you get something to show be sure and post here; I'm always happy to see some java software rendering.

This topic is closed to new replies.

Advertisement