* 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.
24 lines
436 B
C++
24 lines
436 B
C++
#pragma once
|
|
|
|
#include <mbgl/programs/program.hpp>
|
|
#include <mbgl/programs/attributes.hpp>
|
|
#include <mbgl/programs/uniforms.hpp>
|
|
#include <mbgl/shader/debug.hpp>
|
|
|
|
namespace mbgl {
|
|
|
|
class DebugProgram : public Program<
|
|
shaders::debug,
|
|
gl::Line,
|
|
gl::Attributes<
|
|
attributes::a_pos>,
|
|
gl::Uniforms<
|
|
uniforms::u_matrix,
|
|
uniforms::u_color>>
|
|
{
|
|
public:
|
|
using Program::Program;
|
|
};
|
|
|
|
} // namespace mbgl
|