This commit is contained in:
faiface 2016-11-26 00:31:20 +01:00
parent 2f7af40ce6
commit 6889c7f23f
3 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ package pixelgl
// you enter (load, bind) that object's state, then do something with it, and then leave the state. That 'something' // you enter (load, bind) that object's state, then do something with it, and then leave the state. That 'something'
// in between, let's call it sub (as in subroutine). // in between, let's call it sub (as in subroutine).
// //
// The recommended way to implement a Doer is to wrap another Doer (vertex array wrap texture and so on), let's call // The recommended way to implement a Doer is to wrap another Doer (vertex array wraps texture and so on), let's call
// it parent. Then the Do method will look like this: // it parent. Then the Do method will look like this:
// //
// func (o *MyObject) Do(sub func()) { // func (o *MyObject) Do(sub func()) {

View File

@ -2,7 +2,7 @@ package pixelgl
import "github.com/go-gl/gl/v3.3-core/gl" import "github.com/go-gl/gl/v3.3-core/gl"
// This file defines functions that can operate without a parent BeginEnder. // This file defines functions that can operate without a parent Doer.
// Clear clears the current context.. // Clear clears the current context..
func Clear(r, g, b, a float64) { func Clear(r, g, b, a float64) {

View File

@ -98,7 +98,7 @@ type VertexArray struct {
count int count int
} }
// NewVertexArray creates a new vertex array and wraps another BeginEnder around it. // NewVertexArray creates a new vertex array and wraps another Doer around it.
func NewVertexArray(parent Doer, format VertexFormat, mode VertexDrawMode, usage VertexUsage, data []float64) (*VertexArray, error) { func NewVertexArray(parent Doer, format VertexFormat, mode VertexDrawMode, usage VertexUsage, data []float64) (*VertexArray, error) {
va := &VertexArray{ va := &VertexArray{
parent: parent, parent: parent,