Commit Graph
3567 Commits
Author SHA1 Message Date
Dries Harnie aa90e6848f GRAPHICS: Only use packed depth-stencil framebuffer if extensions allow it 2014-04-21 12:00:41 +02:00
Dries Harnie 9f6cae54af GRAPHICS: Add OpenGL extension registry 2014-04-21 12:00:41 +02:00
Pawel Kolodziejski 8759900b6a ALL: synced with ScummVM 2014-04-05 18:18:42 +02:00
Dries Harnie 5dcf795fd7 GRAPHICS: Remove use of glMapBuffer (extension) 2014-04-02 20:38:15 +02:00
Johannes Schickel e499a25a00 GRAPHICS: Manually specify function alignment in ARM assembly. 2014-03-06 20:21:48 +01:00
Matthew Hoops 740b6e8fbd IMAGE: Move all ImageDecoders to image/ 2014-02-28 00:27:28 -05:00
Einar Johan Trøan Sømåen 7f77f55d10 TINYGL: Update ChangeLog 2014-02-20 19:33:27 +01: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 206975fb13 TINYGL: Make read-only parameters in zmath const.
(This also changes a by-value pass in gl_M4_InvOrtho to const-reference,
thanks to Botje for pointing that one out).
2014-02-20 18:58:03 +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
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
Johannes Schickel 53332e8066 GRAPHICS: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
Christian Krause 348e5fe105 JANITORIAL: Fix compile warning
- initialize size_t member with 0 instead of NULL
2014-02-17 20:51:25 +01:00
Pawel Kolodziejski 9f54d1a56e JANITORIAL: cleanup licences 2014-02-16 17:57:34 +01:00
Dries Harnie 6ed13c9dd0 JANITORIAL: Store size_t offsets in vertex attributes 2014-02-16 11:51:50 +01:00
Pawel Kolodziejski aa74f1c610 GLES2: avoid direclty cast uint32 to 64bit pointer 2014-02-16 09:10:23 +01:00
Christian Krause 5577bd71b7 Merge pull request #833 from chkr-private/compiler-warning-fixes
EMI/GRIM/TINYGL: fix compile warnings and coverity issues
2014-02-15 18:50:59 +01:00
Christian Krause 344d86bf45 TINYGL: Fix coverity and compile warning
- change void* to byte*, otherwise delete[] is undefined
2014-02-15 18:40:30 +01:00
Dries Harnie c13a6613e6 GRAPHICS: Update system_headers.h for regular OpenGL 2014-02-06 18:56:11 +01:00
Dries Harnie ef1c2f5a67 GRAPHICS: Also add a stencil attachment to framebuffers
Note that this does require the GL_OES_packed_depth_stencil extension on
ES2. iOS supports it, and so do modern Android devices.
2014-01-26 12:27:08 +01:00
Pawel Kolodziejski 9098dfe9a2 ALL: sync with scummvm 2014-01-25 22:16:57 +01:00
Dries Harnie 841d08db2e GRAPHICS: Distinguish between texture size and viewport size in Graphics::FrameBuffer 2014-01-23 21:51:54 +01:00
D G Turner ac4087856f ALL: Remove optimization unstable code on checking for null after new.
These issues were identified by the STACK tool.

By default, the C++ new operator will throw an exception on allocation
failure, rather than returning a null pointer.

The result is that testing the returned pointer for null is redundant
and _may_ be removed by the compiler. This is thus optimization
unstable and may result in incorrect behaviour at runtime.

However, we do not use exceptions as they are not supported by all
compilers and may be disabled.

To make this stable without removing the null check, you could qualify
the new operator call with std::nothrow to indicate that this should
return a null, rather than throwing an exception.

However, using (std::nothrow) was not desirable due to the Symbian
toolchain lacking a <new> header.
A global solution to this was also not easy by redefining "new" as "new
(std::nothrow)" due to custom constructors in NDS toolchain and various
common classes.

Also, this would then need explicit checks for OOM adding to all new
usages as per C malloc which is untidy.

For now to remove this optimisation unstable code is best as it is
likely to not be present anyway, and OOM will cause a system library
exception instead, even without exceptions enabled in the application
code.
2014-01-15 02:36:19 +00:00
Dries Harnie 132508b683 GRAPHICS: Add boolean flag to Shader::use 2014-01-14 00:26:43 +01:00
Dries Harnie a768689fbe GRAPHICS: Use #version 130 on desktop [OpenGLS] 2014-01-14 00:26:43 +01:00
Dries Harnie 621c0c7602 GRAPHICS: Add Graphics::Framebuffer 2014-01-14 00:26:39 +01:00
Dries Harnie f93c655b02 BUILD: add with-opengl-shaders 2014-01-14 00:26:38 +01:00
Marcus Comstedt 4b81b1299d GRAPHICS: Fix dest alpha formula in blendPixelPtr
The original alpha computation formula had a problem:  If something was
drawn on top of a pixel that was already fully opaque, there would be
an overflow in the computed alpha, and the destination alpha would be
truncated to 0 (fully transparent).

In commit 264ba4a9 this formula was replaced with another one, which
did not have overflows but also was not correct.

This commits introduces a new formula, where the rounding errors have
been turned in another direction; drawing a fully opaque pixel on top
of a transparent one would result in a pixel which is almost, but not
fully, opaque.  However, this is no problem in practice, since drawing
fully opaque pixels can be achieved with much less code as a special
case, so add that (also improves rendering speed).
2014-01-10 20:04:10 +01:00
Marcus Comstedt 51d7405a7b GRAPHICS: Fix computation of addA in darkenFill()
The old computation had rounding issues, causing alpha to leak into
the red (usually) component.  There's a much easier way to compute it
that does not lead to such problems:  What should really happen is that
the two top bits of the A component should be set to 1 (thus adding
75% alpha).  So compute it that way for speed and precision.
2014-01-10 15:56:53 +01:00
D G Turner 094c378217 GRAPHICS: Minor readability fixes to drawBevelSquareAlg method.
No functional change.
2013-12-13 23:41:24 +00:00
Joel Teichroeb f989e29d09 TINYGL: Add obviously missing break 2013-12-08 11:37:51 -08: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
Joel Teichroeb edce904439 TINYGL: Do not check the same conditions twice 2013-12-08 11:37:24 -08:00
Joel Teichroeb 7331ccf4da TINYGL: Use the right delete 2013-12-08 11:37:14 -08:00
Johannes Schickel b6f32028e1 GRAPHICS: Document loadTTFFont a bit. 2013-12-08 20:11:59 +01:00
Pawel Kolodziejski b22d441a00 ALL: synced with scummvm 2013-12-08 13:25:24 +01:00
Joel Teichroeb f10c953d28 TINYGL: Remove dead assignments 2013-12-06 14:56:13 -08:00
Eugene Sandulenko 3e85976877 GRAPHICS: Initialize variable. CID 1133708 2013-12-01 00:51:09 +02:00
Johannes Schickel 14d328faca GRAPHICS: Fix SharedPtrSurfaceDeleter for nullptr inputs. 2013-11-27 19:44:54 +01:00
Johannes Schickel 9da09f5846 GRAPHICS: Allow Font to accept U32String as strings. 2013-11-23 21:34:54 +01:00
Johannes Schickel 09c634dd55 GRAPHICS: Allow TTFFont to cache glyphs when required.
This should allow TTFFont to display UTF-32 characters from fonts.
2013-11-23 21:34:54 +01:00
Johannes Schickel 13d470dc61 GRAPHICS: Get rid of _glyphSlots in TTFFont. 2013-11-23 21:34:54 +01:00
Johannes Schickel afa3f50b8a GRAPHICS: Let Font take uint32 as character codes.
This is required to support UTF-32 strings but does not make them work
automatically!
2013-11-23 21:34:54 +01:00
Alyssa Milburn 575f81da5f GRAPHICS: Set PNG alpha bits to 0 if there's no alpha present.
This fixes the color-keying checks in Wintermute for PNG images.
2013-11-12 10:57:25 +01:00
Dries Harnie 5abd95957a JANITORIAL: Add include guard for shader.h 2013-11-05 07:30:10 -08:00
Matthew Hoops aea224e260 ALL: Mark off common code used by ZVision 2013-10-26 10:39:36 -04:00
peres 070558c4c4 GRAPHICS: do not reset the extra parameters of IFFDecoder on destroy().
The two properties that control pixel packing and the size of the
surface need to be preserved for loadStream() to work correctly.
They are now under complete responsibility of the client.
2013-10-26 23:26:22 +09:00
peres 69be9adf52 Revert "GRAPHICS: do not clear the internal state of IFFDecoder on loadStream()."
This reverts commit 92c1ff31d6.
2013-10-26 23:26:22 +09:00
Matthew Hoops 091bcbf313 GRAPHICS: Have TGA's loadStream() call destroy() 2013-10-26 10:21:08 -04:00
Matthew Hoops 1b3eee6d78 GRAPHICS: Clarify implicit destroy() usage 2013-10-26 10:21:03 -04:00