瀏覽代碼

Improve consistency of comments

Daniel Salvadori 6 年之前
父節點
當前提交
9aa4f8c7c2
共有 3 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      gls/program.go
  2. 1 1
      renderer/shaman.go
  3. 1 1
      util/stats/stats.go

+ 1 - 1
gls/program.go

@@ -17,7 +17,7 @@ import (
 // It must have Vertex and Fragment shaders.
 // It can also have a Geometry shader.
 type Program struct {
-	gs         *GLS             // OpenGL state
+	gs         *GLS             // Reference to OpenGL state
 	ShowSource bool             // Show source code in error messages
 	handle     uint32           // OpenGL program handle
 	shaders    []shaderInfo     // List of shaders for this program

+ 1 - 1
renderer/shaman.go

@@ -47,7 +47,7 @@ type ProgSpecs struct {
 
 // Shaman is the shader manager
 type Shaman struct {
-	gs       *gls.GLS
+	gs       *gls.GLS                       // Reference to OpenGL state
 	includes map[string]string              // include files sources
 	shadersm map[string]string              // maps shader name to its template
 	proginfo map[string]shaders.ProgramInfo // maps name of the program to ProgramInfo

+ 1 - 1
util/stats/stats.go

@@ -8,6 +8,7 @@ import (
 
 // Stats contains several statistics useful for performance evaluation
 type Stats struct {
+	gs           *gls.GLS  // Reference to OpenGL state
 	Glstats      gls.Stats // GLS statistics structure
 	UnilocHits   int       // Uniform location cache hits per frame
 	UnilocMiss   int       // Uniform location cache misses per frame
@@ -16,7 +17,6 @@ type Stats struct {
 	Cgocalls     int       // Cgo calls per frame
 	prevGls      gls.Stats // previous gls statistics
 	prevCgocalls int64     // previous number of cgo calls
-	gs           *gls.GLS  // reference to gls state
 	frames       int       // frame counter
 	last         time.Time // last update time
 }