aboutsummaryrefslogtreecommitdiff
path: root/color.go
blob: 76aac2bcd8c61d7a0c5ec62c96ea716d8a7d490e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
// Copyright 2012 The go-gl Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package gl

// #include "gl.h"
import "C"

//void glColor3b (int8 red, int8 green, int8 blue)
func Color3b(red int8, green int8, blue int8) {
	C.glColor3b(C.GLbyte(red), C.GLbyte(green), C.GLbyte(blue))
}

//void glColor3bv (const int8 *v)
func Color3bv(v *[3]int8) {
	C.glColor3bv((*C.GLbyte)(&v[0]))
}

//void glColor3d (float64 red, float64 green, float64 blue)
func Color3d(red float64, green float64, blue float64) {
	C.glColor3d(C.GLdouble(red), C.GLdouble(green), C.GLdouble(blue))
}

//void glColor3dv (const float64 *v)
func Color3dv(v *[3]float64) {
	C.glColor3dv((*C.GLdouble)(&v[0]))
}

//void glColor3f (float32 red, float32 green, float32 blue)
func Color3f(red float32, green float32, blue float32) {
	C.glColor3f(C.GLfloat(red), C.GLfloat(green), C.GLfloat(blue))
}

//void glColor3fv (const float *v)
func Color3fv(v *[3]float32) {
	C.glColor3fv((*C.GLfloat)(&v[0]))
}

//void glColor3i (int red, int green, int blue)
func Color3i(red int, green int, blue int) {
	C.glColor3i(C.GLint(red), C.GLint(green), C.GLint(blue))
}

//void glColor3iv (const int *v)
func Color3iv(v *[3]int32) {
	C.glColor3iv((*C.GLint)(&v[0]))
}

//void glColor3s (int16 red, int16 green, int16 blue)
func Color3s(red int16, green int16, blue int16) {
	C.glColor3s(C.GLshort(red), C.GLshort(green), C.GLshort(blue))
}

//void glColor3sv (const int16 *v)
func Color3sv(v *[3]int16) {
	C.glColor3sv((*C.GLshort)(&v[0]))
}

//void glColor3ub (uint8 red, uint8 green, uint8 blue)
func Color3ub(red uint8, green uint8, blue uint8) {
	C.glColor3ub(C.GLubyte(red), C.GLubyte(green), C.GLubyte(blue))
}

//void glColor3ubv (const uint8 *v)
func Color3ubv(v *[3]uint8) {
	C.glColor3ubv((*C.GLubyte)(&v[0]))
}

//void glColor3ui (uint red, uint green, uint blue)
func Color3ui(red uint, green uint, blue uint) {
	C.glColor3ui(C.GLuint(red), C.GLuint(green), C.GLuint(blue))
}

//void glColor3uiv (const uint *v)
func Color3uiv(v *[3]uint32) {
	C.glColor3uiv((*C.GLuint)(&v[0]))
}

//void glColor3us (uint16 red, uint16 green, uint16 blue)
func Color3us(red uint16, green uint16, blue uint16) {
	C.glColor3us(C.GLushort(red), C.GLushort(green), C.GLushort(blue))
}

//void glColor3usv (const uint16 *v)
func Color3usv(v *[3]uint16) {
	C.glColor3usv((*C.GLushort)(&v[0]))
}

//void glColor4b (int8 red, int8 green, int8 blue, int8 alpha)
func Color4b(red int8, green int8, blue int8, alpha int8) {
	C.glColor4b(C.GLbyte(red), C.GLbyte(green), C.GLbyte(blue), C.GLbyte(alpha))
}

//void glColor4bv (const int8 *v)
func Color4bv(v *[4]int8) {
	C.glColor4bv((*C.GLbyte)(&v[0]))
}

//void glColor4d (float64 red, float64 green, float64 blue, float64 alpha)
func Color4d(red float64, green float64, blue float64, alpha float64) {
	C.glColor4d(C.GLdouble(red), C.GLdouble(green), C.GLdouble(blue), C.GLdouble(alpha))
}

//void glColor4dv (const float64 *v)
func Color4dv(v *[4]float64) {
	C.glColor4dv((*C.GLdouble)(&v[0]))
}

//void glColor4f (float32 red, float32 green, float32 blue, float32 alpha)
func Color4f(red float32, green float32, blue float32, alpha float32) {
	C.glColor4f(C.GLfloat(red), C.GLfloat(green), C.GLfloat(blue), C.GLfloat(alpha))
}

//void glColor4fv (const float *v)
func Color4fv(v *[4]float32) {
	C.glColor4fv((*C.GLfloat)(&v[0]))
}

//void glColor4i (int red, int green, int blue, int alpha)
func Color4i(red int, green int, blue int, alpha int) {
	C.glColor4i(C.GLint(red), C.GLint(green), C.GLint(blue), C.GLint(alpha))
}

//void glColor4iv (const int *v)
func Color4iv(v *[4]int32) {
	C.glColor4iv((*C.GLint)(&v[0]))
}

//void glColor4s (int16 red, int16 green, int16 blue, int16 alpha)
func Color4s(red int16, green int16, blue int16, alpha int16) {
	C.glColor4s(C.GLshort(red), C.GLshort(green), C.GLshort(blue), C.GLshort(alpha))
}

//void glColor4sv (const int16 *v)
func Color4sv(v *[4]int16) {
	C.glColor4sv((*C.GLshort)(&v[0]))
}

//void glColor4ub (uint8 red, uint8 green, uint8 blue, uint8 alpha)
func Color4ub(red uint8, green uint8, blue uint8, alpha uint8) {
	C.glColor4ub(C.GLubyte(red), C.GLubyte(green), C.GLubyte(blue), C.GLubyte(alpha))
}

//void glColor4ubv (const uint8 *v)
func Color4ubv(v *[4]uint8) {
	C.glColor4ubv((*C.GLubyte)(&v[0]))
}

//void glColor4ui (uint red, uint green, uint blue, uint alpha)
func Color4ui(red uint, green uint, blue uint, alpha uint) {
	C.glColor4ui(C.GLuint(red), C.GLuint(green), C.GLuint(blue), C.GLuint(alpha))
}

//void glColor4uiv (const uint *v)
func Color4uiv(v *[4]uint32) {
	C.glColor4uiv((*C.GLuint)(&v[0]))
}

//void glColor4us (uint16 red, uint16 green, uint16 blue, uint16 alpha)
func Color4us(red uint16, green uint16, blue uint16, alpha uint16) {
	C.glColor4us(C.GLushort(red), C.GLushort(green), C.GLushort(blue), C.GLushort(alpha))
}

//void glColor4usv (const uint16 *v)
func Color4usv(v *[4]uint16) {
	C.glColor4usv((*C.GLushort)(&v[0]))
}

//void glColorMask (bool red, bool green, bool blue, bool alpha)
func ColorMask(red bool, green bool, blue bool, alpha bool) {
	C.glColorMask(glBool(red), glBool(green), glBool(blue), glBool(alpha))
}

//void glColorMaterial (GLenum face, GLenum mode)
func ColorMaterial(face GLenum, mode GLenum) {
	C.glColorMaterial(C.GLenum(face), C.GLenum(mode))
}

//void glColorPointer (int size, GLenum type, int stride, const GLvoid *pointer)
func ColorPointer(size int, typ GLenum, stride int, pointer interface{}) {
	C.glColorPointer(C.GLint(size), C.GLenum(typ), C.GLsizei(stride),
		ptr(pointer))
}