RenderSetup is called by the renderer before drawing this graphic It overrides the original panel RenderSetup Calculates the model matrix and transfer to OpenGL.
(gs *gls.GLS, rinfo *core.RenderInfo)
| 504 | // It overrides the original panel RenderSetup |
| 505 | // Calculates the model matrix and transfer to OpenGL. |
| 506 | func (sx *chartScaleX) RenderSetup(gs *gls.GLS, rinfo *core.RenderInfo) { |
| 507 | |
| 508 | // Sets model matrix |
| 509 | var mm math32.Matrix4 |
| 510 | sx.SetModelMatrix(gs, &mm) |
| 511 | |
| 512 | // Transfer model matrix uniform |
| 513 | location := sx.uniMatrix.Location(gs) |
| 514 | gs.UniformMatrix4fv(location, 1, false, &mm[0]) |
| 515 | |
| 516 | // Sets bounds in OpenGL window coordinates and transfer to shader |
| 517 | _, _, _, height := gs.GetViewport() |
| 518 | location = sx.uniBounds.Location(gs) |
| 519 | gs.Uniform4f(location, sx.pospix.X, float32(height)-sx.pospix.Y, sx.width, sx.height) |
| 520 | } |
| 521 | |
| 522 | // |
| 523 | // ChartScaleY is a panel with LINE geometry which draws the chart Y vertical scale axis, |
nothing calls this directly
no test coverage detected