Commit Graph

133 Commits

Author SHA1 Message Date
Konstantin Käfer
f7801e5d82 [core] correctly set the framebuffer size on retina screens
Also asserts in Debug mode that the internal state and the OpenGL state are identical
2016-11-01 10:46:04 +01:00
Konstantin Käfer
62b56b799a [core] change std::array<uint16_t, 2> to mbgl::Size 2016-10-27 18:30:58 -07:00
Konstantin Käfer
a4d259c33f [core] move gl::Context to Backend and refactor View 2016-10-25 13:52:36 -07:00
Konstantin Käfer
5cc390d694 [core] separate Backend from View for headless rendering 2016-10-25 13:52:36 -07:00
Bruno de Oliveira Abinader
72df1658fa [glfw] Added queryPointAnnotations shortcut 2016-10-25 08:12:31 +03:00
Ivo van Dongen
ab85fdb452 [glfw] add map change callback methods to glfw_view 2016-10-20 17:02:40 +03:00
Konstantin Käfer
2ec2860ce5 [core] move OpenGL extension loading to their own headers 2016-09-29 13:19:27 -07:00
Konstantin Käfer
21386b3146 [core] move GL value accessors to gl::value namespace 2016-09-27 11:03:29 -07:00
Bruno de Oliveira Abinader
9d2d2d3a91 [glfw] Separate transition options accessors from class API 2016-09-13 12:38:59 +03:00
Konstantin Käfer
0df60c4651 [core] add ability show visualize the depth buffer to the GLFW and macOS app 2016-08-19 17:41:55 +02:00
Bruno de Oliveira Abinader
0e60238596 [glfw] Added 'addRandomLineAnnotations' 2016-07-23 14:10:33 +03:00
Bruno de Oliveira Abinader
92f605df32 [tidy] Check modernize-use-nullptr
Ref: http://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2016-06-13 23:32:05 +03:00
John Firebaugh
c902f9098b [core] Rationalize naming for style-related code 2016-06-02 14:51:39 -07:00
John Firebaugh
0fba70d5a8 [all] Rationalize annotation API 2016-06-01 17:37:01 -07:00
John Firebaugh
8985b1311b [core] Use geometry.hpp types for shape annotations 2016-06-01 17:36:50 -07:00
Bruno de Oliveira Abinader
1769e6fcb4 [core] Move GLFW stencil clip debug to core
This makes the stencil clip debug available to all platforms.

Fixes #4669.
2016-05-24 19:58:24 +03:00
Bruno de Oliveira Abinader
c13dd32242 [core] Added Viewport mode
Satisfies embedding platforms that requires the viewport coordinate
systems to be set according to its standards e.g. viewport mirrored
vertically.
2016-05-11 15:48:51 +03:00
Thiago Marcos P. Santos
94093493d5 [glfw] Atomic is no longer needed
All View events come from the same thread.
2016-04-28 16:15:07 +03:00
Bruno de Oliveira Abinader
a2a6e22bdd [glfw] Workaround for OS X (#4666) 2016-04-15 12:18:16 -07:00
John Firebaugh
204c7fee03 [core] Render from the main thread
Do not create a thread for the MapContext anymore.
2016-04-14 13:44:08 -07:00
Bruno de Oliveira Abinader
01a0f5464d [glfw] Fix random point generation 2016-04-01 10:21:59 +03:00
Thiago Marcos P. Santos
baf30cd1f7 [glfw] Main loop integration
This new code can be used for rendering on the Main thread
while it will also work for rendering on the Map thread
before we make the switch. Needed by #2909.
2016-03-21 23:58:48 -03:00
Bruno de Oliveira Abinader
4909169996 [core] Added user-defined transition properties when modifying classes 2016-03-18 01:26:22 +02:00
Bruno de Oliveira Abinader
7a509b0369 [linux] Added world tour to GLFW test app 2016-03-14 11:51:37 +02:00
Bruno de Oliveira Abinader
8e30a4a080 [core] Harden Transform anchor & padding usage
Use optional values for anchor & padding in Map and Transform functions
instead of NaNs. Added unit tests to stress some edge cases.
2016-03-13 21:38:20 +02:00
Bruno de Oliveira Abinader
4994b3dc57 [core] PrecisionPoint is now ScreenCoordinate 2016-03-01 20:58:54 +00:00
Konstantin Käfer
33b63f0ef6 [glfw] add "C" button to show stencil clip masks 2016-02-10 11:35:17 +01:00
Konstantin Käfer
e74987b07f [core] move GL value objects from gl_config.hpp to gl_values.hpp
Also removes duplicate code from gl_helper.hpp by reusing the GL values that we already have anyway.
2016-02-08 12:50:00 +01:00
Konstantin Käfer
5c3b01ffcf [core] move util/gl_helper.hpp to gl/gl_helper.hpp 2016-02-08 12:50:00 +01:00
Konstantin Käfer
2f06ca74e2 [core] move platform/gl.hpp to gl/gl.hpp 2016-02-08 12:50:00 +01:00
Bruno de Oliveira Abinader
2f86467586 Cleanup std::chrono usage
Use mbgl::Duration and mbgl::{,Milli}Seconds whenever possible.
2016-01-25 15:11:18 +02:00
Ansis Brammanis
d34f8eb674 [core][ios][osx][android] make SpriteImage accept PremultipliedImage
the SpriteImage constructor signature changes from

SpriteImage(
        uint16_t width, uint16_t height, float pixelRatio,
        std::string&& data, bool sdf = false);

to

SpriteImage(PremultipliedImage&&, float pixelRatio, bool sdf = false)
2016-01-19 18:23:21 -08:00
Thiago Marcos P. Santos
7ad9e47bbe [glfw] Fix panning direction
Follow-up of the transform refactoring
2016-01-19 11:36:26 +02:00
Minh Nguyễn
47b69100f9 [core, ios, osx, android, glfw] Flipped origin of Map::latLngForPixel(), Map::pixelForLatLng()
Map and Transform methods assume an origin at the top-left corner of the view, like iOS, Android, and GLFW but unlike OS X. Transform is responsible for flipping coordinates between the top-left origin of Map and the bottom-left origin of TransformState.

Fixes #3574.
2016-01-18 16:54:58 -08:00
Bruno de Oliveira Abinader
20d2ceef4b [osx] Use framebuffer width/height in GLFW port
Framebuffer width/height takes pixel ration in consideration.

Part of #3294.
2015-12-18 15:31:36 -08:00
Thiago Marcos P. Santos
a903d2eef0 [glfw] Set viewport size from the Map thread
Setting the viewport size from the main thread has no affect
on Linux and thus, the map doesn't scale. We now set the
viewport size on the beforeRender() hook that gets called
from the Map thread.
2015-12-16 17:18:54 -08:00
Konstantin Käfer
4fc8226838 [core] allow changing the orientation
You can now change the orientation of north to be to the right, bottom, left in addition to the default of top
2015-12-15 11:41:58 -08:00
Konstantin Käfer
93c000dd18 [core] viewport is handled by embedding applications 2015-12-10 14:16:11 -08:00
Konstantin Käfer
d5fb535058 [core] add namespace comment to closing brace 2015-12-03 15:38:36 +01:00
John Firebaugh
8afa14fa78 [core] Map::setSprite ⇢ Map::addAnnotationIcon
Fixes #3084
2015-12-01 15:10:28 -08:00
John Firebaugh
622f6691b7 [glfw] No longer necessary to wait for style load to add default marker 2015-12-01 09:15:05 -08:00
John Firebaugh
12fc949006 [tests] Don't use icons from the style for annotations 2015-11-30 12:40:09 -08:00
Bruno de Oliveira Abinader
92856f394c [core] Collision debug is now MapDebugOptions::Collision 2015-11-27 17:47:02 +02:00
Bruno de Oliveira Abinader
1f0820c8e8 [core] Added MapDebugOptions
Map debug options are now cycled up to all debug options enabled, then
back to none.
2015-11-27 17:47:02 +02:00
Justin R. Miller
ac10cc1ecd fixes #3054: move desktop test app keybindings output to startup log 2015-11-17 12:00:51 -08:00
Konstantin Käfer
85ab48636c [core] allow changing pitch in GLFW based apps 2015-11-17 19:02:12 +01:00
John Firebaugh
1e350b7ea4 [core] Reorganize sprite related files 2015-11-12 13:03:14 -08:00
Bruno de Oliveira Abinader
5a24ac605b [core] Use PrecisionPoint in zoom and angle functions 2015-11-11 16:59:49 +02:00
Bruno de Oliveira Abinader
c78e769635 [core] Use PrecisionPoint in coordinate functions 2015-11-11 16:59:49 +02:00
John Firebaugh
54e08b1f83 [core] Eliminate use of ClassProperties for paint 2015-11-10 11:33:17 -08:00