Commit Graph

73 Commits

Author SHA1 Message Date
Konstantin Käfer
7104a358f8 [build] trigger shader rebuild when build-shaders.js changed 2016-11-29 17:12:42 -08:00
Konstantin Käfer
4577c56745 [core] remove unused umbrella header in favor of individual includes 2016-11-22 20:58:51 +01:00
Konstantin Käfer
e76de05402 [build] move logging to util 2016-11-22 20:58:51 +01:00
Konstantin Käfer
117863f111 [build] move headless rendering files to platform/default 2016-11-22 20:58:51 +01:00
Konstantin Käfer
3bc79e316e [build] move default ThreadPool implementation to platform/default 2016-11-22 20:58:51 +01:00
Konstantin Käfer
67ed3ae3eb [build] move GLFW-related files to platform/glfw 2016-11-22 20:58:51 +01:00
Konstantin Käfer
9353fcbf4c [build] move default_styles to platform/default 2016-11-22 20:58:51 +01:00
Konstantin Käfer
a71868fc8d [build] move Reachability to platform/darwin 2016-11-22 20:58:51 +01:00
Konstantin Käfer
398344addc [build] use scripts/generate-core-files.sh to auto-generate core-files.cmake 2016-11-22 20:58:51 +01:00
Konstantin Käfer
bf7ab7ba2b [build] reduce framework size for Release builds on macOS 2016-11-22 15:54:26 +01:00
John Firebaugh
38fcbe21d4 [core] Convert style properties to a tuple-based approach
This converts the style property classes (CirclePaintProperties and so on) to the same tuple-based approach as gl::Attribute and gl::Uniform. The approach is outlined in https://github.com/mapbox/cpp/blob/master/C%2B%2B%20Structural%20Metaprogramming.md.

The main advantage of this approach is it allows writing algorithms that work on sets of style properties, without resorting to code generation or manually repetitive code. This lets us iterate on approaches to data-driven properties more easily.

Another advantage is that the cascading, unevaluated, and evaluated states of a set of properties exist as independent structures, instead of individual properties holding their own state. This is a more functional approach that makes data flow clearer and reduces state.
2016-11-17 15:13:38 -08:00
Chris Loer
bceeba29a3 [core] Add ICU package for Bidirectional text support and arabic text shaping.
Apply bidi and shaping in symbol_layout.
Add utility functions for converting to and from UTF-16.
2016-11-17 14:33:03 -08:00
Molly Lloyd
3380f0803a [core] update native for line property function shaders changes (#6658)
* [core] update shaders for line property functions

update deps, define device pixel ratio for all shaders

[core] create ShaderParameter struct to store pixel ratio and overdraw param

repair rebase errs

update shaders to include pixel ratio

make sure collision_box never overdraws

update test suite, move shaders to Painter::render so the correct pixel ratio is applied

move shader compiling back to the Painter constructor

rebase from shader --> program refactor

re-factor parameters for collisionBox and debug programs

remove unused vars from line-program, move blur math to shader

update core files

remove unecessary files

update shaders PR, remove comments

bump test suite sha

fix formatting, incorporate feedback

refactor program.hpp

* [core] remove line transformations that were moved to the shaders, bump shader sha

* [core] shorten ProgramParameter instantiation

* [core] bump shader+test suite shas
2016-11-16 17:34:33 -08:00
Minh Nguyễn
dbd2235744 [core] Line-break ideographic text by character (#6828)
* [core] Line-break ideographic text by character

Allow a line break to be inserted after any supported Chinese, Japanese, or Yi character in a point-placed label. Balance the lines unless non-ideographic text such as Latin letters are present.

Fixes #1223.

* [core] Moved more character classing into util::i18n

* [core] Detect character properties by Unicode block

* [test] Reenabled ideographic breaking tests
2016-11-14 14:53:21 -08:00
Vladimir Agafonkin
efc427f9bb update to mapbox-gl-shaders with vertex/fragment preludes (#6971) 2016-11-08 15:01:53 -08:00
John Firebaugh
1db2ffbc1b [core] Use gl::Program to resolve some rough edges in the GL binding types
* Extract `ignore` util to separate header.
* `Segment` now tracks offset and length of indices, rather than primitives. This is more natural.
* Introduce `VertexVector` and `IndexVector` types. These types carry information about the intended draw mode (`Triangles`, `LineStrip`, etc.), and ensure that elements are always appended in a group size appropriate for that draw mode, for both indexed and unindexed rendering.
* `Program`, rather than `Drawable`, is now the unifying object for draw calls. `Program` is the best place to type check the draw call, because it is typed to carry information about the intended primitive, vertex type, attributes, and uniforms.
* Use the debug shaders for debug tile rendering, like gl-js.
* Fix the draw mode for background. It was drawing triangle strips with a triangles array. Surprised this didn’t cause issues. Now it’s type checked.
2016-11-08 08:09:29 -08:00
John Firebaugh
66bdbc3b96 [core] Introduce gl::Program template 2016-11-08 08:09:29 -08:00
John Firebaugh
36210fe4e9 [core] Make attribute binding more similar to uniform binding 2016-11-08 08:09:28 -08:00
Bruno de Oliveira Abinader
687ee1e1c9 [build] Remove unused gl/implementation.hpp 2016-11-08 18:02:38 +02:00
Bruno de Oliveira Abinader
8e99ae44dd [build] Use mesa-13.0.0-glx in CI builds 2016-11-08 18:02:38 +02:00
Bruno de Oliveira Abinader
549929cefd [core] Set bucket segments to initialize empty 2016-11-02 18:12:28 +02:00
Bruno de Oliveira Abinader
38f536049a [core] Moved util::log2 to its own header
- Added util::{MIN,MAX}_ZOOM_F to avoid consecutive conversions from
double to float
- Move util::log2 to its own header (part of mbgl/math)
2016-10-31 16:53:07 +02:00
John Firebaugh
0e57d10d77 [core] Modern C++ bindings for OpenGL 2016-10-28 17:14:01 -07: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
Mike Morris
817c26111a [core] [node] pass thread pool impl to Map constructor
Updates mbgl::Map constructor usage everywhere

Adds NodeThreadPool implementation using AsyncQueue to call
Nan::AsyncQueueWorker from main thread
2016-10-20 14:37:36 -04:00
Bruno de Oliveira Abinader
9946e60536 [test] Added TileCoordinate tests 2016-10-11 19:36:21 +03:00
John Firebaugh
5891c7028d Update mapbox-gl-shaders to 98a56d 2016-10-10 12:46:52 -07:00
John Firebaugh
21d7ee11e1 [core] Rationalize shader names
{layer type}{subtype}Shader
2016-10-06 14:47:58 -07:00
John Firebaugh
da4527cd3a [core] TextureRectVertex ⇢ SymbolVertex 2016-10-05 10:52:19 -07:00
John Firebaugh
9cf57e7142 [core] Make ElementGroup safer
Template on shader types, rather than count. This allows the compiler to enforce using the correct VAO for the shader and PaintMode. This fixes OverdrawMode with circle layers.

While here, avoid using unique_ptrs for groups. Instead, ensure ElementGroup is movable.
2016-10-05 10:52:19 -07:00
John Firebaugh
e4310aa874 [core] Improve attribute binding API 2016-10-05 10:52:19 -07:00
John Firebaugh
73334ac8fa [core] Move shader and uniform to gl directory 2016-10-05 10:52:19 -07:00
John Firebaugh
7a3bef091e [core] Refactor Buffer 2016-10-05 10:52:19 -07:00
John Firebaugh
31be5d3c3a [core] Tiles that error on load are not renderable 2016-10-05 10:26:04 -07:00
Thiago Marcos P. Santos
a38104ee22 [tests] Added benchmarks for querying for features 2016-10-05 11:12:16 +03:00
Thiago Marcos P. Santos
82b801250e [tests] Add unit tests for query features fiters 2016-10-05 11:12:16 +03:00
Thiago Marcos P. Santos
5829c0dbc6 [build] Re-add benchmark tests to the buildsystem
Probably lost on the cmake migration
2016-10-05 11:12:16 +03:00
Konstantin Käfer
07315711d6 [core] remove Raster object in favor of a more low-level Texture object 2016-10-04 14:00:30 -07:00
Ivo van Dongen
1bf12e20a6 [core] LocalFileSource implementation and tests 2016-09-30 14:57:26 +02: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
cc78b74098 [core] remove dependence on gl.h types 2016-09-29 10:17:47 -07:00
Thiago Marcos P. Santos
4ef66f36d4 [core] Use geojson as a header only library 2016-09-28 16:35:50 +02:00
Konstantin Käfer
3f3fc7b772 [test] add .test.cpp suffix to test case files 2016-09-28 16:34:22 +02:00
Konstantin Käfer
44c7e9d05e [core] merge gl::ObjectStore into gl::Context 2016-09-27 11:03:29 -07:00
Konstantin Käfer
ce42d22984 [core] rename gl::Config to gl::Context 2016-09-27 11:03:29 -07:00
Konstantin Käfer
21386b3146 [core] move GL value accessors to gl::value namespace 2016-09-27 11:03:29 -07:00
Konstantin Käfer
c88ce2d51e [core] add ability to render to offscreen textures 2016-09-27 10:42:10 +02:00
Konstantin Käfer
adcb449ff3 [core] make GL value defaults constexpr 2016-09-26 11:14:40 +02:00