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)
| 702 | // It overrides the original panel RenderSetup |
| 703 | // Calculates the model matrix and transfer to OpenGL. |
| 704 | func (lg *Graph) RenderSetup(gs *gls.GLS, rinfo *core.RenderInfo) { |
| 705 | |
| 706 | // Sets model matrix |
| 707 | var mm math32.Matrix4 |
| 708 | lg.SetModelMatrix(gs, &mm) |
| 709 | |
| 710 | // Transfer model matrix uniform |
| 711 | location := lg.uniMatrix.Location(gs) |
| 712 | gs.UniformMatrix4fv(location, 1, false, &mm[0]) |
| 713 | |
| 714 | // Sets bounds in OpenGL window coordinates and transfer to shader |
| 715 | _, _, _, height := gs.GetViewport() |
| 716 | location = lg.uniBounds.Location(gs) |
| 717 | gs.Uniform4f(location, lg.pospix.X, float32(height)-lg.pospix.Y, lg.width, lg.height) |
| 718 | } |
| 719 | |
| 720 | // |
| 721 | // Chart material |
nothing calls this directly
no test coverage detected