示例#1
0
文件: callback.go 项目: 0xfaded/glu
// Sets the callback for TESS_COMBINE_DATA.
func (tess *Tesselator) SetCombineCallback(f TessCombineHandler) {
	if tess.tess == nil {
		panic("Uninitialised Tesselator. @see glu.NewTess.")
	}
	tess.combineData = f
	C.setGluTessCallback(tess.tess, C.GLenum(TESS_COMBINE_DATA))
}
示例#2
0
文件: callback.go 项目: 0xfaded/glu
// Sets the callback for TESS_EDGE_FLAG_DATA.
func (tess *Tesselator) SetEdgeFlagCallback(f TessEdgeFlagHandler) {
	if tess.tess == nil {
		panic("Uninitialised Tesselator. @see glu.NewTess.")
	}
	tess.edgeFlagData = f
	C.setGluTessCallback(tess.tess, C.GLenum(TESS_EDGE_FLAG_DATA))
}
示例#3
0
文件: callback.go 项目: 0xfaded/glu
// Sets the callback for TESS_ERROR_DATA.
func (tess *Tesselator) SetErrorCallback(f TessErrorHandler) {
	if tess.tess == nil {
		panic("Uninitialised Tesselator. @see glu.NewTess.")
	}
	tess.errorData = f
	C.setGluTessCallback(tess.tess, C.GLenum(TESS_ERROR_DATA))
}
示例#4
0
文件: callback.go 项目: 0xfaded/glu
// Sets the callback for TESS_END_DATA.
func (tess *Tesselator) SetEndCallback(f TessEndHandler) {
	if tess.tess == nil {
		panic("Uninitialised Tesselator. @see glu.NewTess.")
	}
	tess.endData = f
	C.setGluTessCallback(tess.tess, C.GLenum(TESS_END_DATA))
}
示例#5
0
文件: callback.go 项目: 0xfaded/glu
// Sets the callback for TESS_VERTEX_DATA.
func (tess *Tesselator) SetVertexCallback(f TessVertexHandler) {
	if tess.tess == nil {
		panic("Uninitialised Tesselator. @see glu.NewTess.")
	}
	tess.vertexData = f
	C.setGluTessCallback(tess.tess, C.GLenum(TESS_VERTEX_DATA))
}
示例#6
0
文件: callback.go 项目: 0xfaded/glu
// Sets the callback for TESS_BEGIN_DATA.
func (tess *Tesselator) SetBeginCallback(f TessBeginHandler) {
	if tess.tess == nil {
		panic("Uninitialised Tesselator. @see glu.NewTess.")
	}
	tess.beginData = f
	C.setGluTessCallback(tess.tess, C.GLenum(TESS_BEGIN_DATA))
}