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