le3d - LightEngine 3D
A straightforward C++ 3D software engine for real-time graphics
flattexzc.h
Go to the documentation of this file.
1 
33 inline void LeRasterizer::fillFlatTexZC(int y, int x1, int x2, int w1, int w2, int u1, int u2, int v1, int v2)
34 {
35  uint8_t * sc = (uint8_t *) &curTriangle->solidColor;
36 
37  short d = x2 - x1;
38  if (d == 0) return;
39 
40  int au = (u2 - u1) / d;
41  int av = (v2 - v1) / d;
42  int aw = (w2 - w1) / d;
43 
44  if (++x2 > frame.tx) x2 = frame.tx;
45  uint8_t * p = (uint8_t *) (x1 + y * frame.tx + pixels);
46 
47  fill_flat_texel_int(p, d, u1, v1, w1, au, av, aw, texMaskU, texMaskV, texSizeU, texDiffusePixels, sc);
48 }
LeColor solidColor
Definition: trilist.h:83
int tx
Definition: bitmap.h:81
LeBitmap frame
Definition: rasterizer_float.h:61
void fill_flat_texel_int(uint8_t *p, short d, int u1, int v1, int w1, int au, int av, int aw, uint32_t texMaskU, uint32_t texMaskV, uint32_t texSizeU, LeColor *texPixels, uint8_t *c)