267 Commits

Author SHA1 Message Date
Johannes Schickel
83b199e921 OPENGL: Move setFullscreenMode to OpenGLGraphicsManager. 2011-03-17 21:20:20 +01:00
Johannes Schickel
8d87a460b0 OPENGLSDL: Handle active fullscreen mode OPENGLSDL internal. 2011-03-17 21:20:20 +01:00
Johannes Schickel
c9f6136110 OPENGLSDL: Cleanup. 2011-03-17 21:20:20 +01:00
Johannes Schickel
daf6050d7c OPENGL: Make setScale non-virtual. 2011-03-17 21:20:20 +01:00
Johannes Schickel
758aa78acc OPENGL: Get rid of _aspectRatioCorrection. 2011-03-17 19:55:06 +01:00
Johannes Schickel
96979f73fc OPENGL: Slight refactoring.
First step into making all state variables of the OpenGL backend private, to
help making the backend more maintainable, by disallowing subclasses to just
mess with everything...
2011-03-17 19:55:06 +01:00
Johannes Schickel
42d3b8fcbd OPENGL: Fix compilation when USE_OSD is not defined. 2011-03-17 18:35:32 +01:00
Johannes Schickel
372af10a7b OPENGL: Update the OSD texture when visible while the output mode changes.
This fixes annoying graphics glitches, which occured sometimes when resizing
the Window.
2011-03-17 18:35:32 +01:00
Johannes Schickel
3c656916f1 OPENGL: Always properly set the overlay dimensions in loadGFXMode. 2011-03-17 18:35:32 +01:00
Johannes Schickel
019aa63b15 OPENGL: Fix "Original" mode by setting up the corret screen dimensions. 2011-03-17 18:35:18 +01:00
Johannes Schickel
e08683d939 OPENGL: Refactor warpMouse.
Now subclasses will not need to worry about the scaling logic themselves, but
just need to implement setInternalMousePosition, which should handles setting
the system's mouse coordinates.
2011-03-17 17:37:42 +01:00
Johannes Schickel
cb6f02f7ef Merge branch 'sdl-focus-rect' of https://github.com/lordhoto/scummvm
Conflicts:
	backends/graphics/sdl/sdl-graphics.cpp
2011-03-17 16:48:55 +01:00
Johannes Schickel
aebd9c6ea0 WINCE: Run astyle over WinCE related event and graphics source files. 2011-03-08 19:49:10 +01:00
Max Horn
aa452d3aeb WINCE: Make scummvm compile and run again for WinCE platform (patch #3202337) 2011-03-08 12:53:41 +01:00
dhewg
0b24fc3acc OPENGL: Fix compilation for --disable-16bit 2011-03-06 16:59:20 +01:00
Johannes Schickel
5ffecd85b3 OPENGL: Limit maximum cursor scale.
This avoids too big cursors when the screen resolution is really high.
2011-03-01 05:45:56 +01:00
Johannes Schickel
4841079075 OPENGL(SDL): Use the whole window/screen size for the overlay.
This makes the overlay looking nicer in fullscreen mode.
2011-03-01 05:32:14 +01:00
dhewg
f26707e353 OPENGL: Fix 16bit cursors 2011-02-26 08:56:49 +01:00
dhewg
a441069a49 OPENGL: Reset the scale on mode changes
Resets defaultTo1XScaler when going back to the launcher
2011-02-25 20:49:48 +01:00
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