Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
Line.h
Go to the documentation of this file.
1#pragma once
2#include <xgl/TVertexArray.h>
3#include <xgl/global.h>
4
5namespace sf::xgl
6{
10class _XGL_CLASS Line final : public TVertexArray<VertexArrayBase::vmPosition>
11{
12 public:
13 // Use the constructors from the base class.
14 using TVertexArray::TVertexArray;
15
20 {
22 float x;
24 float y;
26 float z;
31 float lineWidth;
32 } parameters{0.3f, 0.0f, 0.0f, 3.0f};
33
34 protected:
38 void generate() override;
39
43 void modifyContext(bool before, bool draw, size_t mode_index) override;
44};
45
46}// namespace sf::xgl
Class to render a line in OpenGL.
Definition Line.h:11
void generate() override
Overridden from base class.
void modifyContext(bool before, bool draw, size_t mode_index) override
Overridden from base class to set the line width.
OpenGL base class and wrapper template for vertex arrays. Automates most of the things needed for pri...
Definition TVertexArray.h:20
Definition DemoRenderer.h:6
Parameters for generating the data.
Definition Line.h:20
float y
Definition Line.h:24
float z
Definition Line.h:26
float lineWidth
Dynamic line width of the normals. This parameter is used when drawing.
Definition Line.h:31
float x
Definition Line.h:22
#define _XGL_CLASS
Definition xgl/global.h:35