Documentation ¶
Index ¶
- Constants
- func CreateMesh2dResource(uri string, verticesData []float32, indexData []uint32, drawingType uint32) (core.Resource, error)
- func CreateMeshBuffers(verticesData []float32, indexData []uint32) (vao, vbo, ibo uint32)
- func GetCircleBorderVertices(segments uint) (vertices []float32, indices []uint32, drawingType uint32)
- func GetCircleVertices(segments uint) (vertices []float32, indices []uint32, drawingType uint32)
- func GetEmptyMesh(uri string) core.Resource
- func GetEmptyShader(uri string) core.Resource
- func GetEmptyTexture(uri string) core.Resource
- func GetQuadBorderVertices() ([]float32, []uint32, uint32)
- func GetQuadVertices() ([]float32, []uint32, uint32)
- type EmbededShaderSource
- type FileTextureLoader
- type MeshData
- type ProceduralMesh2dLoader
- type ProceduralMeshType
- type ShaderData
- type ShaderFileSource
- type ShaderLoader
- type ShaderStringSource
- type TextureData
- type TextureParams
Constants ¶
View Source
const (
RT_MESH core.ResourceType = "mesh"
)
View Source
const (
RT_SHADER core.ResourceType = "shader"
)
View Source
const (
RT_TEXTURE core.ResourceType = "texture"
)
Variables ¶
This section is empty.
Functions ¶
func CreateMesh2dResource ¶
func CreateMeshBuffers ¶
func GetCircleBorderVertices ¶
func GetCircleVertices ¶
func GetEmptyMesh ¶
func GetEmptyShader ¶
func GetEmptyTexture ¶
func GetQuadBorderVertices ¶
func GetQuadVertices ¶
Types ¶
type EmbededShaderSource ¶
type EmbededShaderSource struct {
ShaderName string
}
type FileTextureLoader ¶
type FileTextureLoader struct{}
func NewFileTextureLoader ¶
func NewFileTextureLoader() FileTextureLoader
func (FileTextureLoader) CanLoad ¶
func (l FileTextureLoader) CanLoad(resourceType core.ResourceType, uri string, param core.LoaderParam) bool
func (FileTextureLoader) Load ¶
func (l FileTextureLoader) Load(uri string, param core.LoaderParam) (core.Resource, error)
type MeshData ¶
func CreateMesh2d ¶
type ProceduralMesh2dLoader ¶
type ProceduralMesh2dLoader struct{}
func NewProceduralMesh2dLoader ¶
func NewProceduralMesh2dLoader() ProceduralMesh2dLoader
func (ProceduralMesh2dLoader) CanLoad ¶
func (l ProceduralMesh2dLoader) CanLoad(resourceType core.ResourceType, uri string, param core.LoaderParam) bool
func (ProceduralMesh2dLoader) Load ¶
func (l ProceduralMesh2dLoader) Load(uri string, param core.LoaderParam) (core.Resource, error)
type ProceduralMeshType ¶
type ProceduralMeshType string
const ( PMT_QUAD ProceduralMeshType = "pmt_2d_quad" PMT_QUAD_BORDER ProceduralMeshType = "pmt_2d_quad_border" PMT_CIRCLE ProceduralMeshType = "pmt_2d_circle" PMT_CIRCLE_BORDER ProceduralMeshType = "pmt_2d_circle_border" )
type ShaderData ¶
type ShaderData struct { ProgramId uint32 // contains filtered or unexported fields }
func (*ShaderData) GetUniformLocation ¶
func (s *ShaderData) GetUniformLocation(name string) int32
func (*ShaderData) SetColor ¶
func (s *ShaderData) SetColor(color core.Color)
func (*ShaderData) SetProjectionMat ¶
func (s *ShaderData) SetProjectionMat(projection mgl32.Mat4)
func (*ShaderData) SetTransformationMat ¶
func (s *ShaderData) SetTransformationMat(transformation mgl32.Mat4)
func (*ShaderData) SetViewMat ¶
func (s *ShaderData) SetViewMat(view mgl32.Mat4)
type ShaderFileSource ¶
type ShaderLoader ¶
type ShaderLoader struct{}
func NewShaderLoader ¶
func NewShaderLoader() ShaderLoader
func (ShaderLoader) CanLoad ¶
func (l ShaderLoader) CanLoad(resourceType core.ResourceType, uri string, param core.LoaderParam) bool
func (ShaderLoader) Load ¶
func (l ShaderLoader) Load(uri string, param core.LoaderParam) (core.Resource, error)
type ShaderStringSource ¶
type TextureData ¶
type TextureData struct {
Id uint32
}
type TextureParams ¶
Click to show internal directories.
Click to hide internal directories.