Johannes Schickel
1124d1db31
OPENGL: Fix truncation issue resulting in wrong mouse coordinates.
2015-01-07 20:38:20 +01:00
Johannes Schickel
f879f8af04
OPENGL: Limit mouse cursor drawing to inside game screen when no overlay is visible.
2015-01-07 20:38:17 +01:00
Filippos Karapetis
d2c69a79fe
BACKENDS: Remove trailing whitespace
2014-10-28 15:38:51 +02:00
Einar Johan Trøan Sømåen
1506f6049e
BACKENDS: Fix some Doxygen comments that seem wrong.
2014-08-29 03:28:26 +02:00
Torbjörn Andersson
da57eeeeb2
OPENGL: Fix building with --disable-16bit
2014-02-25 00:09:16 +01:00
Johannes Schickel
5d78542ab8
OPENGL: Always support RGBA8888 (memory layout).
2014-02-12 18:06:29 +01:00
Johannes Schickel
2cab30ee80
OPENGL: Move RGBA8888 (logical layout) to OpenGL specific formats.
...
The reason here is that GL_UNSIGNED_INT_8_8_8_8 is not supported by the GLES
standard. Thus we cannot use it outside OpenGL specific code paths.
2014-02-12 18:06:29 +01:00
Johannes Schickel
ac5907a804
OPENGL: Use frac_t for cursor scaling.
2014-02-12 17:15:07 +01:00
Johannes Schickel
6576dd758b
OPENGL: Simplify shake offset application.
2014-02-12 17:15:07 +01:00
Johannes Schickel
1709486859
OPENGL: Use GLfloat for draw cooridnates in Texture.
2014-02-12 17:15:07 +01:00
Johannes Schickel
49dcd36e72
OPENGL: Use signed types for mouse coordinates.
...
This adjusts for the fact that our event handling also uses signed coordinates.
2014-02-12 17:15:07 +01:00
Johannes Schickel
ddc70ed9ee
OPENGL: Properly use signed types for cursor hotspot.
2014-02-12 17:15:07 +01:00
Johannes Schickel
abcadb5d87
OPENGL: Fix cursor regression when defaultFormat doesn't have an alpha channel.
2014-02-11 12:19:30 +01:00
Johannes Schickel
16898486fa
OPENGL: Properly setup full game palette on video mode change if required.
2014-02-11 11:10:49 +01:00
Johannes Schickel
1f4638fe82
OPENGL: Refactor texture instantiation.
2014-02-11 11:10:49 +01:00
Johannes Schickel
0063568484
OPENGL: Rename notifyContextChange to notifyContextCreate.
2014-02-11 11:10:49 +01:00
Johannes Schickel
8be41e4f2c
OPENGL: Add notification function about context destruction.
2014-02-11 11:10:48 +01:00
Johannes Schickel
602d3034a9
OPENGL: Release old texture name before creating a new one.
...
This prevents any texture name leaks (and thus memory leaks) on
recreateInternalTexture calls.
2014-02-11 11:10:48 +01:00
Johannes Schickel
2fe303ce3f
Merge pull request #409 from lordhoto/rtti
...
Enable RTTI and clean up the code by exploiting the availability of dynamic_cast.
2014-01-23 15:23:12 -08:00
Johannes Schickel
0f36a56b81
OPENGL: Properly query for OpenGL errors.
...
There might be various error flags and we need to clear all of them to get
precise error results. Thus, we need to call glGetError in a loop to achieve
that.
2014-01-21 23:52:20 +01:00
Willem Jan Palenstijn
fb05395ded
OPENGL: Fix texture re-allocation check
...
This fixes a crash when opening the menu in the SCI Laura Bow 2 intro.
2013-11-20 21:49:07 +01:00
Johannes Schickel
2094bd31ec
OPENGL: Fix >1Bpp mouse cursors which do not require format conversion.
2013-11-17 20:28:16 +01:00
Johannes Schickel
281672e171
SDL: Let SdlGraphicsManager inherit from GraphicsManager.
2013-10-24 00:03:09 +02:00
Johannes Schickel
d34c9d5bcb
SDL: Do not require a static graphics mode list in OpenGL and SurfaceSDL.
2013-10-23 22:59:06 +02:00
Johannes Schickel
05c347fc8a
OPENGL/SDL: Add screenshot support.
2013-10-19 22:18:22 +02:00
Johannes Schickel
bb1d49ba9c
OPENGL: Limit maximum Surface size to maximum texture size.
...
This is mostly aimed at old graphics chips. For example, wjp's old laptop
only supports 1024x1024 textures but has a 1280x800 screen. Switching to
fullscreen would create a bigger overlay than supported. Now it will get
limited to an smaller resolution and then scaled too.
Alternatively we could think of tiling surfaces into textures. But then
handling scaling would be more complicated since it might result in
artifacts on texture tile borders.
2013-10-19 22:18:15 +02:00
Johannes Schickel
20e4a7f0ce
TIZEN: Adapt to new OpenGL code.
...
Thanks to Chris Warren-Smith for testing this a bit.
2013-10-19 22:17:42 +02:00
Johannes Schickel
decc013e53
OPENGL: Implement dirty rect handling.
2013-10-19 22:17:42 +02:00
Johannes Schickel
cc9c991d77
OPENGL: Add OSD support.
2013-10-19 22:17:39 +02:00
Johannes Schickel
5ce830b976
SDL: Add a OpenGL SDL backend and hook it into the SDL backend.
...
The hooking code is nearly exactly the old hooking code. Only the OpenGL SDL
creation has been adapted since it uses a different constructor now.
2013-10-19 22:14:24 +02:00
Johannes Schickel
46323074e7
OPENGL: Add new generic OpenGL (ES) backend.
...
This backend is based on ideas of the old OpenGL backend, of the Android GL
backend and of the iPhone GL backend.
2013-10-19 22:12:01 +02:00
Johannes Schickel
8a6e57cba1
BACKENDS: Remove OpenGL and OpenGL SDL backend.
...
This breaks our Tizen port.
2013-10-05 00:20:02 +02:00
Johannes Schickel
79c124842b
OPENGL: Take advantage of Surface::getPixels.
2013-08-03 04:02:53 +02:00
Johannes Schickel
3169e07013
OPENGL: Prefer getBasePtr over direct Surface::pixels access.
2013-08-03 04:02:49 +02:00
Chris Warren-Smith
be399188c4
TIZEN: bada port updated to tizen
2013-07-03 07:04:11 +10:00
Johannes Schickel
59dde54519
Merge pull request #301 from lordhoto/c++11-playground
...
RFC: Allow use of override and nullptr. Also allow C++11 compilation.
2013-01-26 05:25:14 -08:00
Matthew Hoops
fa9dd0f6c0
OPENGL: Fix linear filtering when the texture size doesn't match the real size
2013-01-24 12:49:21 -05:00
Johannes Schickel
0a495f7faa
OPENGL: Silence C++11 narrowing warning.
2013-01-09 07:24:37 +01:00
Johannes Schickel
5521261fde
OPENGL: Fix RGBA8888 mode setup.
2012-08-09 03:09:01 +02:00
David-John Willis
4cd34733a3
OPENGL: GL_BGRA does not exist in every GLES implementation.
...
* It definately does not exist in the GLES implementations I can test with.
* Don't configure if USE_GLES is set.
2012-08-08 13:37:32 +01:00
Johannes Schickel
aec9b9e22a
ALL: Let overlay related methods in OSystem take a void * and use a proper pitch values.
...
This is a first step to get rid of OverlayColor, which is a requirement for
proper 4Bpp overlay support.
2012-06-16 04:17:14 +02:00
Johannes Schickel
d27d951d0b
BACKENDS: Make OSystem::setMouseCursor take a "const void *" buffer.
...
This is mainly for consistency with OSystem::copyRectToScreen.
2012-06-16 03:28:42 +02:00
Johannes Schickel
31880186e1
BACKENDS: Let copyRectToScreen take a "const void *" instead of "const byte *" as buffer.
...
This removes the need to convert the parameter to copyRectToScreen to
"const byte *", which is commonly used in games, which use Graphics::Surface
to store their graphics data.
2012-06-16 02:18:01 +02:00
Johannes Schickel
a401f0a19e
ALL: Replace cursorTargetScale in OSystem API with a simple "do not scale" logic.
...
All uses of the old target scale API actually wanted to disallow scaling of
the mouse cursor. This commit adapts our API to this and thus simplifies
backend implementations.
Some backends, most notable the Wii and Android, did some implementation of
the cursor target scale, which I didn't adapt yet. I added a TODO for the
porters there.
2012-06-03 02:02:57 +02:00
Alyssa Milburn
29e05ec05e
OPENGL: Don't leak surfaces.
2012-03-28 19:18:25 +02:00
Willem Jan Palenstijn
297d15e122
OPENGL: Don't force alpha to 1
...
This was likely a hack to work around an alpha blending bug in the
gui vector renderer.
2012-02-20 22:17:33 +01:00
Johannes Schickel
37e5b209a7
OPENGL: More formatting fixes.
2012-02-15 02:23:54 +01:00
Johannes Schickel
5b3ebdf43d
OPENGL: Prevent access to a few more members in the SDL OpenGL code.
2012-02-15 02:23:37 +01:00
Johannes Schickel
05af37c08e
OPENGL: Use tabs instead of spaces for indentation.
2012-02-15 02:23:22 +01:00
Johannes Schickel
1f01fb330c
OPENGL: Use C-style casts.
2012-02-15 02:23:08 +01:00