Search
lxdream.org :: lxdream/src/pvr2/rendbkg.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/rendbkg.c
changeset 635:76c63aac3590
prev561:533f6b478071
next645:a7392098299c
author nkeynes
date Thu Feb 14 13:54:11 2008 +0000 (12 years ago)
branchlxdream-render
permissions -rw-r--r--
last change Commit render work in progress. Main changes:
* Preliminary OSMesa support
* Move the generic gl code out to pvr2/
* Implement scene data structure + reader
* Remove the 1/z adjustments
file annotate diff log raw
1.1 --- a/src/pvr2/rendbkg.c Tue Jan 01 05:08:38 2008 +0000
1.2 +++ b/src/pvr2/rendbkg.c Thu Feb 14 13:54:11 2008 +0000
1.3 @@ -426,15 +426,15 @@
1.4
1.5 center.x = base[1].x;
1.6 center.y = base[1].y;
1.7 - center.z = (1/base[1].z);
1.8 + center.z = base[1].z;
1.9 center.u = base[1].u;
1.10 center.v = base[1].v;
1.11 diff0.x = base[0].x - center.x;
1.12 diff0.y = base[0].y - center.y;
1.13 - diff0.z = (1/base[0].z) - center.z;
1.14 + diff0.z = base[0].z - center.z;
1.15 diff1.x = base[2].x - center.x;
1.16 diff1.y = base[2].y - center.y;
1.17 - diff1.z = (1/base[2].z) - center.z;
1.18 + diff1.z = base[2].z - center.z;
1.19
1.20 float detxy = ((diff1.y) * (diff0.x)) - ((diff0.y) * (diff1.x));
1.21
1.22 @@ -461,7 +461,7 @@
1.23 scene->vertexes[i].rgba[1] = base[2].rgba[1];
1.24 scene->vertexes[i].rgba[2] = base[2].rgba[2];
1.25 scene->vertexes[i].rgba[3] = base[2].rgba[3];
1.26 - scene->vertexes[i].z = 1/base[2].z;
1.27 + scene->vertexes[i].z = base[2].z;
1.28 scene->vertexes[i].u = base[2].u;
1.29 scene->vertexes[i].v = base[2].v;
1.30 }
.