Skip to content

Instantly share code, notes, and snippets.

@s-l-teichmann
Created April 30, 2014 13:20
Show Gist options
  • Save s-l-teichmann/401bcfc6d495f8752c18 to your computer and use it in GitHub Desktop.
Save s-l-teichmann/401bcfc6d495f8752c18 to your computer and use it in GitHub Desktop.
Make github.com/go-gl/glu compile again.
diff --git a/glu.go b/glu.go
index cd0d471..54b226b 100644
--- a/glu.go
+++ b/glu.go
@@ -137,17 +137,17 @@ func NewQuadric() unsafe.Pointer {
}
func Sphere(q unsafe.Pointer, radius float32, slices, stacks int) {
- C.gluSphere((*[0]byte)(q), C.GLdouble(radius), C.GLint(slices), C.GLint(stacks))
+ C.gluSphere((*C.GLUquadric)(q), C.GLdouble(radius), C.GLint(slices), C.GLint(stacks))
}
func Cylinder(q unsafe.Pointer, base, top, height float32, slices, stacks int) {
- C.gluCylinder((*[0]byte)(q), C.GLdouble(base), C.GLdouble(top), C.GLdouble(height), C.GLint(slices), C.GLint(stacks))
+ C.gluCylinder((*C.GLUquadric)(q), C.GLdouble(base), C.GLdouble(top), C.GLdouble(height), C.GLint(slices), C.GLint(stacks))
}
func Disk(q unsafe.Pointer, inner, outer float32, slices, loops int) {
- C.gluDisk((*[0]byte)(q), C.GLdouble(inner), C.GLdouble(outer), C.GLint(slices), C.GLint(loops))
+ C.gluDisk((*C.GLUquadric)(q), C.GLdouble(inner), C.GLdouble(outer), C.GLint(slices), C.GLint(loops))
}
func PartialDisk(q unsafe.Pointer, inner, outer float32, slices, loops int, startAngle, sweepAngle float32) {
- C.gluPartialDisk((*[0]byte)(q), C.GLdouble(inner), C.GLdouble(outer), C.GLint(slices), C.GLint(loops), C.GLdouble(startAngle), C.GLdouble(sweepAngle))
+ C.gluPartialDisk((*C.GLUquadric)(q), C.GLdouble(inner), C.GLdouble(outer), C.GLint(slices), C.GLint(loops), C.GLdouble(startAngle), C.GLdouble(sweepAngle))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment