MCPcopy Create free account
hub / github.com/arrayfire/forge / AbstractChart

Method AbstractChart

src/backend/opengl/chart_impl.cpp:141–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141AbstractChart::AbstractChart(const float pLeftMargin, const float pRightMargin,
142 const float pTopMargin, const float pBottomMargin)
143 : mTickCount(9), mTickSize(10.0f),
144 mLeftMargin(pLeftMargin), mRightMargin(pRightMargin),
145 mTopMargin(pTopMargin), mBottomMargin(pBottomMargin),
146 mXLabelFormat("%4.1f"), mXMax(0), mXMin(0),
147 mYLabelFormat("%4.1f"), mYMax(0), mYMin(0),
148 mZLabelFormat("%4.1f"), mZMax(0), mZMin(0),
149 mXTitle("X-Axis"), mYTitle("Y-Axis"), mZTitle("Z-Axis"), mDecorVBO(-1),
150 mBorderProgram(glsl::chart_vs.c_str(), glsl::chart_fs.c_str()),
151 mSpriteProgram(glsl::chart_vs.c_str(), glsl::tick_fs.c_str()),
152 mBorderAttribPointIndex(-1), mBorderUniformColorIndex(-1),
153 mBorderUniformMatIndex(-1), mSpriteUniformMatIndex(-1),
154 mSpriteUniformTickcolorIndex(-1), mSpriteUniformTickaxisIndex(-1),
155 mLegendX(0.4f), mLegendY(0.9f)
156{
157 CheckGL("Begin AbstractChart::AbstractChart");
158 /* load font Vera font for chart text
159 * renderings, below function actually returns a constant
160 * reference to font object used by Chart objects, we are
161 * calling it here just to make sure required font glyphs
162 * are loaded into the shared Font object */
163 getChartFont();
164
165 mBorderAttribPointIndex = mBorderProgram.getAttributeLocation("point");
166 mBorderUniformColorIndex = mBorderProgram.getUniformLocation("color");
167 mBorderUniformMatIndex = mBorderProgram.getUniformLocation("transform");
168
169 mSpriteUniformTickcolorIndex = mSpriteProgram.getUniformLocation("tick_color");
170 mSpriteUniformMatIndex = mSpriteProgram.getUniformLocation("transform");
171 mSpriteUniformTickaxisIndex = mSpriteProgram.getUniformLocation("isYAxis");
172
173 CheckGL("End AbstractChart::AbstractChart");
174}
175
176AbstractChart::~AbstractChart()
177{

Callers

nothing calls this directly

Calls 2

getAttributeLocationMethod · 0.80
getUniformLocationMethod · 0.80

Tested by

no test coverage detected