Ai
1 Star 0 Fork 0

何佳/tinyrenderer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
our_gl.h 551 Bytes
一键复制 编辑 原始数据 按行查看 历史
Dmitry V. Sokolov 提交于 2020-08-25 23:32 +08:00 . polishing
#ifndef __OUR_GL_H__
#define __OUR_GL_H__
#include "tgaimage.h"
#include "geometry.h"
void viewport(const int x, const int y, const int w, const int h);
void projection(const double coeff=0); // coeff = -1/c
void lookat(const vec3 eye, const vec3 center, const vec3 up);
struct IShader {
virtual vec4 vertex(const int iface, const int nthvert) = 0;
virtual bool fragment(const vec3 bar, TGAColor &color) = 0;
};
void triangle(const vec4 clip_verts[3], IShader &shader, TGAImage &image, std::vector<double> &zbuffer);
#endif //__OUR_GL_H__
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/vev_hj/tinyrenderer.git
git@gitee.com:vev_hj/tinyrenderer.git
vev_hj
tinyrenderer
tinyrenderer
master

搜索帮助