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)
| 589 | // It overrides the original panel RenderSetup |
| 590 | // Calculates the model matrix and transfer to OpenGL. |
| 591 | func (sy *chartScaleY) RenderSetup(gs *gls.GLS, rinfo *core.RenderInfo) { |
| 592 | |
| 593 | // Sets model matrix |
| 594 | var mm math32.Matrix4 |
| 595 | sy.SetModelMatrix(gs, &mm) |
| 596 | |
| 597 | // Transfer model matrix uniform |
| 598 | location := sy.uniMatrix.Location(gs) |
| 599 | gs.UniformMatrix4fv(location, 1, false, &mm[0]) |
| 600 | |
| 601 | // Sets bounds in OpenGL window coordinates and transfer to shader |
| 602 | _, _, _, height := gs.GetViewport() |
| 603 | location = sy.uniBounds.Location(gs) |
| 604 | gs.Uniform4f(location, sy.pospix.X, float32(height)-sy.pospix.Y, sy.width, sy.height) |
| 605 | } |
| 606 | |
| 607 | // |
| 608 | // Graph is the GUI element that represents a single plotted function. |
nothing calls this directly
no test coverage detected