diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-07-18 16:11:44 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-07-19 09:31:07 -0700 |
commit | 64203ba53fa2384db60476afa9041b0d656cca1c (patch) | |
tree | 5a4b6d3410a491d351f2ec0c901b8fb1d7457754 /src/mbgl/renderer/paint_parameters.hpp | |
parent | 72b7e39074056eb5317fe98660488a0b0a13fbe9 (diff) | |
download | qtlocation-mapboxgl-64203ba53fa2384db60476afa9041b0d656cca1c.tar.gz |
[core] Refactor Painter away
Diffstat (limited to 'src/mbgl/renderer/paint_parameters.hpp')
-rw-r--r-- | src/mbgl/renderer/paint_parameters.hpp | 66 |
1 files changed, 64 insertions, 2 deletions
diff --git a/src/mbgl/renderer/paint_parameters.hpp b/src/mbgl/renderer/paint_parameters.hpp index 213c01cfbd..811a99b58b 100644 --- a/src/mbgl/renderer/paint_parameters.hpp +++ b/src/mbgl/renderer/paint_parameters.hpp @@ -1,14 +1,76 @@ #pragma once +#include <mbgl/renderer/render_pass.hpp> +#include <mbgl/renderer/render_light.hpp> +#include <mbgl/map/mode.hpp> +#include <mbgl/gl/depth_mode.hpp> +#include <mbgl/gl/stencil_mode.hpp> +#include <mbgl/gl/color_mode.hpp> +#include <mbgl/util/mat4.hpp> +#include <mbgl/algorithm/generate_clip_ids.hpp> + +#include <array> + namespace mbgl { -class Programs; class View; +class UpdateParameters; +class RenderStyle; +class RenderStaticData; +class FrameHistory; +class Programs; +class TransformState; +class ImageManager; +class LineAtlas; +class UnwrappedTileID; class PaintParameters { public: - Programs& programs; + PaintParameters(gl::Context&, + float pixelRatio, + GLContextMode, + View&, + const UpdateParameters&, + RenderStyle&, + RenderStaticData&, + FrameHistory&); + + gl::Context& context; View& view; + + const TransformState& state; + const EvaluatedLight& evaluatedLight; + + RenderStaticData& staticData; + FrameHistory& frameHistory; + ImageManager& imageManager; + LineAtlas& lineAtlas; + + RenderPass pass = RenderPass::Opaque; + MapMode mapMode; + MapDebugOptions debugOptions; + GLContextMode contextMode; + TimePoint timePoint; + + float pixelRatio; + std::array<float, 2> pixelsToGLUnits; + algorithm::ClipIDGenerator clipIDGenerator; + + Programs& programs; + + gl::DepthMode depthModeForSublayer(uint8_t n, gl::DepthMode::Mask) const; + gl::StencilMode stencilModeForClipping(const ClipID&) const; + gl::ColorMode colorModeForRenderPass() const; + + mat4 matrixForTile(const UnwrappedTileID&); + + mat4 projMatrix; + mat4 nearClippedProjMatrix; + + int numSublayers = 3; + uint32_t currentLayer; + float depthRangeSize; + const float depthEpsilon = 1.0f / (1 << 16); }; } // namespace mbgl |