Documentation ¶
Index ¶
- func CreateWindow(width, height int, title string) *glfw.Window
- func GetSizeOfType(glType uint32) int32
- type Camera
- type Direction
- type IndexBuffer
- type Material
- type Shader
- func (s *Shader) Bind()
- func (s *Shader) SetFloat(name string, v0 float32)
- func (s *Shader) SetFloat3(name string, v0, v1, v2 float32)
- func (s *Shader) SetInt(name string, value int32)
- func (s *Shader) SetMat3(name string, mat mgl32.Mat3, transpose bool)
- func (s *Shader) SetMat4(name string, mat mgl32.Mat4, transpose bool)
- func (s *Shader) SetVec3(name string, vec3 mgl32.Vec3)
- func (s *Shader) SetVec4(name string, vec4 mgl32.Vec4)
- func (s *Shader) Unbind()
- type Texture
- type VertexArray
- type VertexBuffer
- type VertexBufferElement
- type VertexBufferLayout
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSizeOfType ¶
Types ¶
type Camera ¶
type Camera struct { Position mgl32.Vec3 Front, Up, Right mgl32.Vec3 WorldUp mgl32.Vec3 Yaw, Pitch float32 MovementSpeed float32 Sensitivity float32 Zoom float32 //For perspective projection Near, Far float32 }
func (*Camera) GetViewMat ¶
func (*Camera) KeyboardUpdate ¶
func (*Camera) MouseUpdate ¶
func (*Camera) ScrollUpdate ¶
type IndexBuffer ¶
type IndexBuffer struct { Count int32 // contains filtered or unexported fields }
func NewIndexBuffer ¶
func NewIndexBuffer(data []uint32) *IndexBuffer
func (*IndexBuffer) Bind ¶
func (ib *IndexBuffer) Bind()
func (*IndexBuffer) Delete ¶
func (ib *IndexBuffer) Delete()
func (*IndexBuffer) Unbind ¶
func (ib *IndexBuffer) Unbind()
type Material ¶
type Material struct { Name string Diffuse, Specular *Texture Shininess float32 // contains filtered or unexported fields }
func NewMaterial ¶
type Shader ¶
type Shader struct {
// contains filtered or unexported fields
}
func NewShaderProgram ¶
type Texture ¶
type Texture struct {
Width, Height, Bpp int32
Slot uint32
// contains filtered or unexported fields
}
func NewTexture ¶
type VertexArray ¶
type VertexArray struct {
// contains filtered or unexported fields
}
func NewVertexArray ¶
func NewVertexArray() *VertexArray
func (*VertexArray) AddBuffer ¶
func (va *VertexArray) AddBuffer(vb *VertexBuffer, layout *VertexBufferLayout)
func (*VertexArray) Bind ¶
func (va *VertexArray) Bind()
func (*VertexArray) Unbind ¶
func (va *VertexArray) Unbind()
type VertexBuffer ¶
type VertexBuffer struct {
// contains filtered or unexported fields
}
func NewVertexBuffer ¶
func NewVertexBuffer(data interface{}, size int) *VertexBuffer
func (*VertexBuffer) Bind ¶
func (ib *VertexBuffer) Bind()
func (*VertexBuffer) Delete ¶
func (ib *VertexBuffer) Delete()
func (*VertexBuffer) Unbind ¶
func (ib *VertexBuffer) Unbind()
type VertexBufferElement ¶
type VertexBufferElement struct {
// contains filtered or unexported fields
}
type VertexBufferLayout ¶
type VertexBufferLayout struct { Elements []VertexBufferElement Stride int32 }
func NewVertexBufferLayout ¶
func NewVertexBufferLayout() *VertexBufferLayout
func (*VertexBufferLayout) Pushf32 ¶
func (vbl *VertexBufferLayout) Pushf32(count int32)
func (*VertexBufferLayout) Pushub ¶
func (vbl *VertexBufferLayout) Pushub(count int32)
func (*VertexBufferLayout) Pushui32 ¶
func (vbl *VertexBufferLayout) Pushui32(count int32)
Click to show internal directories.
Click to hide internal directories.