Hello I am trying to make a very small 3d wire frame rendering system. Instead of throwing together a bunch of random stuff together…as I am doing now…I would like to know if there is some source code of how OpenGL would render a 3d wireframe cube using only software…no hardware…
So far I can render a wire frame cube and move it around, rotate it, and convert it to be displayed on the screen using matrices and a bunch of trig…then I just draw the lines between the calculated points on the screen…but I am now having some problems.
1…I can only Rotate about the world axis not the cube axis.
2…Translations are about the world axis not the cube axis.
3…I cannot control the orientation of the camera.
What I would like to do is be able to.
Create a 3d object by entering in 3d coordinates for the vertices into a matrix. I would like to have control of the rotation and position of the object in 3d space, and be able to move the camera around in 3d space as well. Then have the scene be rendered to the screen by only using 2d lines.
Like I said I have some code that does about half of this so far…and I have hit a wall patching things together from different sources…(those three problems above have not been addressed) so I was wondering if there was something useful around here that might be able to explain how to do this better.
I can post my source code(java) if that would help but I was hoping that somebody might know of something like this that already exists.
Most of the stuff I find is incomplete or way to high level. I just want bare bones linear algebra and then draw some 2d lines on the screen to make it look right.
I think I am basically looking for an example that someone wrote in open GL that does all this using only the 2d functions of openGL…to create the 3d objects, so that all of the math involved must be shown.