zauonlok/renderer

3d wireframe rendering?

starseeker opened this issue · 1 comments

Hi! I was wondering, is is possible (or planned) to be able to render wireframes in the scene? Something along the lines of http://brlcad.org/gallery/picture.php?/96/category/12 ?

Wireframe rendering is possible. You can use the draw2d_draw_line function to do that.

void draw2d_draw_line(framebuffer_t *framebuffer, vec4_t color,
vec2_t point0, vec2_t point1);

This page describes the basic algorithm for line drawing and wireframe rendering:

https://github.com/ssloy/tinyrenderer/wiki/Lesson-1-Bresenham%E2%80%99s-Line-Drawing-Algorithm#wireframe-rendering