Commit graph

50 commits

Author SHA1 Message Date
Johannes Schickel
4f3a244f16 OPENGLSDL: Add RGB555 to the supported format list. 2011-02-25 03:36: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
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
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
ee4510aed4 OPENGL: Modify source files to force recompilation
svn-id: r54542
2010-11-28 18:10:40 +00:00
Willem Jan Palenstijn
66cb595f22 SDL: re-enable unicode after graphics init
svn-id: r54531
2010-11-28 17:12:43 +00:00
Alejandro Marzini
30cbd35e74 OPENGL: Fix enable aspect ratio feature.
svn-id: r52502
2010-09-03 03:47:05 +00:00
Alejandro Marzini
19bf2b9eb6 OPENGL: Improve scaling, aspect ratio correction and display(GFX) modes.
Now the previous aspect ratio modes are handled as GFX modes. The previous
GFX modes were for scaling, but are removed now. A new 4/3 display mode
added. Added Ctrl-Shift-A for backward switching through display modes, and
Ctrl-Alt-<number key> for switching to a specific GFX mode.
Window resizing now is available for all display modes, and will
automatically change the scale factor as well as maintain the aspect ratio
when needed.

svn-id: r52501
2010-09-03 03:23:46 +00:00
Alejandro Marzini
27beca0e8c OPENGL: Add Ctrl-Shift-Enter hotkey for backward switching fullscreen modes.
svn-id: r52310
2010-08-23 20:28:04 +00:00
Alejandro Marzini
942e104e33 OPENGL: Fix issue with resize events generated after going out of fullscreen mode.
svn-id: r52248
2010-08-20 22:56:13 +00:00
Alejandro Marzini
503578ac10 OPENGL: Restrict window scaling if current desktop resolution is not big enough.
svn-id: r52057
2010-08-13 05:26:23 +00:00
Alejandro Marzini
610f041930 OPENGL: Remove unnecessary best fullscreen mode detection code.
svn-id: r52056
2010-08-13 05:16:42 +00:00
Alejandro Marzini
d84428e678 OPENGL: Disable resizable window when not using an aspect ratio correction.
svn-id: r52055
2010-08-13 05:00:38 +00:00
Alejandro Marzini
a3711160ef OPENGL: Remove unnecessary aspect ratio corrections, and add "Original Size" correction. Rename _transactionDetails.needHotswap to _transactionDetails.needRefresh.
svn-id: r52054
2010-08-13 04:48:58 +00:00
Alejandro Marzini
58d256c15e SDL: Make use of SDL_BACKEND instead of platform specific defines.
svn-id: r52029
2010-08-12 06:30:26 +00:00
Alejandro Marzini
7b898648bc OPENGL: Add 5/3 and 5/4 aspect ratio corrections.
svn-id: r51806
2010-08-06 21:39:54 +00:00
Alejandro Marzini
7968374e27 OPENGL: Fix compiling for GLES.
svn-id: r51721
2010-08-04 04:23:00 +00:00
Alejandro Marzini
498c17655d OPENGL: Refresh OpenGL textures on all loadGFX() calls.
OpenGL context may be destroyed after calling SDL_SetVideoMode, so it is better to always recreate the textures.

svn-id: r51675
2010-08-03 02:30:36 +00:00
Alejandro Marzini
5439b173b3 OPENGL: Prioritize desktop resolution as default fullscreen mode.
svn-id: r51674
2010-08-03 02:10:55 +00:00
Alejandro Marzini
d542648a89 OPENGL: Add missing header.
svn-id: r51605
2010-08-02 03:38:35 +00:00
Alejandro Marzini
905ec1104e OPENGL: Save last fullscreen mode size to config file.
svn-id: r51604
2010-08-02 03:17:12 +00:00
Alejandro Marzini
4d8f8195b8 OPENGL: Improve fullscreen mode selection. Add warpMouse adjusting.
svn-id: r51603
2010-08-02 03:03:28 +00:00
Alejandro Marzini
7f8e7fc29d OPENGL: Remove use of floats for aspect ratio correction. Improved fullscreen toggling default mode selection.
Floats can lead to calculation errors because, now uints are used and aspect ratio values are handled with a x 10000 scale.
When entering fullscreen, it will be looked for the fullscreen mode with the smallest metric that mantains the game screen aspect ratio.

svn-id: r51563
2010-08-01 02:26:20 +00:00
Alejandro Marzini
dd7bcc051f OPENGL: Switch to native resolution fullscreen as default.
svn-id: r51560
2010-07-31 23:50:54 +00:00
Alejandro Marzini
7dbe257da8 OPENGL: Add support for BGR and rgb(a) reversed formats (Not available for GLES). General cleanup and commenting.
svn-id: r51559
2010-07-31 22:54:10 +00:00
Alejandro Marzini
6d6756b46a Add OpenGL dependencies to MinGW configure.
svn-id: r51551
2010-07-31 19:57:54 +00:00
Alejandro Marzini
2636ac4f36 OPENGL: Implement aspect ratio support and toggling. Improve fullscreen switching. Fix cursor scaling bug.
Now the hotkey Ctrl-Alt-Enter will switch between all available fullscreen modes. Alt-Enter will only switch to the best mode available, and exit fullscreen mode if already on it.
The different aspect ratios can be switched with Ctrl-Alt-A. The normal mode will stretch the contents to the screen, while other modes will stretch only one dimension to the screen size, and maintain the aspect ratio for the other dimension.

svn-id: r51346
2010-07-27 07:30:56 +00:00
Alejandro Marzini
f7220cfea7 OPENGL: Commenting.
svn-id: r51338
2010-07-27 00:30:37 +00:00
Alejandro Marzini
141e101841 Formatted spaces.
svn-id: r51300
2010-07-26 06:58:33 +00:00
Alejandro Marzini
738a9e78d8 OPENGL: Implement saveScreenshot().
svn-id: r51299
2010-07-26 06:52:58 +00:00
Alejandro Marzini
856c6a18af OPENGL: Add OSD message.
svn-id: r51295
2010-07-26 06:03:55 +00:00
Alejandro Marzini
37cdff9277 OPENGL: Do not allow changing to a not supported scale while on fullscreen.
svn-id: r51292
2010-07-26 04:40:00 +00:00
Alejandro Marzini
b89412d7e4 OPENGL: Redesign blitting system. Add basics for aspect correction.
Removed the extra surface in GLTexture. Now there are copies of the texture data in their original format (so engine can get the original data when lockScreen or grabOverlay is called). This copies will be updated when the engine calls a function that modifies the game screen/overlay, and the textures will be marked as dirty. When updating screen, the textures will be updated from the copies data if they are dirty.

svn-id: r51234
2010-07-24 05:54:51 +00:00
Alejandro Marzini
bbdb87a831 OPENGL: Add basic game screen drawing. Changed Overlay PixelFormat to RGBA5551.
svn-id: r51193
2010-07-23 06:57:23 +00:00
Alejandro Marzini
ef880dd5da OPENGL: Add antialiasing, hotkey: ctrl+alt+f. Fixed minor bugs.
svn-id: r51146
2010-07-22 15:36:50 +00:00
Alejandro Marzini
302400a701 OPENGL: Implement fullscreen mode.
svn-id: r51049
2010-07-20 04:32:31 +00:00
Alejandro Marzini
014d7b791c OPENGL: Fix SDL OpenGL context not resizing well on Linux.
svn-id: r51047
2010-07-20 00:21:17 +00:00
Alejandro Marzini
f6e04fe03b OPENGL: Fix adjustment of mouse coordinates when screen is resized and scaled.
svn-id: r51046
2010-07-19 23:58:48 +00:00
Alejandro Marzini
6f70a303bc OPENGL: Add basic scaler handle.
svn-id: r51016
2010-07-19 05:36:10 +00:00
Alejandro Marzini
03d66c4012 Fixed rect size when drawing npot textures. Added OpenGL attr for SDL.
svn-id: r50979
2010-07-18 05:32:44 +00:00
Alejandro Marzini
492569a7a2 Improved cursor drawing.
svn-id: r50976
2010-07-18 03:25:58 +00:00
Alejandro Marzini
cfe85d6b9f Added basic screen drawing (only overlay working).
svn-id: r50930
2010-07-16 04:45:47 +00:00
Alejandro Marzini
9ef2fc4744 Fixed doing OpenGL calls before a graphical context was created.
svn-id: r50905
2010-07-15 04:01:41 +00:00
Alejandro Marzini
f53028d4a2 Replaced the extra SDL functions added to GraphicsManager with an EventObserver in SdlGraphicsManager.
svn-id: r50900
2010-07-15 01:21:20 +00:00
Alejandro Marzini
84ceae9328 Check if USE_OPENGL is defined for compiling OpenGL code.
svn-id: r50842
2010-07-13 05:38:10 +00:00
Alejandro Marzini
609e08d5db Merged from trunk, from Rev 49499 to HEAD
svn-id: r50840
2010-07-13 04:31:15 +00:00
Alejandro Marzini
8b6a670391 OpenGL manager: Implemented PixelFormat functions. Implemented GFX methods. Changed how GLTexture determines its format.
svn-id: r50811
2010-07-12 06:00:19 +00:00
Alejandro Marzini
4dca7c7e02 Moved getGraphicsManager() from OSystem_SDL to ModularBackend. Moved public SDL graphics manager functions to graphics manager (Allowing OpenGLSdlGraphicsMaanger to be used with other SDL managers easily). Removed BaseSdlGraphicsManager. Implemented in the opengl manager basic screen functions.
svn-id: r50796
2010-07-11 04:32:24 +00:00
Alejandro Marzini
85034dc730 Added BaseSdlGraphicsManager. Added GLTexture.
svn-id: r50795
2010-07-10 22:47:29 +00:00
Alejandro Marzini
386785e2b8 Added OpenGLSDLGraphicsManager.
svn-id: r50768
2010-07-09 19:45:56 +00:00