glu

package module
v0.0.0-...-ee1dc38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2012 License: BSD-3-Clause Imports: 5 Imported by: 0

README

This only contains some basic glu functions.

Make sure your pkg-config can provide valid compilation flags for glu.

To install type:

    goinstall github.com/banthar/glu

Documentation

Index

Constants

View Source
const (
	// TessCallback
	TESS_BEGIN_DATA     gl.GLenum = 100106
	TESS_VERTEX_DATA              = 100107
	TESS_END_DATA                 = 100108
	TESS_ERROR_DATA               = 100109
	TESS_EDGE_FLAG_DATA           = 100110
	TESS_COMBINE_DATA             = 100111

	// TessProperty
	TESS_WINDING_RULE  = 100140
	TESS_BOUNDARY_ONLY = 100141
	TESS_TOLERANCE     = 100142

	// TessWinding
	TESS_WINDING_ODD         = 100130
	TESS_WINDING_NONZERO     = 100131
	TESS_WINDING_POSITIVE    = 100132
	TESS_WINDING_NEGATIVE    = 100133
	TESS_WINDING_ABS_GEQ_TWO = 100134
)

Variables

This section is empty.

Functions

func Build2DMipmaps

func Build2DMipmaps(target gl.GLenum, internalFormat int, width, height int, format, typ gl.GLenum, data interface{}) int

func Cylinder

func Cylinder(q unsafe.Pointer, base, top, height float32, slices, stacks int)

func Disk

func Disk(q unsafe.Pointer, inner, outer float32, slices, loops int)

func ErrorString

func ErrorString(error gl.GLenum) (string, error)

func LookAt

func LookAt(eyeX, eyeY, eyeZ, centerX, centerY, centerZ, upX, upY, upZ float64)

func NewQuadric

func NewQuadric() unsafe.Pointer

func Perspective

func Perspective(fovy, aspect, zNear, zFar float64)

func Project

func Project(projX, projY, projZ float64, model, proj *[16]float64, view *[4]int32) (float64, float64, float64)

func Sphere

func Sphere(q unsafe.Pointer, radius float32, slices, stacks int)

func UnProject

func UnProject(winX, winY, winZ float64, model, proj *[16]float64, view *[4]int32) (float64, float64, float64)

Types

type TessBeginHandler

type TessBeginHandler func(tessType gl.GLenum, polygonData interface{})

type TessCombineHandler

type TessCombineHandler func(coords [3]float64,
	vertexData [4]interface{},
	weight [4]float32,
	polygonData interface{}) (outData interface{})

type TessEdgeFlagHandler

type TessEdgeFlagHandler func(flag bool, polygonData interface{})

type TessEndHandler

type TessEndHandler func(polygonData interface{})

type TessErrorHandler

type TessErrorHandler func(errno gl.GLenum, polygonData interface{})

type TessVertexHandler

type TessVertexHandler func(vertexData interface{}, polygonData interface{})

type Tesselator

type Tesselator struct {
	// contains filtered or unexported fields
}

Opaque object used for book keeping on the go side.

func NewTess

func NewTess() (tess *Tesselator)

Create a new tesselator.

func (*Tesselator) BeginContour

func (tess *Tesselator) BeginContour()

Begin a contour within the polygon.

func (*Tesselator) BeginPolygon

func (tess *Tesselator) BeginPolygon(data interface{})

Begin the drawing of the polygon, with the data parameter that will be provided to callbacks.

func (*Tesselator) Delete

func (tess *Tesselator) Delete()

Clean up resources held by the tesselator. Go's garbage collector cannot do this automatically.

func (*Tesselator) EndContour

func (tess *Tesselator) EndContour()

End a contour within the polygon.

func (*Tesselator) EndPolygon

func (tess *Tesselator) EndPolygon()

End the drawing of the polygon.

func (*Tesselator) Normal

func (tess *Tesselator) Normal(valueX, valueY, valueZ float64)

Set the normal of the plane onto which points are projected onto before tesselation.

func (*Tesselator) Property

func (tess *Tesselator) Property(which gl.GLenum, data float64)

Set a property of the tesselator.

func (*Tesselator) SetBeginCallback

func (tess *Tesselator) SetBeginCallback(f TessBeginHandler)

Sets the callback for TESS_BEGIN_DATA.

func (*Tesselator) SetCombineCallback

func (tess *Tesselator) SetCombineCallback(f TessCombineHandler)

Sets the callback for TESS_COMBINE_DATA.

func (*Tesselator) SetEdgeFlagCallback

func (tess *Tesselator) SetEdgeFlagCallback(f TessEdgeFlagHandler)

Sets the callback for TESS_EDGE_FLAG_DATA.

func (*Tesselator) SetEndCallback

func (tess *Tesselator) SetEndCallback(f TessEndHandler)

Sets the callback for TESS_END_DATA.

func (*Tesselator) SetErrorCallback

func (tess *Tesselator) SetErrorCallback(f TessErrorHandler)

Sets the callback for TESS_ERROR_DATA.

func (*Tesselator) SetVertexCallback

func (tess *Tesselator) SetVertexCallback(f TessVertexHandler)

Sets the callback for TESS_VERTEX_DATA.

func (*Tesselator) Vertex

func (tess *Tesselator) Vertex(location [3]float64, data interface{})

Add a vertex to the polygon, with the data parameter that will be provided to callbacks.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL