22#include <OpticalElement.h>
23#include <MediumBoundaries/Obstruction.h>
27 class TranslatedFrame;
30 float vertexCoords[3];
38 std::vector<Real> m_obstructionMap;
39 GLShader *m_alphaTestShader =
nullptr;
40 GLuint m_verCoordAttrib = 0;
41 GLuint m_texCoordAttrib = 0;
42 GLuint m_textureUniformId = 0;
43 GLuint m_colorUniformId = 0;
46 bool m_openGlInitilized =
false;
47 unsigned int m_cols = 0;
48 unsigned int m_rows = 0;
49 unsigned int m_stride = 0;
51 Real m_halfMapWidth = 0;
52 Real m_halfMapHeight = 0;
56 uint16_t m_obsIndices[12] = {0, 1, 2, 2, 3, 0, 0, 3, 2, 2, 1, 0};
57 std::vector<uint8_t> m_textureData;
62 bool m_texDirty =
false;
65 void setFromPNG(std::string
const &path);
66 void rebuildTexture();
67 void initOpenGLObjects();
71 virtual bool propertyChanged(std::string
const &,
PropertyValue const &)
override;
82 virtual void nativeMaterialOpenGL(std::string
const &)
override;
83 virtual void renderOpenGL()
override;
84 virtual void enterOpenGL()
override;
Definition: Element.h:393
Definition: Element.h:173
Definition: GLHelpers.h:100
Definition: GLHelpers.h:45
Definition: Obstruction.h:27
Definition: Obstruction.h:34
Definition: OpticalElement.h:87
Definition: ReferenceFrame.h:59
Definition: TranslatedFrame.h:25
Definition: Obstruction.h:29