作者:Nvvee
项目:g
// void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params);
func GetRenderbufferParameteriv(target, pname GLenum, params []int32) {
if len(params) == 0 {
panic(ErrorInputSize)
}
C.glGetRenderbufferParameteriv(C.GLenum(target), C.GLenum(pname), (*C.GLint)(¶ms[0]))
}
作者:remogatt
项目:egle
func GetRenderbufferParameteriv(
target Enum, pname Enum, params *int32) {
C.glGetRenderbufferParameteriv(
C.GLenum(target),
C.GLenum(pname),
(*C.GLint)(params))
}
作者:jacksca
项目:go-gles
func TexImage2D(target TextureTarget, level int, internalformat InternalFormat, width, height int, format TextureFormat, datatype DataType, pixels []uint8) {
if pixels != nil {
C.glTexImage2D(C.GLenum(target), C.GLint(level), C.GLint(internalformat), C.GLsizei(width), C.GLsizei(height), 0, C.GLenum(format), C.GLenum(datatype), unsafe.Pointer(&pixels[0]))
} else {
C.glTexImage2D(C.GLenum(target), C.GLint(level), C.GLint(internalformat), C.GLsizei(width), C.GLsizei(height), 0, C.GLenum(format), C.GLenum(datatype), unsafe.Pointer(nil))
}
}
作者:jasonrpower
项目:g
// void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params);
func GetRenderbufferParameteriv(target, pname GLenum, params []int32) {
if len(params) == 0 {
panic("Invalid params size")
}
C.glGetRenderbufferParameteriv(C.GLenum(target), C.GLenum(pname), (*C.GLint)(¶ms[0]))
}
作者:remogatt
项目:egle
func BlendEquationSeparate(
modeRGB Enum, modeAlpha Enum) {
C.glBlendEquationSeparate(
C.GLenum(modeRGB),
C.GLenum(modeAlpha))
}
作者:remogatt
项目:egle
func TexParameterf(
target Enum, pname Enum, param float32) {
C.glTexParameterf(
C.GLenum(target),
C.GLenum(pname),
C.GLfloat(param))
}
作者:remogatt
项目:egle
func TexParameteriv(
target Enum, pname Enum, params *int32) {
C.glTexParameteriv(
C.GLenum(target),
C.GLenum(pname),
(*C.GLint)(params))
}
作者:remogatt
项目:egle
func TexParameterfv(
target Enum, pname Enum, params *float32) {
C.glTexParameterfv(
C.GLenum(target),
C.GLenum(pname),
(*C.GLfloat)(params))
}
作者:remogatt
项目:egle
func TexParameteri(
target Enum, pname Enum, param int32) {
C.glTexParameteri(
C.GLenum(target),
C.GLenum(pname),
C.GLint(param))
}
作者:nick-fedesn
项目:egle
func CopyTexImage2D(target uint, level int, internalformat uint,
x, y, width, height, border int) {
C.glCopyTexImage2D(
C.GLenum(target), C.GLint(level), C.GLenum(internalformat),
C.GLint(x), C.GLint(y), C.GLsizei(width), C.GLsizei(height),
C.GLint(border))
}
作者:remogatt
项目:egle
func StencilOp(
fail Enum, zfail Enum, zpass Enum) {
C.glStencilOp(
C.GLenum(fail),
C.GLenum(zfail),
C.GLenum(zpass))
}
作者:remogatt
项目:egle
func BlendFunc(
sfactor Enum, dfactor Enum) {
C.glBlendFunc(
C.GLenum(sfactor),
C.GLenum(dfactor))
}
作者:nick-fedesn
项目:egle
func GetShaderPrecisionFormat(shadertype, precisiontype uint) (
range_ int32, precision int32) {
C.glGetShaderPrecisionFormat(
C.GLenum(shadertype), C.GLenum(precisiontype),
(*C.GLint)(&range_), (*C.GLint)(&precision))
return
}
作者:extram
项目:g
// Set calls glBufferData with appropriate arguments to load the data pointed to by data into the buffer. usage is passed along verbatim. targ is used for binding and it should most likely be ARRAY_BUFFER.
func (buf *Buffer) Set(targ int, data interface{}, usage int) {
buf.Bind(targ)
p, t, ts, s := toCtype(data)
C.glBufferData(C.GLenum(targ), C.GLsizeiptr(s), p, C.GLenum(usage))
buf.t = t
buf.ts = ts
buf.Unbind(targ)
}
作者:nick-fedesn
项目:egle
func CompressedTexImage2D(target uint, level int, internalformat uint,
width, height, border, imageSize int, data Void) {
C.glCompressedTexImage2D(
C.GLenum(target), C.GLint(level), C.GLenum(internalformat),
C.GLsizei(width), C.GLsizei(height),
C.GLint(border), C.GLsizei(imageSize),
unsafe.Pointer(data))
}
作者:nick-fedesn
项目:egle
func TexSubImage2D(target uint, level, xoffset, yoffset, width, height int,
format, type_ uint, pixels Void) {
C.glTexSubImage2D(C.GLenum(target), C.GLint(level),
C.GLint(xoffset), C.GLint(yoffset), C.GLsizei(width), C.GLsizei(height),
C.GLenum(format), C.GLenum(type_),
unsafe.Pointer(pixels))
}
作者:nick-fedesn
项目:egle
func GetFramebufferAttachmentParameteriv(
target, attachment, pname uint, params []int32) []int32 {
C.glGetFramebufferAttachmentParameteriv(
C.GLenum(target), C.GLenum(attachment),
C.GLenum(pname), (*C.GLint)(¶ms[0]))
return params
}
作者:remogatt
项目:egle
func GetFramebufferAttachmentParameteriv(
target Enum, attachment Enum, pname Enum, params *int32) {
C.glGetFramebufferAttachmentParameteriv(
C.GLenum(target),
C.GLenum(attachment),
C.GLenum(pname),
(*C.GLint)(params))
}
作者:remogatt
项目:egle
func StencilFuncSeparate(
face Enum, func_ Enum, ref int32, mask uint32) {
C.glStencilFuncSeparate(
C.GLenum(face),
C.GLenum(func_),
C.GLint(ref),
C.GLuint(mask))
}
作者:nick-fedesn
项目:egle
func CompressedTexSubImage2D(target uint, level, xoffset, yoffset int,
width, height int, format uint, imageSize int, data Void) {
C.glCompressedTexSubImage2D(
C.GLenum(target), C.GLint(level),
C.GLint(xoffset), C.GLint(yoffset),
C.GLsizei(width), C.GLsizei(height),
C.GLenum(format), C.GLsizei(imageSize),
unsafe.Pointer(data))
}