zorldo

Goofing around with Ebiten
git clone git://bsandro.tech/zorldo
Log | Files | Refs | README

interface.go (4089B)


      1 // Copyright 2020 The Ebiten Authors
      2 //
      3 // Licensed under the Apache License, Version 2.0 (the "License");
      4 // you may not use this file except in compliance with the License.
      5 // You may obtain a copy of the License at
      6 //
      7 //     http://www.apache.org/licenses/LICENSE-2.0
      8 //
      9 // Unless required by applicable law or agreed to in writing, software
     10 // distributed under the License is distributed on an "AS IS" BASIS,
     11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     12 // See the License for the specific language governing permissions and
     13 // limitations under the License.
     14 
     15 //go:build android || ios
     16 // +build android ios
     17 
     18 package gles
     19 
     20 type Context interface {
     21 	ActiveTexture(texture uint32)
     22 	AttachShader(program uint32, shader uint32)
     23 	BindAttribLocation(program uint32, index uint32, name string)
     24 	BindBuffer(target uint32, buffer uint32)
     25 	BindFramebuffer(target uint32, framebuffer uint32)
     26 	BindRenderbuffer(target uint32, renderbuffer uint32)
     27 	BindTexture(target uint32, texture uint32)
     28 	BlendFunc(sfactor uint32, dfactor uint32)
     29 	BufferData(target uint32, size int, data []byte, usage uint32)
     30 	BufferSubData(target uint32, offset int, data []byte)
     31 	CheckFramebufferStatus(target uint32) uint32
     32 	Clear(mask uint32)
     33 	ColorMask(red, green, blue, alpha bool)
     34 	CompileShader(shader uint32)
     35 	CreateProgram() uint32
     36 	CreateShader(xtype uint32) uint32
     37 	DeleteBuffers(buffers []uint32)
     38 	DeleteFramebuffers(framebuffers []uint32)
     39 	DeleteProgram(program uint32)
     40 	DeleteRenderbuffers(renderbuffer []uint32)
     41 	DeleteShader(shader uint32)
     42 	DeleteTextures(textures []uint32)
     43 	Disable(cap uint32)
     44 	DisableVertexAttribArray(index uint32)
     45 	DrawElements(mode uint32, count int32, xtype uint32, offset int)
     46 	Enable(cap uint32)
     47 	EnableVertexAttribArray(index uint32)
     48 	Flush()
     49 	FramebufferRenderbuffer(target uint32, attachment uint32, renderbuffertarget uint32, renderbuffer uint32)
     50 	FramebufferTexture2D(target uint32, attachment uint32, textarget uint32, texture uint32, level int32)
     51 	GenBuffers(n int32) []uint32
     52 	GenFramebuffers(n int32) []uint32
     53 	GenRenderbuffers(n int32) []uint32
     54 	GenTextures(n int32) []uint32
     55 	GetError() uint32
     56 	GetIntegerv(dst []int32, pname uint32)
     57 	GetProgramiv(dst []int32, program uint32, pname uint32)
     58 	GetProgramInfoLog(program uint32) string
     59 	GetShaderiv(dst []int32, shader uint32, pname uint32)
     60 	GetShaderInfoLog(shader uint32) string
     61 	GetShaderPrecisionFormat(shadertype uint32, precisiontype uint32) (rangeLow, rangeHigh, precision int)
     62 	GetUniformLocation(program uint32, name string) int32
     63 	IsFramebuffer(framebuffer uint32) bool
     64 	IsProgram(program uint32) bool
     65 	IsRenderbuffer(renderbuffer uint32) bool
     66 	IsTexture(texture uint32) bool
     67 	LinkProgram(program uint32)
     68 	PixelStorei(pname uint32, param int32)
     69 	ReadPixels(dst []byte, x int32, y int32, width int32, height int32, format uint32, xtype uint32)
     70 	RenderbufferStorage(target uint32, internalFormat uint32, width int32, height int32)
     71 	Scissor(x, y, width, height int32)
     72 	ShaderSource(shader uint32, xstring string)
     73 	StencilFunc(func_ uint32, ref int32, mask uint32)
     74 	StencilOp(sfail, dpfail, dppass uint32)
     75 	TexImage2D(target uint32, level int32, internalformat int32, width int32, height int32, format uint32, xtype uint32, pixels []byte)
     76 	TexParameteri(target uint32, pname uint32, param int32)
     77 	TexSubImage2D(target uint32, level int32, xoffset int32, yoffset int32, width int32, height int32, format uint32, xtype uint32, pixels []byte)
     78 	Uniform1f(location int32, v0 float32)
     79 	Uniform1fv(location int32, value []float32)
     80 	Uniform1i(location int32, v0 int32)
     81 	Uniform2fv(location int32, value []float32)
     82 	Uniform3fv(location int32, value []float32)
     83 	Uniform4fv(location int32, value []float32)
     84 	UniformMatrix2fv(location int32, transpose bool, value []float32)
     85 	UniformMatrix3fv(location int32, transpose bool, value []float32)
     86 	UniformMatrix4fv(location int32, transpose bool, value []float32)
     87 	UseProgram(program uint32)
     88 	VertexAttribPointer(index uint32, size int32, xtype uint32, normalized bool, stride int32, offset int)
     89 	Viewport(x int32, y int32, width int32, height int32)
     90 }