548 Commits

Author SHA1 Message Date
Johannes Schickel
63cc9de1df OPENGL: Cleanup cursor refresh code a bit. 2011-02-25 04:04:56 +01:00
Johannes Schickel
f1b16fe084 OPENGL: Implement support for non CLUT8 cursor.
Currently all the cursor data is converted to RGBA8888 to allow for
easy colorkeying.
2011-02-25 04:01:37 +01:00
Johannes Schickel
4f3a244f16 OPENGLSDL: Add RGB555 to the supported format list. 2011-02-25 03:36:45 +01:00
Johannes Schickel
972cdaea35 OPENGL: Add support for RGB555 output format. 2011-02-25 03:35:55 +01:00
Johannes Schickel
020a413247 OPENGL: Set _gameTexture to 0 after deleting it.
This fixes a segfault when trying to use the OpenGL backend with 16bpp games,
however this does not make Last Express nor Loom PC-Engine Japanese work for
me. They now fail with a "Pixel format not supported" error.
2011-02-24 18:36:57 +01:00
Johannes Schickel
d81bb9794f OPENGL: Prefer single operation texture updates.
When doing glTexSubImage2D we do not need to assure that the source data has
the same width as the texture when we want to update the data, we just need
to assure that the width * Bpp cound matches the pitch.
2011-02-24 17:10:49 +01:00
Johannes Schickel
f5e10f33f5 OPENGL: Properly setup pixel data alignment.
If we do not do this, we might end up with a default alignment of 4, which will
fail (as in the graphics will be messed up) in case the screen resolution is
not divisible by 4.

Thanks to digitall for noticing this problem and finding out about
GL_UNPACK_ALIGNMENT.
2011-02-24 05:11:00 +01:00
Johannes Schickel
e04d983f68 SDL: Use the SDL_Surface's pitch in copyRectToScreen.
This fixes messed up graphics, when SDL decides to add padding bytes to the
lines of an SDL_Surface. Formerly the code always calculated the pitch via
w*bpp, which of course does not work in all cases.
2011-02-24 04:24:58 +01:00
Johannes Schickel
7f139f8dcf SDL: Output a warning in case the focus rect does not fit inside the screen.
Sadly it seems the engines do not care whether their focus rect really fits
inside the game screen. To ease finding such instances (which might cause odd
clipping by the backend) I added a warning for them.
2011-02-24 01:19:10 +01:00
Johannes Schickel
87f260a66c SDL: Add config file variable to enable the focus rect debug code.
The variable is named "use_sdl_debug_focusrect" for now. The debug code is
still only enabled, when a ScummVM debug version is built though.
2011-02-24 01:15:27 +01:00
Johannes Schickel
466030443a SDL: Add a debug focus rect implementation.
This implementation currently draws a rect frame around the focus rect area.
2011-02-24 01:11:16 +01:00
Johannes Schickel
e2aafb603e SDL: Move focus rectangle dummy implementations to .cpp file. 2011-02-24 00:09:25 +01:00
Johannes Schickel
e21d6e0d11 Merge branch 'osystem-palette' of https://github.com/lordhoto/scummvm into master
Conflicts:
	backends/platform/android/android.cpp
	engines/sci/graphics/screen.cpp
	engines/sci/graphics/transitions.cpp
2011-02-19 21:46:45 +01:00
Johannes Schickel
32d0e4c15f OPENGLSDL: Avoid warping in warpMouse when the logical coordinates did not change.
This fixes a slight move of the mouse cursor when the hardware mouse position
is at a subpixel from the logical coordinates.
2011-02-19 20:46:47 +01:00
Johannes Schickel
9954eb5a99 OPENGL: Get rid of adjustMouseEvent.
Rather than that I introduced a function which converts hardware screen
coordinates to overlay / game screen coordinates.

The logic which converts mouse movement events with hardware screen
coordinates to overlay / game screen coordinates is now inside notifyEvent.

This is still broken design, since one should not abuse an observer for that.
2011-02-19 20:46:47 +01:00
Johannes Schickel
3aba54b8b0 OPENGL: Fix documentation of OpenGLGraphicsManager::MousePos. 2011-02-19 20:46:47 +01:00
Johannes Schickel
4115c97883 BACKENDS: Adapt DefaultPaletteManager to setPalette/grabPalette RGBA->RGB change. 2011-02-16 16:22:52 +01:00
Johannes Schickel
6adfbe5f54 OPENGL: Adapt the OpenGL module to the setPalette/grabPalette RGBA->RGB change. 2011-02-14 17:08:31 +01:00
Johannes Schickel
813f503884 SDL: Adapt SDL graphics module to the setPalette/grabPalette RGBA->RGB change. 2011-02-14 17:08:31 +01:00
Max Horn
da01896ee0 BACKENDs: Fix const correctness in "null" graphics manager
svn-id: r55807
2011-02-07 17:52:58 +00:00
Max Horn
ab039812e7 COMMON: OSystem now has a PaletteManager
svn-id: r55806
2011-02-07 17:52:38 +00:00
Jordi Vilalta Prat
b24aab3052 OPENGL: Skip empty texture updates.
This fixes some hangs when calling the GMM while running Fascination.

svn-id: r55166
2011-01-08 16:05:27 +00:00
Johannes Schickel
d184686189 OPENGL: Fix OSD support by only updating the OSD texture in internUpdateScreen.
This actually still has the drawback that if one calls OSystem::updateScreen
from the sound thread that it might crash. Hopefully no code does this though...

svn-id: r54830
2010-12-08 01:53:20 +00:00
Johannes Schickel
da2880be47 OPENGL: Disable OSD support for now.
I added an comment explaining why OSD is broken currently. The basic problem is
that OpenGL is not thread safe, thus in case we try to display any message on
the OSD from the sound thread for example it will result in crashes.

svn-id: r54829
2010-12-08 01:35:54 +00:00
Jordi Vilalta Prat
5884f5a7ac OPENGLES: Fix the projection matrix and the includes.
svn-id: r54756
2010-12-03 19:43:27 +00:00
Jordi Vilalta Prat
f1d961a35e OPENGL: Some slight formatting fixes.
svn-id: r54755
2010-12-03 19:16:23 +00:00
Jordi Vilalta Prat
bd6f33380e OPENGL: Fix the fullscreen mode detection when SDL accepts any resolution.
svn-id: r54754
2010-12-03 19:09:27 +00:00
Jordi Vilalta Prat
44483e1e6e OPENGL: Fix compilation when OpenGL error checks are enabled.
svn-id: r54734
2010-12-02 13:13:10 +00:00
Filippos Karapetis
5990753271 OPENGL: Fixed flawed include file logic in gltexture.h, when USE_GLES is defined (a regression from r54704)
svn-id: r54732
2010-12-02 09:09:53 +00:00
Filippos Karapetis
e5f2c235d3 BACKENDS: Simplify the inclusion of gl.h. SDL has already simplified it for us :)
svn-id: r54704
2010-12-01 15:15:42 +00:00
Filippos Karapetis
1a2b512ff0 BACKENDS: Use SDL_opengl.h instead of the nonstandard glext.h to ensure OpenGL 1.2 compatibility in Windows systems
svn-id: r54700
2010-12-01 14:54:13 +00:00
Travis Howell
e2282e4816 Fix mingw compile.
svn-id: r54696
2010-12-01 11:29:26 +00:00
Joost Peters
084ea7fc4a OpenGL: remove unnecessary glext.h include
svn-id: r54695
2010-12-01 09:53:43 +00:00
Johannes Schickel
ff7357cfc5 NULL: Remove extra semicolons in null-graphics.h
svn-id: r54587
2010-11-29 19:28:19 +00:00
Johannes Schickel
f199761756 SDL: Slight formatting fix.
svn-id: r54583
2010-11-29 18:33:46 +00:00
David Turner
0e90a2a808 BACKENDS: Close Memory Leak of Mouse Surfaces in SDL Graphics Backend
svn-id: r54579
2010-11-29 18:16:11 +00:00
Max Horn
4bed2b3ff5 SDL: Trying to cleanup the FORBIDDEN_SYMBOL situation
svn-id: r54575
2010-11-29 16:35:29 +00:00
Max Horn
df05ed1a46 BACKENDS: Include scummsys.h at top of all .cpp files, *before* any #ifdefs
svn-id: r54573
2010-11-29 16:18:43 +00:00
Max Horn
4e0e406181 SDL: Move #include <SDL.h> into a special wrapper file
svn-id: r54572
2010-11-29 16:16:50 +00:00
Max Horn
1ef8d5e38a GP2X: More compilation fixes
svn-id: r54569
2010-11-29 10:43:14 +00:00
Max Horn
a162ff18bc SDL: Various more SdlEventSource related fixes
svn-id: r54553
2010-11-28 22:04:39 +00:00
Max Horn
ce119b9540 OPENGL: Fix OpenGL on Mac OS X
svn-id: r54545
2010-11-28 18:57:36 +00:00
Max Horn
ee4510aed4 OPENGL: Modify source files to force recompilation
svn-id: r54542
2010-11-28 18:10:40 +00:00
Max Horn
8399232a43 DINGUX: More compilation fixes
svn-id: r54541
2010-11-28 18:10:12 +00:00
Max Horn
1c3ba8bc40 LINUXMOTO: More compilation fixes
svn-id: r54540
2010-11-28 18:09:43 +00:00
Max Horn
bed8c34a87 DINGUX: Compilation fixes
svn-id: r54533
2010-11-28 17:18:08 +00:00
Max Horn
69092836bd LINUXMOTO: Compilation fixes
svn-id: r54532
2010-11-28 17:17:41 +00:00
Willem Jan Palenstijn
66cb595f22 SDL: re-enable unicode after graphics init
svn-id: r54531
2010-11-28 17:12:43 +00:00
Max Horn
d5840b72f9 DINGUX: Attempt to fix the new code for this backend
It seems in the gsoc2010-opengl branch, the dingux port was not anymore
updated at some point, so some changes that were made in general did not
make it till here. This is my attempt to fix at least the most obvious
problems, but without being able to compile it, all these changes should
be very carefully reviewed.

svn-id: r54522
2010-11-28 14:57:59 +00:00
Max Horn
a5ffdcf6cf OPENGL: cleanup
svn-id: r54520
2010-11-28 14:57:26 +00:00