Documentation ¶
Index ¶
- Constants
- type WebGLCubeMap
- func (this *WebGLCubeMap) Bind(unit uint32)
- func (this *WebGLCubeMap) GetData() (data []byte, width int, height int)
- func (this *WebGLCubeMap) GetHeight() int
- func (this *WebGLCubeMap) GetKeyColor() color.Color
- func (this *WebGLCubeMap) GetModColor() color.Color
- func (this *WebGLCubeMap) GetName() string
- func (this *WebGLCubeMap) GetWidth() int
- func (this *WebGLCubeMap) Load(data []byte, width, height int, shadowMap bool)
- func (this *WebGLCubeMap) LoadFromImage(img image.Image)
- func (this *WebGLCubeMap) SetBorderColor(col color.Color)
- func (this *WebGLCubeMap) SetBorderDepth(depth float32)
- func (this *WebGLCubeMap) SetFiltering(filtering int)
- func (this *WebGLCubeMap) SetKeyColor(col color.Color)
- func (this *WebGLCubeMap) SetModColor(col color.Color)
- func (this *WebGLCubeMap) SetWrapping(wrapping int)
- func (this *WebGLCubeMap) Terminate()
- func (this *WebGLCubeMap) Unbind(unit uint32)
- type WebGLError
- type WebGLInstancedMesh3D
- func (this *WebGLInstancedMesh3D) AABB() gohome.AxisAlignedBoundingBox
- func (this *WebGLInstancedMesh3D) AddValue(valueType int)
- func (this *WebGLInstancedMesh3D) AddValueFront(valueType int)
- func (this *WebGLInstancedMesh3D) AddVertices(vertices []gohome.Mesh3DVertex, indices []uint32)
- func (this *WebGLInstancedMesh3D) CalculateTangents()
- func (this *WebGLInstancedMesh3D) CalculateTangentsRoutine(startIndex, maxIndex int, wg *sync.WaitGroup)
- func (this *WebGLInstancedMesh3D) Copy() gohome.Mesh3D
- func (this *WebGLInstancedMesh3D) GetIndices() []uint32
- func (this *WebGLInstancedMesh3D) GetMaterial() *gohome.Material
- func (this *WebGLInstancedMesh3D) GetName() string
- func (this *WebGLInstancedMesh3D) GetNumIndices() int
- func (this *WebGLInstancedMesh3D) GetNumInstances() int
- func (this *WebGLInstancedMesh3D) GetNumUsedInstances() int
- func (this *WebGLInstancedMesh3D) GetNumVertices() int
- func (this *WebGLInstancedMesh3D) GetVertices() []gohome.Mesh3DVertex
- func (this *WebGLInstancedMesh3D) HasUV() bool
- func (this *WebGLInstancedMesh3D) Load()
- func (this *WebGLInstancedMesh3D) LoadedToGPU() bool
- func (this *WebGLInstancedMesh3D) Render()
- func (this *WebGLInstancedMesh3D) SetF(index int, value []float32)
- func (this *WebGLInstancedMesh3D) SetM2(index int, value []mgl32.Mat2)
- func (this *WebGLInstancedMesh3D) SetM3(index int, value []mgl32.Mat3)
- func (this *WebGLInstancedMesh3D) SetM4(index int, value []mgl32.Mat4)
- func (this *WebGLInstancedMesh3D) SetMaterial(mat *gohome.Material)
- func (this *WebGLInstancedMesh3D) SetName(index, value_type int, value string)
- func (this *WebGLInstancedMesh3D) SetNumInstances(n int)
- func (this *WebGLInstancedMesh3D) SetNumUsedInstances(n int)
- func (this *WebGLInstancedMesh3D) SetV2(index int, value []mgl32.Vec2)
- func (this *WebGLInstancedMesh3D) SetV3(index int, value []mgl32.Vec3)
- func (this *WebGLInstancedMesh3D) SetV4(index int, value []mgl32.Vec4)
- func (this *WebGLInstancedMesh3D) Terminate()
- type WebGLMesh2D
- type WebGLMesh3D
- func (oglm *WebGLMesh3D) AABB() gohome.AxisAlignedBoundingBox
- func (oglm *WebGLMesh3D) AddVertices(vertices []gohome.Mesh3DVertex, indices []uint32)
- func (oglm *WebGLMesh3D) CalculateTangents()
- func (oglm *WebGLMesh3D) CalculateTangentsRoutine(startIndex, maxIndex int, wg *sync.WaitGroup)
- func (oglm *WebGLMesh3D) Copy() gohome.Mesh3D
- func (oglm *WebGLMesh3D) GetIndices() []uint32
- func (oglm *WebGLMesh3D) GetMaterial() *gohome.Material
- func (oglm *WebGLMesh3D) GetName() string
- func (oglm *WebGLMesh3D) GetNumIndices() int
- func (oglm *WebGLMesh3D) GetNumVertices() int
- func (oglm *WebGLMesh3D) GetVertices() []gohome.Mesh3DVertex
- func (oglm *WebGLMesh3D) HasUV() bool
- func (oglm *WebGLMesh3D) Load()
- func (oglm *WebGLMesh3D) LoadedToGPU() bool
- func (oglm *WebGLMesh3D) Render()
- func (oglm *WebGLMesh3D) SetMaterial(mat *gohome.Material)
- func (oglm *WebGLMesh3D) Terminate()
- type WebGLRenderTexture
- func (this *WebGLRenderTexture) Bind(unit uint32)
- func (this *WebGLRenderTexture) BindIndex(index int, unit uint32)
- func (this *WebGLRenderTexture) Blit(rtex gohome.RenderTexture)
- func (this *WebGLRenderTexture) ChangeSize(width, height int)
- func (this *WebGLRenderTexture) Create(name string, width, height, textures int, ...)
- func (this *WebGLRenderTexture) GetData() ([]byte, int, int)
- func (this *WebGLRenderTexture) GetHeight() int
- func (this *WebGLRenderTexture) GetKeyColor() color.Color
- func (this *WebGLRenderTexture) GetModColor() color.Color
- func (this *WebGLRenderTexture) GetName() string
- func (this *WebGLRenderTexture) GetWidth() int
- func (this *WebGLRenderTexture) Load(data []byte, width, height int, shadowMap bool)
- func (ogltex *WebGLRenderTexture) LoadFromImage(img image.Image)
- func (this *WebGLRenderTexture) SetAsTarget()
- func (this *WebGLRenderTexture) SetBorderColor(col color.Color)
- func (this *WebGLRenderTexture) SetBorderDepth(depth float32)
- func (this *WebGLRenderTexture) SetFiltering(filtering int)
- func (this *WebGLRenderTexture) SetKeyColor(col color.Color)
- func (this *WebGLRenderTexture) SetModColor(col color.Color)
- func (this *WebGLRenderTexture) SetWrapping(wrapping int)
- func (this *WebGLRenderTexture) Terminate()
- func (this *WebGLRenderTexture) Unbind(unit uint32)
- func (this *WebGLRenderTexture) UnbindIndex(index int, unit uint32)
- func (this *WebGLRenderTexture) UnsetAsTarget()
- type WebGLRenderer
- func (this *WebGLRenderer) AfterInit()
- func (this *WebGLRenderer) AfterRender()
- func (*WebGLRenderer) ClearScreen(c color.Color)
- func (*WebGLRenderer) CreateCubeMap(name string) gohome.CubeMap
- func (*WebGLRenderer) CreateInstancedMesh3D(name string) gohome.InstancedMesh3D
- func (*WebGLRenderer) CreateMesh2D(name string) gohome.Mesh2D
- func (*WebGLRenderer) CreateMesh3D(name string) gohome.Mesh3D
- func (*WebGLRenderer) CreateRenderTexture(name string, width, height, textures int, ...) gohome.RenderTexture
- func (this *WebGLRenderer) CreateShape2DInterface(name string) gohome.Shape2DInterface
- func (*WebGLRenderer) CreateShape3DInterface(name string) gohome.Shape3DInterface
- func (*WebGLRenderer) CreateTexture(name string, multiSampled bool) gohome.Texture
- func (this *WebGLRenderer) DecrementTextureUnit(amount uint32)
- func (this *WebGLRenderer) GetBackgroundColor() color.Color
- func (this *WebGLRenderer) GetMaxTextures() int
- func (this *WebGLRenderer) GetName() string
- func (this *WebGLRenderer) GetNativeResolution() mgl32.Vec2
- func (this *WebGLRenderer) GetVersioni() int
- func (this *WebGLRenderer) GetViewport() gohome.Viewport
- func (this *WebGLRenderer) HasExtension(name string) bool
- func (this *WebGLRenderer) HasFunctionAvailable(function string) bool
- func (this *WebGLRenderer) Init() error
- func (this *WebGLRenderer) InstancedMesh3DFromLoadedMesh3D(mesh gohome.Mesh3D) gohome.InstancedMesh3D
- func (this *WebGLRenderer) LoadShader(name, vertex_contents, fragment_contents, geometry_contents, ... string) (gohome.Shader, error)
- func (this *WebGLRenderer) NextTextureUnit() uint32
- func (this *WebGLRenderer) OnResize(newWidth, newHeight int)
- func (this *WebGLRenderer) PreRender()
- func (this *WebGLRenderer) RenderBackBuffer()
- func (this *WebGLRenderer) SetBacckFaceCulling(b bool)
- func (this *WebGLRenderer) SetBackgroundColor(bgColor color.Color)
- func (this *WebGLRenderer) SetDepthTesting(b bool)
- func (this *WebGLRenderer) SetNativeResolution(width, height int)
- func (this *WebGLRenderer) SetViewport(viewport gohome.Viewport)
- func (this *WebGLRenderer) SetWireFrame(b bool)
- func (this *WebGLRenderer) Terminate()
- type WebGLShader
- func (s *WebGLShader) AddAttribute(name string, location uint32)
- func (s *WebGLShader) AddShader(shader_type uint8, src string) error
- func (s *WebGLShader) GetName() string
- func (s *WebGLShader) Link() error
- func (s *WebGLShader) SetUniformB(name string, value uint8)
- func (s *WebGLShader) SetUniformF(name string, value float32)
- func (s *WebGLShader) SetUniformI(name string, value int32)
- func (s *WebGLShader) SetUniformIV2(name string, value []int32)
- func (s *WebGLShader) SetUniformIV3(name string, value []int32)
- func (s *WebGLShader) SetUniformIV4(name string, value []int32)
- func (s *WebGLShader) SetUniformLights(lightCollectionIndex int)
- func (s *WebGLShader) SetUniformM2(name string, value mgl32.Mat2)
- func (s *WebGLShader) SetUniformM3(name string, value mgl32.Mat3)
- func (s *WebGLShader) SetUniformM4(name string, value mgl32.Mat4)
- func (s *WebGLShader) SetUniformMaterial(mat gohome.Material)
- func (s *WebGLShader) SetUniformUI(name string, value uint32)
- func (s *WebGLShader) SetUniformV2(name string, value mgl32.Vec2)
- func (s *WebGLShader) SetUniformV3(name string, value mgl32.Vec3)
- func (s *WebGLShader) SetUniformV4(name string, value mgl32.Vec4)
- func (s *WebGLShader) Setup() error
- func (s *WebGLShader) Terminate()
- func (s *WebGLShader) Unuse()
- func (s *WebGLShader) Use()
- type WebGLShape2DInterface
- func (this *WebGLShape2DInterface) AddLines(lines []gohome.Line2D)
- func (this *WebGLShape2DInterface) AddPoints(points []gohome.Shape2DVertex)
- func (this *WebGLShape2DInterface) AddTriangles(tris []gohome.Triangle2D)
- func (this *WebGLShape2DInterface) GetPoints() []gohome.Shape2DVertex
- func (this *WebGLShape2DInterface) Init()
- func (this *WebGLShape2DInterface) Load()
- func (this *WebGLShape2DInterface) Render()
- func (this *WebGLShape2DInterface) SetDrawMode(mode uint8)
- func (this *WebGLShape2DInterface) SetLineWidth(width float32)
- func (this *WebGLShape2DInterface) SetPointSize(size float32)
- func (this *WebGLShape2DInterface) Terminate()
- type WebGLShape3DInterface
- func (this *WebGLShape3DInterface) AddPoints(points []gohome.Shape3DVertex)
- func (this *WebGLShape3DInterface) GetPoints() []gohome.Shape3DVertex
- func (this *WebGLShape3DInterface) Init()
- func (this *WebGLShape3DInterface) Load()
- func (this *WebGLShape3DInterface) Render()
- func (this *WebGLShape3DInterface) SetDrawMode(drawMode uint8)
- func (this *WebGLShape3DInterface) SetLineWidth(width float32)
- func (this *WebGLShape3DInterface) SetPointSize(size float32)
- func (this *WebGLShape3DInterface) Terminate()
- type WebGLTexture
- func (ogltex *WebGLTexture) Bind(unit uint32)
- func (ogltex *WebGLTexture) GetData() (data []byte, width int, height int)
- func (ogltex *WebGLTexture) GetHeight() int
- func (ogltex *WebGLTexture) GetKeyColor() color.Color
- func (ogltex *WebGLTexture) GetModColor() color.Color
- func (ogltex *WebGLTexture) GetName() string
- func (ogltex *WebGLTexture) GetWidth() int
- func (ogltex *WebGLTexture) Load(data []byte, width, height int, shadowMap bool)
- func (ogltex *WebGLTexture) LoadFromImage(img image.Image)
- func (ogltex *WebGLTexture) SetBorderColor(col color.Color)
- func (ogltex *WebGLTexture) SetBorderDepth(depth float32)
- func (ogltex *WebGLTexture) SetFiltering(filtering int)
- func (ogltex *WebGLTexture) SetKeyColor(col color.Color)
- func (ogltex *WebGLTexture) SetModColor(col color.Color)
- func (ogltex *WebGLTexture) SetWrapping(wrapping int)
- func (ogltex *WebGLTexture) Terminate()
- func (ogltex *WebGLTexture) Unbind(unit uint32)
Constants ¶
View Source
const (
NUM_GO_ROUTINES_TANGENTS_CALCULATING = 10
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WebGLCubeMap ¶
type WebGLCubeMap struct {
// contains filtered or unexported fields
}
func CreateWebGLCubeMap ¶
func CreateWebGLCubeMap(name string) *WebGLCubeMap
func (*WebGLCubeMap) Bind ¶
func (this *WebGLCubeMap) Bind(unit uint32)
func (*WebGLCubeMap) GetData ¶
func (this *WebGLCubeMap) GetData() (data []byte, width int, height int)
func (*WebGLCubeMap) GetHeight ¶
func (this *WebGLCubeMap) GetHeight() int
func (*WebGLCubeMap) GetKeyColor ¶
func (this *WebGLCubeMap) GetKeyColor() color.Color
func (*WebGLCubeMap) GetModColor ¶
func (this *WebGLCubeMap) GetModColor() color.Color
func (*WebGLCubeMap) GetName ¶
func (this *WebGLCubeMap) GetName() string
func (*WebGLCubeMap) GetWidth ¶
func (this *WebGLCubeMap) GetWidth() int
func (*WebGLCubeMap) Load ¶
func (this *WebGLCubeMap) Load(data []byte, width, height int, shadowMap bool)
func (*WebGLCubeMap) LoadFromImage ¶
func (this *WebGLCubeMap) LoadFromImage(img image.Image)
func (*WebGLCubeMap) SetBorderColor ¶
func (this *WebGLCubeMap) SetBorderColor(col color.Color)
func (*WebGLCubeMap) SetBorderDepth ¶
func (this *WebGLCubeMap) SetBorderDepth(depth float32)
func (*WebGLCubeMap) SetFiltering ¶
func (this *WebGLCubeMap) SetFiltering(filtering int)
func (*WebGLCubeMap) SetKeyColor ¶
func (this *WebGLCubeMap) SetKeyColor(col color.Color)
func (*WebGLCubeMap) SetModColor ¶
func (this *WebGLCubeMap) SetModColor(col color.Color)
func (*WebGLCubeMap) SetWrapping ¶
func (this *WebGLCubeMap) SetWrapping(wrapping int)
func (*WebGLCubeMap) Terminate ¶
func (this *WebGLCubeMap) Terminate()
func (*WebGLCubeMap) Unbind ¶
func (this *WebGLCubeMap) Unbind(unit uint32)
type WebGLError ¶
type WebGLError struct {
// contains filtered or unexported fields
}
func (WebGLError) Error ¶
func (oerr WebGLError) Error() string
type WebGLInstancedMesh3D ¶
type WebGLInstancedMesh3D struct { Name string Material *gohome.Material // contains filtered or unexported fields }
func CreateWebGLInstancedMesh3D ¶
func CreateWebGLInstancedMesh3D(name string) *WebGLInstancedMesh3D
func (*WebGLInstancedMesh3D) AABB ¶
func (this *WebGLInstancedMesh3D) AABB() gohome.AxisAlignedBoundingBox
func (*WebGLInstancedMesh3D) AddValue ¶
func (this *WebGLInstancedMesh3D) AddValue(valueType int)
func (*WebGLInstancedMesh3D) AddValueFront ¶
func (this *WebGLInstancedMesh3D) AddValueFront(valueType int)
func (*WebGLInstancedMesh3D) AddVertices ¶
func (this *WebGLInstancedMesh3D) AddVertices(vertices []gohome.Mesh3DVertex, indices []uint32)
func (*WebGLInstancedMesh3D) CalculateTangents ¶
func (this *WebGLInstancedMesh3D) CalculateTangents()
func (*WebGLInstancedMesh3D) CalculateTangentsRoutine ¶
func (this *WebGLInstancedMesh3D) CalculateTangentsRoutine(startIndex, maxIndex int, wg *sync.WaitGroup)
func (*WebGLInstancedMesh3D) Copy ¶
func (this *WebGLInstancedMesh3D) Copy() gohome.Mesh3D
func (*WebGLInstancedMesh3D) GetIndices ¶
func (this *WebGLInstancedMesh3D) GetIndices() []uint32
func (*WebGLInstancedMesh3D) GetMaterial ¶
func (this *WebGLInstancedMesh3D) GetMaterial() *gohome.Material
func (*WebGLInstancedMesh3D) GetName ¶
func (this *WebGLInstancedMesh3D) GetName() string
func (*WebGLInstancedMesh3D) GetNumIndices ¶
func (this *WebGLInstancedMesh3D) GetNumIndices() int
func (*WebGLInstancedMesh3D) GetNumInstances ¶
func (this *WebGLInstancedMesh3D) GetNumInstances() int
func (*WebGLInstancedMesh3D) GetNumUsedInstances ¶
func (this *WebGLInstancedMesh3D) GetNumUsedInstances() int
func (*WebGLInstancedMesh3D) GetNumVertices ¶
func (this *WebGLInstancedMesh3D) GetNumVertices() int
func (*WebGLInstancedMesh3D) GetVertices ¶
func (this *WebGLInstancedMesh3D) GetVertices() []gohome.Mesh3DVertex
func (*WebGLInstancedMesh3D) HasUV ¶
func (this *WebGLInstancedMesh3D) HasUV() bool
func (*WebGLInstancedMesh3D) Load ¶
func (this *WebGLInstancedMesh3D) Load()
func (*WebGLInstancedMesh3D) LoadedToGPU ¶
func (this *WebGLInstancedMesh3D) LoadedToGPU() bool
func (*WebGLInstancedMesh3D) Render ¶
func (this *WebGLInstancedMesh3D) Render()
func (*WebGLInstancedMesh3D) SetF ¶
func (this *WebGLInstancedMesh3D) SetF(index int, value []float32)
func (*WebGLInstancedMesh3D) SetM2 ¶
func (this *WebGLInstancedMesh3D) SetM2(index int, value []mgl32.Mat2)
func (*WebGLInstancedMesh3D) SetM3 ¶
func (this *WebGLInstancedMesh3D) SetM3(index int, value []mgl32.Mat3)
func (*WebGLInstancedMesh3D) SetM4 ¶
func (this *WebGLInstancedMesh3D) SetM4(index int, value []mgl32.Mat4)
func (*WebGLInstancedMesh3D) SetMaterial ¶
func (this *WebGLInstancedMesh3D) SetMaterial(mat *gohome.Material)
func (*WebGLInstancedMesh3D) SetName ¶
func (this *WebGLInstancedMesh3D) SetName(index, value_type int, value string)
func (*WebGLInstancedMesh3D) SetNumInstances ¶
func (this *WebGLInstancedMesh3D) SetNumInstances(n int)
func (*WebGLInstancedMesh3D) SetNumUsedInstances ¶
func (this *WebGLInstancedMesh3D) SetNumUsedInstances(n int)
func (*WebGLInstancedMesh3D) SetV2 ¶
func (this *WebGLInstancedMesh3D) SetV2(index int, value []mgl32.Vec2)
func (*WebGLInstancedMesh3D) SetV3 ¶
func (this *WebGLInstancedMesh3D) SetV3(index int, value []mgl32.Vec3)
func (*WebGLInstancedMesh3D) SetV4 ¶
func (this *WebGLInstancedMesh3D) SetV4(index int, value []mgl32.Vec4)
func (*WebGLInstancedMesh3D) Terminate ¶
func (this *WebGLInstancedMesh3D) Terminate()
type WebGLMesh2D ¶
type WebGLMesh2D struct { Name string // contains filtered or unexported fields }
func CreateWebGLMesh2D ¶
func CreateWebGLMesh2D(name string) *WebGLMesh2D
func (*WebGLMesh2D) AddVertices ¶
func (oglm *WebGLMesh2D) AddVertices(vertices []gohome.Mesh2DVertex, indices []uint32)
func (*WebGLMesh2D) Load ¶
func (oglm *WebGLMesh2D) Load()
func (*WebGLMesh2D) Render ¶
func (oglm *WebGLMesh2D) Render()
func (*WebGLMesh2D) Terminate ¶
func (oglm *WebGLMesh2D) Terminate()
type WebGLMesh3D ¶
type WebGLMesh3D struct { Name string Material *gohome.Material // contains filtered or unexported fields }
func CreateWebGLMesh3D ¶
func CreateWebGLMesh3D(name string) *WebGLMesh3D
func (*WebGLMesh3D) AABB ¶
func (oglm *WebGLMesh3D) AABB() gohome.AxisAlignedBoundingBox
func (*WebGLMesh3D) AddVertices ¶
func (oglm *WebGLMesh3D) AddVertices(vertices []gohome.Mesh3DVertex, indices []uint32)
func (*WebGLMesh3D) CalculateTangents ¶
func (oglm *WebGLMesh3D) CalculateTangents()
func (*WebGLMesh3D) CalculateTangentsRoutine ¶
func (oglm *WebGLMesh3D) CalculateTangentsRoutine(startIndex, maxIndex int, wg *sync.WaitGroup)
func (*WebGLMesh3D) Copy ¶
func (oglm *WebGLMesh3D) Copy() gohome.Mesh3D
func (*WebGLMesh3D) GetIndices ¶
func (oglm *WebGLMesh3D) GetIndices() []uint32
func (*WebGLMesh3D) GetMaterial ¶
func (oglm *WebGLMesh3D) GetMaterial() *gohome.Material
func (*WebGLMesh3D) GetName ¶
func (oglm *WebGLMesh3D) GetName() string
func (*WebGLMesh3D) GetNumIndices ¶
func (oglm *WebGLMesh3D) GetNumIndices() int
func (*WebGLMesh3D) GetNumVertices ¶
func (oglm *WebGLMesh3D) GetNumVertices() int
func (*WebGLMesh3D) GetVertices ¶
func (oglm *WebGLMesh3D) GetVertices() []gohome.Mesh3DVertex
func (*WebGLMesh3D) HasUV ¶
func (oglm *WebGLMesh3D) HasUV() bool
func (*WebGLMesh3D) Load ¶
func (oglm *WebGLMesh3D) Load()
func (*WebGLMesh3D) LoadedToGPU ¶
func (oglm *WebGLMesh3D) LoadedToGPU() bool
func (*WebGLMesh3D) Render ¶
func (oglm *WebGLMesh3D) Render()
func (*WebGLMesh3D) SetMaterial ¶
func (oglm *WebGLMesh3D) SetMaterial(mat *gohome.Material)
func (*WebGLMesh3D) Terminate ¶
func (oglm *WebGLMesh3D) Terminate()
type WebGLRenderTexture ¶
type WebGLRenderTexture struct { Name string // contains filtered or unexported fields }
func CreateWebGLRenderTexture ¶
func CreateWebGLRenderTexture(name string, width, height, textures int, depthBuffer, shadowMap, cubeMap bool) *WebGLRenderTexture
func (*WebGLRenderTexture) Bind ¶
func (this *WebGLRenderTexture) Bind(unit uint32)
func (*WebGLRenderTexture) BindIndex ¶
func (this *WebGLRenderTexture) BindIndex(index int, unit uint32)
func (*WebGLRenderTexture) Blit ¶
func (this *WebGLRenderTexture) Blit(rtex gohome.RenderTexture)
func (*WebGLRenderTexture) ChangeSize ¶
func (this *WebGLRenderTexture) ChangeSize(width, height int)
func (*WebGLRenderTexture) Create ¶
func (this *WebGLRenderTexture) Create(name string, width, height, textures int, depthBuffer, multiSampled, shadowMap, cubeMap bool)
func (*WebGLRenderTexture) GetHeight ¶
func (this *WebGLRenderTexture) GetHeight() int
func (*WebGLRenderTexture) GetKeyColor ¶
func (this *WebGLRenderTexture) GetKeyColor() color.Color
func (*WebGLRenderTexture) GetModColor ¶
func (this *WebGLRenderTexture) GetModColor() color.Color
func (*WebGLRenderTexture) GetName ¶
func (this *WebGLRenderTexture) GetName() string
func (*WebGLRenderTexture) GetWidth ¶
func (this *WebGLRenderTexture) GetWidth() int
func (*WebGLRenderTexture) Load ¶
func (this *WebGLRenderTexture) Load(data []byte, width, height int, shadowMap bool)
func (*WebGLRenderTexture) LoadFromImage ¶
func (ogltex *WebGLRenderTexture) LoadFromImage(img image.Image)
func (*WebGLRenderTexture) SetAsTarget ¶
func (this *WebGLRenderTexture) SetAsTarget()
func (*WebGLRenderTexture) SetBorderColor ¶
func (this *WebGLRenderTexture) SetBorderColor(col color.Color)
func (*WebGLRenderTexture) SetBorderDepth ¶
func (this *WebGLRenderTexture) SetBorderDepth(depth float32)
func (*WebGLRenderTexture) SetFiltering ¶
func (this *WebGLRenderTexture) SetFiltering(filtering int)
func (*WebGLRenderTexture) SetKeyColor ¶
func (this *WebGLRenderTexture) SetKeyColor(col color.Color)
func (*WebGLRenderTexture) SetModColor ¶
func (this *WebGLRenderTexture) SetModColor(col color.Color)
func (*WebGLRenderTexture) SetWrapping ¶
func (this *WebGLRenderTexture) SetWrapping(wrapping int)
func (*WebGLRenderTexture) Terminate ¶
func (this *WebGLRenderTexture) Terminate()
func (*WebGLRenderTexture) Unbind ¶
func (this *WebGLRenderTexture) Unbind(unit uint32)
func (*WebGLRenderTexture) UnbindIndex ¶
func (this *WebGLRenderTexture) UnbindIndex(index int, unit uint32)
func (*WebGLRenderTexture) UnsetAsTarget ¶
func (this *WebGLRenderTexture) UnsetAsTarget()
type WebGLRenderer ¶
type WebGLRenderer struct { CurrentTextureUnit uint32 // contains filtered or unexported fields }
func (*WebGLRenderer) AfterInit ¶
func (this *WebGLRenderer) AfterInit()
func (*WebGLRenderer) AfterRender ¶
func (this *WebGLRenderer) AfterRender()
func (*WebGLRenderer) ClearScreen ¶
func (*WebGLRenderer) ClearScreen(c color.Color)
func (*WebGLRenderer) CreateCubeMap ¶
func (*WebGLRenderer) CreateCubeMap(name string) gohome.CubeMap
func (*WebGLRenderer) CreateInstancedMesh3D ¶
func (*WebGLRenderer) CreateInstancedMesh3D(name string) gohome.InstancedMesh3D
func (*WebGLRenderer) CreateMesh2D ¶
func (*WebGLRenderer) CreateMesh2D(name string) gohome.Mesh2D
func (*WebGLRenderer) CreateMesh3D ¶
func (*WebGLRenderer) CreateMesh3D(name string) gohome.Mesh3D
func (*WebGLRenderer) CreateRenderTexture ¶
func (*WebGLRenderer) CreateRenderTexture(name string, width, height, textures int, depthBuffer, multiSampled, shadowMap, cubeMap bool) gohome.RenderTexture
func (*WebGLRenderer) CreateShape2DInterface ¶
func (this *WebGLRenderer) CreateShape2DInterface(name string) gohome.Shape2DInterface
func (*WebGLRenderer) CreateShape3DInterface ¶
func (*WebGLRenderer) CreateShape3DInterface(name string) gohome.Shape3DInterface
func (*WebGLRenderer) CreateTexture ¶
func (*WebGLRenderer) CreateTexture(name string, multiSampled bool) gohome.Texture
func (*WebGLRenderer) DecrementTextureUnit ¶
func (this *WebGLRenderer) DecrementTextureUnit(amount uint32)
func (*WebGLRenderer) GetBackgroundColor ¶
func (this *WebGLRenderer) GetBackgroundColor() color.Color
func (*WebGLRenderer) GetMaxTextures ¶
func (this *WebGLRenderer) GetMaxTextures() int
func (*WebGLRenderer) GetName ¶
func (this *WebGLRenderer) GetName() string
func (*WebGLRenderer) GetNativeResolution ¶
func (this *WebGLRenderer) GetNativeResolution() mgl32.Vec2
func (*WebGLRenderer) GetVersioni ¶
func (this *WebGLRenderer) GetVersioni() int
func (*WebGLRenderer) GetViewport ¶
func (this *WebGLRenderer) GetViewport() gohome.Viewport
func (*WebGLRenderer) HasExtension ¶
func (this *WebGLRenderer) HasExtension(name string) bool
func (*WebGLRenderer) HasFunctionAvailable ¶
func (this *WebGLRenderer) HasFunctionAvailable(function string) bool
func (*WebGLRenderer) Init ¶
func (this *WebGLRenderer) Init() error
func (*WebGLRenderer) InstancedMesh3DFromLoadedMesh3D ¶
func (this *WebGLRenderer) InstancedMesh3DFromLoadedMesh3D(mesh gohome.Mesh3D) gohome.InstancedMesh3D
func (*WebGLRenderer) LoadShader ¶
func (this *WebGLRenderer) LoadShader(name, vertex_contents, fragment_contents, geometry_contents, tesselletion_control_contents, eveluation_contents, compute_contents string) (gohome.Shader, error)
func (*WebGLRenderer) NextTextureUnit ¶
func (this *WebGLRenderer) NextTextureUnit() uint32
func (*WebGLRenderer) OnResize ¶
func (this *WebGLRenderer) OnResize(newWidth, newHeight int)
func (*WebGLRenderer) PreRender ¶
func (this *WebGLRenderer) PreRender()
func (*WebGLRenderer) RenderBackBuffer ¶
func (this *WebGLRenderer) RenderBackBuffer()
func (*WebGLRenderer) SetBacckFaceCulling ¶
func (this *WebGLRenderer) SetBacckFaceCulling(b bool)
func (*WebGLRenderer) SetBackgroundColor ¶
func (this *WebGLRenderer) SetBackgroundColor(bgColor color.Color)
func (*WebGLRenderer) SetDepthTesting ¶
func (this *WebGLRenderer) SetDepthTesting(b bool)
func (*WebGLRenderer) SetNativeResolution ¶
func (this *WebGLRenderer) SetNativeResolution(width, height int)
func (*WebGLRenderer) SetViewport ¶
func (this *WebGLRenderer) SetViewport(viewport gohome.Viewport)
func (*WebGLRenderer) SetWireFrame ¶
func (this *WebGLRenderer) SetWireFrame(b bool)
func (*WebGLRenderer) Terminate ¶
func (this *WebGLRenderer) Terminate()
type WebGLShader ¶
type WebGLShader struct {
// contains filtered or unexported fields
}
func CreateWebGLShader ¶
func CreateWebGLShader(name string) (*WebGLShader, error)
func (*WebGLShader) AddAttribute ¶
func (s *WebGLShader) AddAttribute(name string, location uint32)
func (*WebGLShader) AddShader ¶
func (s *WebGLShader) AddShader(shader_type uint8, src string) error
func (*WebGLShader) GetName ¶
func (s *WebGLShader) GetName() string
func (*WebGLShader) Link ¶
func (s *WebGLShader) Link() error
func (*WebGLShader) SetUniformB ¶
func (s *WebGLShader) SetUniformB(name string, value uint8)
func (*WebGLShader) SetUniformF ¶
func (s *WebGLShader) SetUniformF(name string, value float32)
func (*WebGLShader) SetUniformI ¶
func (s *WebGLShader) SetUniformI(name string, value int32)
func (*WebGLShader) SetUniformIV2 ¶
func (s *WebGLShader) SetUniformIV2(name string, value []int32)
func (*WebGLShader) SetUniformIV3 ¶
func (s *WebGLShader) SetUniformIV3(name string, value []int32)
func (*WebGLShader) SetUniformIV4 ¶
func (s *WebGLShader) SetUniformIV4(name string, value []int32)
func (*WebGLShader) SetUniformLights ¶
func (s *WebGLShader) SetUniformLights(lightCollectionIndex int)
func (*WebGLShader) SetUniformM2 ¶
func (s *WebGLShader) SetUniformM2(name string, value mgl32.Mat2)
func (*WebGLShader) SetUniformM3 ¶
func (s *WebGLShader) SetUniformM3(name string, value mgl32.Mat3)
func (*WebGLShader) SetUniformM4 ¶
func (s *WebGLShader) SetUniformM4(name string, value mgl32.Mat4)
func (*WebGLShader) SetUniformMaterial ¶
func (s *WebGLShader) SetUniformMaterial(mat gohome.Material)
func (*WebGLShader) SetUniformUI ¶
func (s *WebGLShader) SetUniformUI(name string, value uint32)
func (*WebGLShader) SetUniformV2 ¶
func (s *WebGLShader) SetUniformV2(name string, value mgl32.Vec2)
func (*WebGLShader) SetUniformV3 ¶
func (s *WebGLShader) SetUniformV3(name string, value mgl32.Vec3)
func (*WebGLShader) SetUniformV4 ¶
func (s *WebGLShader) SetUniformV4(name string, value mgl32.Vec4)
func (*WebGLShader) Setup ¶
func (s *WebGLShader) Setup() error
func (*WebGLShader) Terminate ¶
func (s *WebGLShader) Terminate()
func (*WebGLShader) Unuse ¶
func (s *WebGLShader) Unuse()
func (*WebGLShader) Use ¶
func (s *WebGLShader) Use()
type WebGLShape2DInterface ¶
type WebGLShape2DInterface struct { Name string WebGLDrawMode int // contains filtered or unexported fields }
func (*WebGLShape2DInterface) AddLines ¶
func (this *WebGLShape2DInterface) AddLines(lines []gohome.Line2D)
func (*WebGLShape2DInterface) AddPoints ¶
func (this *WebGLShape2DInterface) AddPoints(points []gohome.Shape2DVertex)
func (*WebGLShape2DInterface) AddTriangles ¶
func (this *WebGLShape2DInterface) AddTriangles(tris []gohome.Triangle2D)
func (*WebGLShape2DInterface) GetPoints ¶
func (this *WebGLShape2DInterface) GetPoints() []gohome.Shape2DVertex
func (*WebGLShape2DInterface) Init ¶
func (this *WebGLShape2DInterface) Init()
func (*WebGLShape2DInterface) Load ¶
func (this *WebGLShape2DInterface) Load()
func (*WebGLShape2DInterface) Render ¶
func (this *WebGLShape2DInterface) Render()
func (*WebGLShape2DInterface) SetDrawMode ¶
func (this *WebGLShape2DInterface) SetDrawMode(mode uint8)
func (*WebGLShape2DInterface) SetLineWidth ¶
func (this *WebGLShape2DInterface) SetLineWidth(width float32)
func (*WebGLShape2DInterface) SetPointSize ¶
func (this *WebGLShape2DInterface) SetPointSize(size float32)
func (*WebGLShape2DInterface) Terminate ¶
func (this *WebGLShape2DInterface) Terminate()
type WebGLShape3DInterface ¶
type WebGLShape3DInterface struct { Name string // contains filtered or unexported fields }
func (*WebGLShape3DInterface) AddPoints ¶
func (this *WebGLShape3DInterface) AddPoints(points []gohome.Shape3DVertex)
func (*WebGLShape3DInterface) GetPoints ¶
func (this *WebGLShape3DInterface) GetPoints() []gohome.Shape3DVertex
func (*WebGLShape3DInterface) Init ¶
func (this *WebGLShape3DInterface) Init()
func (*WebGLShape3DInterface) Load ¶
func (this *WebGLShape3DInterface) Load()
func (*WebGLShape3DInterface) Render ¶
func (this *WebGLShape3DInterface) Render()
func (*WebGLShape3DInterface) SetDrawMode ¶
func (this *WebGLShape3DInterface) SetDrawMode(drawMode uint8)
func (*WebGLShape3DInterface) SetLineWidth ¶
func (this *WebGLShape3DInterface) SetLineWidth(width float32)
func (*WebGLShape3DInterface) SetPointSize ¶
func (this *WebGLShape3DInterface) SetPointSize(size float32)
func (*WebGLShape3DInterface) Terminate ¶
func (this *WebGLShape3DInterface) Terminate()
type WebGLTexture ¶
type WebGLTexture struct {
// contains filtered or unexported fields
}
func CreateWebGLTexture ¶
func CreateWebGLTexture(name string) *WebGLTexture
func (*WebGLTexture) Bind ¶
func (ogltex *WebGLTexture) Bind(unit uint32)
func (*WebGLTexture) GetData ¶
func (ogltex *WebGLTexture) GetData() (data []byte, width int, height int)
func (*WebGLTexture) GetHeight ¶
func (ogltex *WebGLTexture) GetHeight() int
func (*WebGLTexture) GetKeyColor ¶
func (ogltex *WebGLTexture) GetKeyColor() color.Color
func (*WebGLTexture) GetModColor ¶
func (ogltex *WebGLTexture) GetModColor() color.Color
func (*WebGLTexture) GetName ¶
func (ogltex *WebGLTexture) GetName() string
func (*WebGLTexture) GetWidth ¶
func (ogltex *WebGLTexture) GetWidth() int
func (*WebGLTexture) Load ¶
func (ogltex *WebGLTexture) Load(data []byte, width, height int, shadowMap bool)
func (*WebGLTexture) LoadFromImage ¶
func (ogltex *WebGLTexture) LoadFromImage(img image.Image)
func (*WebGLTexture) SetBorderColor ¶
func (ogltex *WebGLTexture) SetBorderColor(col color.Color)
func (*WebGLTexture) SetBorderDepth ¶
func (ogltex *WebGLTexture) SetBorderDepth(depth float32)
func (*WebGLTexture) SetFiltering ¶
func (ogltex *WebGLTexture) SetFiltering(filtering int)
func (*WebGLTexture) SetKeyColor ¶
func (ogltex *WebGLTexture) SetKeyColor(col color.Color)
func (*WebGLTexture) SetModColor ¶
func (ogltex *WebGLTexture) SetModColor(col color.Color)
func (*WebGLTexture) SetWrapping ¶
func (ogltex *WebGLTexture) SetWrapping(wrapping int)
func (*WebGLTexture) Terminate ¶
func (ogltex *WebGLTexture) Terminate()
func (*WebGLTexture) Unbind ¶
func (ogltex *WebGLTexture) Unbind(unit uint32)
Click to show internal directories.
Click to hide internal directories.