12 #ifndef hifi_RenderablePolyLineEntityItem_h
13 #define hifi_RenderablePolyLineEntityItem_h
15 #include "RenderableEntityItem.h"
16 #include <PolyLineEntityItem.h>
17 #include <TextureCache.h>
19 namespace render {
namespace entities {
21 class PolyLineEntityRenderer :
public TypedEntityRenderer<PolyLineEntityItem> {
22 using Parent = TypedEntityRenderer<PolyLineEntityItem>;
23 friend class EntityRenderer;
26 PolyLineEntityRenderer(
const EntityItemPointer& entity);
28 void updateModelTransformAndBound(
const EntityItemPointer& entity)
override;
30 virtual bool isTransparent()
const override;
33 virtual bool needsRenderUpdateFromTypedEntity(
const TypedEntityPointer& entity)
const override;
34 virtual void doRenderUpdateSynchronousTyped(
const ScenePointer& scene, Transaction& transaction,
const TypedEntityPointer& entity)
override;
35 virtual void doRenderUpdateAsynchronousTyped(
const TypedEntityPointer& entity)
override;
37 virtual ItemKey getKey()
override;
38 virtual ShapeKey getShapeKey()
override;
39 virtual void doRender(RenderArgs* args)
override;
41 static void buildPipelines();
42 void updateGeometry();
45 QVector<glm::vec3> _points;
46 QVector<glm::vec3> _normals;
47 QVector<glm::vec3> _colors;
49 QVector<float> _widths;
51 NetworkTexturePointer _texture;
52 float _textureAspectRatio { 1.0f };
53 bool _textureLoaded {
false };
55 bool _isUVModeStretch {
false };
56 bool _faceCamera {
false };
59 size_t _numVertices { 0 };
60 gpu::BufferPointer _polylineDataBuffer;
61 gpu::BufferPointer _polylineGeometryBuffer;
62 static std::map<std::pair<render::Args::RenderMethod, bool>, gpu::PipelinePointer> _pipelines;