gles2

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2014 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

* The gles2 package contains the constants and interface compatible with * OpenGL ES2. * * All values are based on the public header from the Khronos group: * http://www.khronos.org/registry/gles/

Index

Constants

View Source
const (
	DEPTH_BUFFER_BIT   uint = 0x00000100
	STENCIL_BUFFER_BIT      = 0x00000400
	COLOR_BUFFER_BIT        = 0x00004000
)
View Source
const (
	POINTS         uint = 0x0000
	LINES               = 0x0001
	LINE_LOOP           = 0x0002
	LINE_STRIP          = 0x0003
	TRIANGLES           = 0x0004
	TRIANGLE_STRIP      = 0x0005
	TRIANGLE_FAN        = 0x0006
)
View Source
const (
	FRAGMENT_SHADER uint = 0x8B30
	VERTEX_SHADER        = 0x8B31
)
View Source
const (
	COMPILE_STATUS uint = 0x8B81
	LINK_STATUS         = 0x8B82
)
View Source
const (
	STREAM_DRAW  uint = 0x88E0
	STATIC_DRAW       = 0x88E4
	DYNAMIC_DRAW      = 0x88E8
)
View Source
const (
	BYTE           uint = 0x1400
	UNSIGNED_BYTE       = 0x1401
	SHORT               = 0x1402
	UNSIGNED_SHORT      = 0x1403
	INT                 = 0x1404
	UNSIGNED_INT        = 0x1405
	FLOAT               = 0x1406
)
View Source
const (
	NO_ERROR                      uint = 0
	INVALID_ENUM                       = 0x0500
	INVALID_VALUE                      = 0x0501
	INVALID_OPERATION                  = 0x0502
	OUT_OF_MEMORY                      = 0x0505
	INVALID_FRAMEBUFFER_OPERATION      = 0x0506
)
View Source
const (
	ARRAY_BUFFER uint = 0x8892
)
View Source
const (
	DEPTH_TEST uint = 0x0B71
)
View Source
const (
	RGBA uint = 0x1908
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenGl

type OpenGl interface {
	AttachShader(program uint, shader uint)

	BindAttribLocation(program uint, index int, name string)
	BindBuffer(target uint, buffer uint)
	BufferData(target uint, size int, data interface{}, usage uint)

	Clear(mask uint)
	ClearColor(red float32, green float32, blue float32, alpha float32)

	CompileShader(shader uint)

	CreateProgram() uint
	CreateShader(shaderType uint) uint

	DeleteBuffers(buffers []uint)
	DeleteProgram(program uint)
	DeleteShader(shader uint)

	DrawArrays(mode uint, first int, count int)

	Enable(cap uint)
	EnableVertexAttribArray(index int)

	GenBuffers(n int) []uint

	GetAttribLocation(program uint, name string) int
	GetError() uint
	GetShaderInfoLog(shader uint) string
	GetShaderParameter(shader uint, param uint) int
	GetProgramParameter(program uint, param uint) int
	GetUniformLocation(program uint, name string) int

	LinkProgram(program uint)

	ReadPixels(x int, y int, width int, height int, format uint, pixelType uint, pixels interface{})

	ShaderSource(shader uint, source string)

	UniformMatrix4fv(location int, transpose bool, value ...[]float32)
	UseProgram(program uint)

	VertexAttribOffset(index int, size int, attribType uint, normalized bool, stride int, offset int)
	Viewport(x int, y int, width int, height int)
}

Jump to

Keyboard shortcuts

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