Commit Graph
38 Commits
Author SHA1 Message Date
Hubert Maier 535f93cba4 GRAPHICS: Correct spelling mistake
lightening -> lightning
2022-10-27 15:56:06 +02:00
Paweł Kołodziejski de67c1ae54 TINYGL: Latest TinyGL 0.4.1 is relicensed under MIT license. 2022-03-08 15:47:20 +01:00
Paweł Kołodziejski 04b13dc61a TINYGL: Split/move functions to API and internal implementation. 2022-01-01 14:06:10 +01:00
Paweł Kołodziejski 25c4e89b7a TINYGL: Janitorial 2022-01-01 12:00:38 +01:00
Paweł Kołodziejski 20cb0ae228 ALL: Cleanup ResidualVM -> ScummVM 2021-12-26 21:19:38 +01:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Paweł Kołodziejski 4e34da3746 TINYGL: Eliminate passing context 2021-12-07 09:54:19 +01:00
Paweł Kołodziejski c1512a5c40 TINYGL: Eliminate passing context where possible 2021-12-07 00:58:14 +01:00
Paweł Kołodziejski d80bd265d2 TINYGL: Rearrange visibility various functions 2021-12-06 13:57:41 +01:00
Pawel Kolodziejski 27e12d8a96 ALL: Eliminate LOCAL_PI macro 2020-09-23 23:20:23 +02:00
Vincent Pelletier ed2fdb3aba TINYGL: Correct dot-product after its sign is known.
Normalising d when light is not in front of surface (nor behind when in
two-sides mode) is not needed as the value will not be used.
The same optimisation is already done when handling specular lights.
Also, remove "if (... > 1E-3)" conditions: as dot-product is not zero,
neither operand is zero, so this test (as a divide-by-zero protection) can
be removed.
2016-07-16 14:38:41 +00:00
Vincent Pelletier f66026a8aa TINYGL: Only do spotlight & specular computations when actually needed.
Spotlight and specular requires normalized d.
Skip specular if the light source or the material have no specular
component.
2016-07-16 12:17:59 +00:00
Vincent Pelletier 09478b1791 TinyGL: Use normalised position for directional lights.
So that dot-product result (used for attenuation) is between -1 and 1.
This should make no difference for GRIM: as far as I can see, all
direction vectors are already normalized in data files.
2016-01-01 17:29:19 +01:00
Vincent Pelletier ce5af40a0b TinyGL: Store spot direction in eye coordinates.
As per OpenGL specifications:
  The spot direction is transformed by the upper 3x3 of the modelview
  matrix when glLight is called, and it is stored in eye coordinates.
2015-05-06 19:49:35 +02:00
Pawel Kolodziejski 1b48414d7e TINYGL: cleanup license headers 2014-08-13 18:52:52 +02:00
Pawel Kolodziejski 9a81f8997c TINYGL: properly handle color for FLAT mode and lines drawing. Respect FLAT/SMOOTH mode for triangle drawing 2014-07-05 20:54:14 +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 5642d195e0 TINYGL: Done some optimization by moving the logic inside the class Matrix4. 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 d31c3e7744 TINYGL: Fixed an issue with vertices transformation and matrix-vector multiplication. 2014-06-28 17:58:21 +02:00
Stefano Musumeci 8b92e5ec83 TINYGL: Fixed all the issues that arised after the refactoring. 2014-06-28 17:57:27 +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
Guillem Jover a50201481d TinyGL: Do not underflow on specular light calculation
When casting from float to int, the value can underflow making the index
negative which causes a segmentation fault when accessing the array.

Fixes #320
2012-01-05 20:39:53 +01:00
Giulio Camuffo f1f1b32490 TinyGL: Fix enabling of lights. Fix #393 2011-10-28 18:23:17 +02:00
Ori Avtalion c4870a2a20 TinyGL: Silence clang warnings about =- 2011-07-30 11:35:18 +03:00
Pawel Kolodziejski 44e31ba08e formatting 2011-05-08 11:07:51 +02:00
Joost Peters 31f3728164 TINYGL: Fix material and lighting color on 64-bit CPUs; the old code assumed sizeof(float)==sizeof(void*) 2011-04-29 00:59:37 +08:00
Pawel Kolodziejski 49b578ec6a put tinygl internals into namespace, left only api 2009-05-25 13:19:29 +00:00
Pawel Kolodziejski 41b92f44c7 formating 2009-05-17 08:57:38 +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