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
bf319b5437
TINYGL: Cache and clip dirty rect on all DrawCall subclasses.
...
getDirtyRegion will be called twice on each DrawCall instance, so make
repeated work as short as possible.
2017-04-23 12:30:00 +00:00
Vincent Pelletier
a577b4c6a6
TINYGL: Free disposed textures before images.
...
Reusing function already defined in zdirtyrect.cpp doing both.
2016-07-28 01:55:48 +00:00
Vincent Pelletier
47a1e826e7
TINYGL: Free draw call lists in glClose.
2016-07-28 01:55:48 +00:00
Paweł Kołodziejski
d1be78ca49
Merge pull request #1269 from vpelletier/tinygl_optimise_light
...
Tinygl: optimise gl_shade_vertex
2016-07-20 14:39:05 +02:00
Vincent Pelletier
97dc3881e0
TINYGL: Add free_texture variant taking a GLTexture * argument.
...
To avoid looking texture up in the hash table when caller has a pointer to
it already. Aka, O(0) is better than O(1).
2016-07-18 04:34:09 +02:00
Vincent Pelletier
95cc5127e0
TINYGL: Consistently consider Texture::handle as unsigned.
...
Texture handles are unsigned integers everywhere else.
2016-07-17 15:06:30 +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
Stefano Musumeci
23385b3a4a
TINYGL: Fixed compiler warnings.
2014-08-16 16:04:20 +02:00
Stefano Musumeci
974f47fa42
TINYGL: Added a way to disable or enable dirty rectangles at runtime.
2014-08-16 16:04:10 +02:00
Stefano Musumeci
e1aea3a1f3
TINYGL: Added safety checks to Linear Allocator.
2014-08-16 16:04:05 +02: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
Stefano Musumeci
a5e91722de
TINYGL: moved global variable to GLContext
2014-08-13 21:03:42 +02:00
Pawel Kolodziejski
1b48414d7e
TINYGL: cleanup license headers
2014-08-13 18:52:52 +02:00
Stefano Musumeci
520a866627
TINYGL: Documented linear allocator.
2014-08-09 14:36:46 +02:00
Stefano Musumeci
c27be840ea
TINYGL: Added not equality operator for GLVertex and DrawCall.
2014-08-09 12:34:26 +02:00
Stefano Musumeci
35a36f7c09
TINYGL: Renamed blit images container with proper class naming convention.
2014-08-09 12:17:40 +02:00
Stefano Musumeci
bd0c813296
TINYGL: Changed blit images container from Array to List
2014-08-09 12:17:11 +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
a0a17717be
TINYGL: Added linear allocator for frames draw call data.
2014-08-06 21:50:49 +02:00
Stefano Musumeci
7eab9b375c
TINYGL: Fixup formatting.
2014-08-05 20:00:36 +02:00
Stefano Musumeci
94a41de865
TINYGL: Added texture data versioning.
...
This is introduced to detect changes when a texture is updated.
2014-08-02 21:42:25 +02:00
Stefano Musumeci
ca1623517a
TINYGL: Implemented equality operator for GLVertex.
2014-07-31 15:24:58 +02:00
Stefano Musumeci
7f560daf04
TINYGL: Replaced Array with List as the container for draw calls queue.
...
NOTE: I also had to construct the struct GLContext properly now.
2014-07-26 17:56:44 +02:00
Stefano Musumeci
8d498699b3
TINYGL: Encapsulated draw calls issuing inside a function.
2014-07-25 16:02:21 +02:00
Stefano Musumeci
f2bfdc672d
TINYGL: Formatting style fixup.
2014-07-25 16:01:34 +02:00
Stefano Musumeci
96167b84c4
TINYGL: Removed duplicated variables.
...
Explanation: those two variables were already tracked inside the class FrameBuffer and they were duplicated here, since there is no need to keep a copy of those variables I just removed them.
2014-07-25 15:54:07 +02:00
Stefano Musumeci
2b3fd8501a
TINYGL: Changed the way tinyGL textures are disposed.
2014-07-25 12:59:51 +02:00
Stefano Musumeci
4ef1b80ff6
TINYGL: Added queue information to tinyGL context.
2014-07-23 15:29:20 +02:00
Stefano Musumeci
85940f353d
TINYGL: Formatting fixup.
2014-07-18 18:50:06 +02:00
Stefano Musumeci
cc6cc4abb4
TINYGL: Removed static variable.
2014-07-18 18:49:58 +02:00
Stefano Musumeci
fb65073dcd
TINYGL: Addressed a few issues with blitting interface.
2014-07-18 18:49:56 +02:00
Stefano Musumeci
62aa0af91a
TINYGL: Brute force blit api implementation.
2014-07-18 18:49:54 +02:00
Pawel Kolodziejski
97b03aed01
TINYGL: changed code to allow initialize TinyGL with specific internal texture dimension.
...
Grim: 256x256, Myst3: 1024x1024
2014-07-05 13:08:34 +02:00
Pawel Kolodziejski
f477946646
TINYGL: allow change internal texture size at compilation time. Now it's 1024x1024 pixels.
2014-07-05 12:13:03 +02:00
Pawel Kolodziejski
b4962f645e
TINYGL: added tglAlphaTest stubs
2014-07-04 08:43:19 +02:00
Stefano Musumeci
38aa730b76
TINYGL: Implemented tglDepthMask.
2014-07-03 17:02:01 +02:00
Stefano Musumeci
ba5fa4d2b8
TINYGL: Updated makefile and changelog.
...
Conflicts:
graphics/tinygl/Changelog
2014-07-03 13:07:32 +02:00
Stefano Musumeci
79ddb89ffe
MYST3: Implemented 2D rendering correctly.
2014-07-03 12:33:05 +02:00
Stefano Musumeci
109767e513
TINYGL: Implemented alpha blending and color transformation in sprite blitting for Grim TinyGL renderer.
2014-07-02 00:09:13 +02:00
Stefano Musumeci
63fd685589
TINYGL: Implemented alpha interpolation in triangle rasterization routine.
2014-07-01 14:29:44 +02:00
Stefano Musumeci
10c25d49d4
TINYGL: Added external interface for tglBlendFunc
2014-07-01 14:25:36 +02:00
Stefano Musumeci
1a5b6272fc
TINYGL: Refactored the name of FrameBuffer instance from zb to fb
2014-06-28 20:39:09 +02:00
Stefano Musumeci
b9e0b28ed9
TINYGL: Renamed ZBuffer into FrameBuffer
2014-06-28 20:39:08 +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
1b3753bc48
TINYGL: Remove typedef from struct-definitions.
2014-02-20 19:08:55 +01: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
Dries Harnie
6bd38b1801
TINYGL: Support ColorMask
...
Note, this is just basic support, it is either all or nothing.
Disabling select channels is not possible.
2013-07-02 00:22:59 +02:00
Andrea Corna
bd14146a78
TINYGL: Fix some memory leaks
2012-04-21 12:18:42 +02:00