Advertisement Jump to content
Sign in to follow this  
AhmedCoeia

Writing a software renderer

This topic is 1812 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 All,

 

I have managed to draw pixels, lines, triangles, then solid triangles, and I copied and pasted a code for texturing a triangle, I would like also to someone guide me on how to do it and understand it fully. 

 

What are the next steps,  is it possible to draw a cube in 2D and write a camera, world transformations right now and ignoring the Z ? 

For example, I would like to load a .plg model and ignore the .z ? 

Share this post


Link to post
Share on other sites
Advertisement

i dont really suggest to copy codes to do your renderer, you should fully understand and have control over the whole process instead.

Share this post


Link to post
Share on other sites

So, you're just drawing in 2D now, correct? Without a z-buffer?

 

You could go in several directions:

You could write some blitting functions to draw textured 2D rectangles (for things like tiles, sprites, UI).

You could write a 2D transformation pipeline, so that you could do 2D sprite games with mode-7-like effects (rotation, zoom, scales, shears) or vector-style games.

You could write a 3D transformation pipeline, so that you could do simple 3D games that can use back-face culling and the painter's algorithm instead of a z-buffer.

You could write a 3D transformation pipeline with zbuffering, and then implement perspective-correct texturing to do relatively unfettered 3D rendering.

 

Specifically, the thing you want to do isn't doable in the way you suggest in any really useful form (just throwing away z) -- what you want to do is project the 3D representation of the cube onto the 2D screen -- that's what a 3D transformation pipeline (often just called the 3D graphics pipeline, or graphics pipeline, or 3D pipeline) does.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!