Ted John
02d783a993
Fix build
2018-01-21 12:41:42 +00:00
Ted John
cebe13984f
Remove most of remaining memory functions from libopenrct2ui
2018-01-21 11:17:41 +00:00
Ted John
131286f758
Refactor memory handling in OpenGLShaderProgram.cpp
2018-01-21 11:17:41 +00:00
Marijn van der Werf
4c956def67
Update UI imports
2018-01-18 22:57:55 +01:00
Michał Janiszewski
6a65f791b6
Add const to arguments
2018-01-10 23:58:57 +01:00
Michał Janiszewski
9c84ae30fb
Hide colliding "struct VDStruct" definitions to anon namespaces
2018-01-09 11:01:03 +00:00
Ted John
c3eab7ead6
Refactor window.c to C++
2018-01-07 12:39:58 +01:00
ZehMatt
d25c46ef93
Refactor image cache to fixed size.
2018-01-07 02:18:12 +00:00
Ted John
3dcbebcf68
Refactor drawing.c to C++
2018-01-05 22:57:57 +01:00
Ted John
0c3c998177
Refactor lightfx.c to C++
2018-01-05 22:57:55 +01:00
Ted John
02c58a6c5a
Remove custom base Exception class
2018-01-05 18:11:47 +00:00
Michał Janiszewski
b2bc974fe7
Use nullptr where possible
2018-01-04 06:58:44 +01:00
Michał Janiszewski
4d0c88fb94
Mark constructors explicit ( #6928 )
2018-01-04 01:12:34 +00:00
Michael Steenbeek
c4f44e5e7a
Compile files in paint folder as C++
2017-12-17 17:24:36 +01:00
LRFLEW
eed00ea363
Add Vsync Toggle to Options
2017-12-14 11:18:28 +01:00
Michael Steenbeek
6dc49d643a
Compile files in base dir as C++
2017-12-13 08:03:48 +01:00
Michael Steenbeek
60d8865efb
Compile game.c and game.h as C++
2017-12-05 09:10:27 +01:00
Ted John
b5137b0e37
Merge pull request #6574 from IntelOrca/protect-g1-access
...
Refactor g1 access
2017-11-16 18:51:32 +00:00
kitsunenokenja
04f0048430
Add missing header include for std::ceil call ( #6655 )
...
OpenGLDrawingEngine::ConfigureCanvas calls std::ceil which is defined by
the cmath include. Adding the include directive resolves a compilation
failure to due std::ceil being otherwise undefined.
2017-11-12 14:02:30 +00:00
Michał Janiszewski
cabed0cef5
Remove unused field
2017-11-08 06:53:17 +01:00
Philip Goto
19abb62586
Add Smooth NN scaling to OpenGL renderer
2017-11-06 23:05:21 +01:00
Philip Goto
360cd813b7
include cmath in HardwareDisplayDrawingEngine
2017-11-06 23:05:21 +01:00
Philip Goto
36bece4cf1
Destroy _scaledScreenTexture on destroying hardware engine
2017-11-06 23:05:21 +01:00
Philip Goto
6377ac7bfb
Create enum for scale quality
2017-11-06 23:05:21 +01:00
Philip Goto
b66df2d6db
Add smooth nearest neighbor scaling
...
This commit implements smooth nearest neighbor scaling, this scaling method looks sharper than linear scaling and not deformed like NN scaling.
2017-11-06 23:05:21 +01:00
Ted John
444a8c1602
Const protect get_g1_element
2017-11-03 22:18:10 +00:00
Ted John
5a05bd51e5
Use get_g1_element and add null checks
2017-11-03 22:18:10 +00:00
Michał Janiszewski
076be24bb9
Default-initialise fields in DrawRectShader
2017-10-30 16:21:49 +01:00
LRFLEW
778cb9d024
Rename CopyFramebufferShader to ApplyPaletteShader
2017-10-30 16:21:49 +01:00
LRFLEW
50600f6195
Move MaxTransparencyDepth
2017-10-30 16:21:49 +01:00
LRFLEW
7db8d0f00a
OpenGL: Fix linear DPI scaling
2017-10-30 16:21:49 +01:00
LRFLEW
aac1c59714
OpenGL: Add multi-pass transparency
2017-10-30 16:21:49 +01:00
LRFLEW
d3d41ea724
OpenGL: Add single-pass transparency
2017-10-30 16:21:49 +01:00
LRFLEW
3d2d99817c
OpenGL: Add Depth Buffer and Depth Test
2017-10-30 16:21:49 +01:00
LRFLEW
6bf2e0157b
OpenGL: Improve Shaders
2017-10-30 16:21:49 +01:00
LRFLEW
f105237a2e
OpenGL: Delay Palette Mapping Until Final Framebuffer Copy to Screen
2017-10-30 16:21:49 +01:00
LRFLEW
0868902f11
Rework OpenGL API declarations
2017-10-10 22:26:35 +02:00
ZehMatt
5187946bc9
Fix #6309 : Lightfx being enabled with incompatible drawing engine.
2017-09-28 08:01:25 +02:00
ZehMatt
c238265834
Minor performance improvements
2017-09-26 15:52:04 +02:00
Michał Janiszewski
00fd18809c
Move extern "C" {} blocks to headers ( #6282 )
2017-09-18 17:05:28 +02:00
Dennis-Z
859faa4bad
Fix ghosting when moving over transparent map elements
2017-09-01 21:02:11 +02:00
Ted John
3f1991804a
Add debug option to show dirty blocks
2017-08-31 22:36:15 +01:00
Dennis-Z
abf440d01c
Fix viewport clipping issues with the OpenGL renderer ( #6188 )
2017-08-16 22:11:43 +01:00
Dennis-Z
2c2c5a6fde
Remove unused hardcoded color table
...
Was previously used for the old FiltRect stuff
2017-08-16 00:43:52 +02:00
Dennis-Z
75b784c107
Flush OpenGL command buffers before drawing a rectangle instead of after
...
This fixes an issue causing the first rectangle that is being drawn
to not be over whatever was previously drawn.
2017-08-16 00:43:47 +02:00
Dennis-Z
634ee96f54
Implement OpenGL renderer FilterRect through palette remapping
...
Replace the previous "filtering" of rectangles based on
luminance, now using a remap palette like the software renderer for
better output colors.
Various other simplifications regarding to rectangle rendering are
included here too.
2017-08-16 00:43:41 +02:00
Dennis-Z
97ad4ac402
Register/load glUniform1iv function
2017-08-16 00:43:25 +02:00
Michał Janiszewski
d698ad1100
Convert NULL -> nullptr in C++
2017-08-15 11:51:56 +02:00
Dennis-Z
85c89481a5
Recreating the atlasses texture instead of changing the format of the existing atlasses texture ( #6159 )
...
This improves performance
2017-08-12 13:04:26 +01:00
Duncan
77330ac257
Fix #5890 . Primary and secondary colours now work in zoomed opengl. ( #6109 )
...
Mistake made due to a missunderstanding of how the software renderer works. At this point in the software renderer the primary and secondary colours are already calculated into the palette so can be ignored. In opengl the colours still need to be passed to the command queue. Fixes #4715 as well.
Update changelog
2017-08-02 20:58:11 +01:00
Michał Janiszewski
70793f65a5
Verify queried renderer information
2017-07-28 08:06:11 +02:00
Ted John
01b0047675
Invert Painter dependency
...
Make painter call into the drawing engine, rather than the drawing engine create and call the painter.
2017-07-16 23:25:11 +01:00
Ted John
cb884dad11
Refactor rct2_draw to a new Painter class
...
Right now this is created for each drawing engine, but should eventually be a dependency into them.
2017-07-16 23:25:11 +01:00
Ted John
a808da910c
Merge pull request #5885 from willox/gltransparency
...
Fix regression in OpenGL DrawImageCommand flags
2017-07-13 19:17:59 +01:00
William Wallace
ae110a9159
Allow switching between OpenGL and other renderers without restarting
2017-07-13 19:04:37 +01:00
William Wallace
ab39262ccf
Remove incorrect/unnecessary OpenGL API calls
2017-07-13 19:04:37 +01:00
William Wallace
fbb424ba21
Add enums for DrawImageInstance flags
2017-07-13 18:10:14 +01:00
William Wallace
110d01f863
Fix regression in OpenGL DrawImageCommand flags
...
Flag 1 isn't supposed to be set when flag 3 is set.
2017-07-13 15:42:46 +01:00
ZehM4tt
5f1bc914af
Fix copying commands to draw image instances.
2017-07-13 10:17:23 +02:00
Michael Steenbeek
44af1653a6
Replace 'center' with 'centre' ( #5745 )
2017-06-30 23:11:28 +01:00
Ted John
5bb48f3539
Move SDL part of lightfx blend to drawing engine
2017-06-10 22:18:54 +01:00
Ted John
90aad2e2ec
Use rct_palette instead of SDL
2017-06-10 22:18:54 +01:00
Ted John
fc899d15ef
Remove SDL_Window from IDrawingEngine and UiContext
2017-06-10 22:18:54 +01:00
Ted John
97d68957f0
Fix segfault in screenshot command
2017-06-10 15:48:05 +01:00
Ted John
0ad2c075e5
Separate hardware display drawing engine from software
2017-06-10 15:48:05 +01:00
Ted John
df16e6a4f7
Inherit X8 engine from software engine
2017-06-10 15:48:04 +01:00
Michał Janiszewski
61d38511bc
Expand tabs to spaces
...
This commit expands tabs to spaces (ts=4) in all the files under src/
and test/.
Until now we had two wildly different code styles with C using tabs and
new C++ using spaces. It is painful to maintain as none of the commonly
used tools support this kind of setup and in reality is needless, as we
can simply convert all the sources to spaces and have opened PRs do the
same, where needed.
Additionally, trailing whitespace has been removed.
2017-06-06 23:46:14 +02:00
Michał Janiszewski
79d76759bb
Fix #5516 : Update copyrights for 2017
...
Not all files were necessarily _changed_, but all were touched, see
https://github.com/OpenRCT2/OpenRCT2/pull/4932
2017-06-01 21:55:10 +02:00
Ted John
ee9aa55083
Fix more warnings
2017-05-29 22:38:45 +02:00
Ted John
3fa764321e
Fix string errors and warnings
2017-05-29 22:38:45 +02:00
Ted John
e2a7189663
Do not use SDL_Colour for gPalette
2017-05-29 22:38:44 +02:00
Ted John
bd9839ff50
Get the game working
...
Mostly just needed to resolve screen size which is now retrieved via ui context.
2017-05-29 22:38:43 +02:00
Ted John
7163973bd2
Start moving code from OpenRCT2 to Context
2017-05-29 22:38:42 +02:00
Ted John
f736e8ff96
Move more platform code to UiContext
2017-05-29 22:38:42 +02:00
Ted John
10182879da
Invert Context and UiContext dependencies
2017-05-29 22:38:42 +02:00
Ted John
006a76c099
Refactor registration of drawing engines
2017-05-29 22:38:42 +02:00
Ted John
bf3749833d
Allow drawing engine registration via context interfaces
2017-05-29 22:38:42 +02:00
Ted John
c7b66ab193
Fix includes for moved files
2017-05-29 22:38:41 +02:00
Ted John
19aafc4e24
Move drawing engine implementation code to openrct2-ui
2017-05-29 22:38:41 +02:00