Commit Graph

28 Commits

Author SHA1 Message Date
Orgad Shaneh
a05e54f00c JANITORIAL: Remove trailing whitespaces 2021-05-04 11:46:30 +03:00
Vincent Pelletier
a6af3a38a3 TINYGL: Fix vertice color when clipped and lighting is disabled
longcurrent_color is assigned per vertex, but it is not saved on each
vertex on creation (unlike their "color" attribute, used when lighting
is enabled).
As a consequence, and because rendering happens asynchronously (rather,
following the draw call queue managed by zdirtyrect.cpp when requested
to flip current buffer), longcurrent_color at clipping time can be
different to the one at vertex declaration time, causing color artifacts.

The effect is most noticeable in EMI set shi, in the grog dispenser +
shipyard manager closeup angle, when Guybrush exits the screen by
crossing its right border: dark triangles become visible on his face.

Instead, always use the color attribute, which is already properly
initialised on vertex creation.
2017-07-20 01:51:07 +00:00
Vincent Pelletier
3221146de9 TINYGL: Always initialise normal and eye coordinates (valgrind) 2016-07-28 01:55:48 +00:00
Vincent Pelletier
f75767fc78 TINYGL: Always check if texture matrix need applying.
matrix_model_projection_updated is not set when texture matrix alone is
modified.
2016-07-10 13:13:46 +00:00
Stefano Musumeci
2cf70d6d76 Merge branch 'master' into tinygl-dirty-rects-fixed
Conflicts:
	graphics/tinygl/ztriangle.cpp
2014-08-16 16:03:27 +02:00
Pawel Kolodziejski
1b48414d7e TINYGL: cleanup license headers 2014-08-13 18:52:52 +02:00
Stefano Musumeci
6cd062826b TINYGL: Renamed zrect in zdirty rect 2014-08-07 17:56:01 +02:00
Stefano Musumeci
75ea6893ef TINYGL: renamed glIssueDrawCall to tglIssueDrawCall. 2014-08-07 17:38:11 +02:00
Stefano Musumeci
f8070776a5 TINYGL: Fixed a bug that caused unneessary draw call creation. 2014-08-05 13:18:47 +02:00
Stefano Musumeci
98d6944c22 TINYGL: Moved rasterization logic inside draw call.
Note: As a side effect to this draw calls are now batched together.
2014-07-26 17:55:34 +02:00
Stefano Musumeci
8d498699b3 TINYGL: Encapsulated draw calls issuing inside a function. 2014-07-25 16:02:21 +02:00
Stefano Musumeci
f0de01af01 TINYGL: Implemented deferred 3D draw calls. 2014-07-24 19:51:08 +02:00
Stefano Musumeci
63fd685589 TINYGL: Implemented alpha interpolation in triangle rasterization routine. 2014-07-01 14:29:44 +02:00
Stefano Musumeci
19c819e2b0 TINYGL: Fixed an error in matrix transpose method and optimized the code a little bit more. 2014-06-28 17:58:27 +02:00
Stefano Musumeci
f40cfb020c TINYGL: Changed the way vertices are transformed, increased performance (now it's comparable to the previous version and sometimes it performs even faster). 2014-06-28 17:58:27 +02:00
Stefano Musumeci
6c7eaca2eb TINYGL: Last optimization batch, performance comparable to the previous version. 2014-06-28 17:58:26 +02:00
Stefano Musumeci
d45c455be4 TINYGL: Done some more optimization on maths code. 2014-06-28 17:58:25 +02:00
Stefano Musumeci
4fbb2d0dc3 TINYGL: Done several optimizations to the maths code. 2014-06-28 17:58:24 +02:00
Stefano Musumeci
9be1423802 TINYGL: Fixed a problem with shadows. 2014-06-28 17:58:23 +02:00
Stefano Musumeci
d31c3e7744 TINYGL: Fixed an issue with vertices transformation and matrix-vector multiplication. 2014-06-28 17:58:21 +02:00
Stefano Musumeci
b7853b48f8 TINYGL: Fixed a few mistakes during the refactoring. 2014-06-28 17:57:24 +02:00
Stefano Musumeci
c1040a9cdf TINYGL: Started replacing the old classes with the new ones.
TINYGL: Removed all the use of the old classes of Vector and Matrix.
2014-06-27 11:28:59 +02:00
Einar Johan Trøan Sømåen
698ef4a37c TINYGL: Use astyle to (semi-selectively) apply the code-formatting conventions to TinyGL. 2014-02-20 18:46:49 +01:00
Einar Johan Trøan Sømåen
b21271bd82 TINYGL: Put declaration of counting variable inside for-construct. 2014-02-20 18:06:04 +01:00
Joel Teichroeb
96f2dd1748 TINYGL: Remove default case as the current cases already represent all possible values 2013-12-08 11:37:39 -08:00
Pawel Kolodziejski
49b578ec6a put tinygl internals into namespace, left only api 2009-05-25 13:19:29 +00:00
Pawel Kolodziejski
110527019b make compilable after latest change 2009-05-08 07:32:33 +00:00
Pawel Kolodziejski
f85c21fa4c moved tinygl 2009-05-08 07:17:43 +00:00