Documentation ¶
Index ¶
- Constants
- type DrawMode
- type Framebuffer
- func NewFrame(width, height int, smooth, depth bool) *Framebuffer
- func NewFrameDepth(width, height int, smooth bool) *Framebuffer
- func NewFrameF(width, height int) *Framebuffer
- func NewFrameLayer(texture texture.Texture, layer int) *Framebuffer
- func NewFrameMultisample(width, height int, samples int) *Framebuffer
- func NewFrameMultisampleScreen(width, height int, depth bool, samples int) *Framebuffer
- func (f *Framebuffer) Bind()
- func (f *Framebuffer) ClearColor(r, g, b, a float32)
- func (f *Framebuffer) ClearColorI(index int, r, g, b, a float32)
- func (f *Framebuffer) ClearColorIM(index int, color color2.Color)
- func (f *Framebuffer) ClearColorM(color color2.Color)
- func (f *Framebuffer) ClearDepth()
- func (f *Framebuffer) ClearDepthV(v float32)
- func (f *Framebuffer) Dispose()
- func (f *Framebuffer) GetHeight() int
- func (f *Framebuffer) GetID() uint32
- func (f *Framebuffer) GetWidth() int
- func (f *Framebuffer) Texture() texture.Texture
- func (f *Framebuffer) Unbind()
- type IndexBufferObject
- func (ibo *IndexBufferObject) Bind()
- func (ibo *IndexBufferObject) Capacity() int
- func (ibo *IndexBufferObject) Dispose()
- func (ibo *IndexBufferObject) Draw()
- func (ibo *IndexBufferObject) DrawInstanced(baseInstance, instanceCount int)
- func (ibo *IndexBufferObject) DrawPart(offset, length int)
- func (ibo *IndexBufferObject) DrawPartInstanced(offset, length, baseInstance, instanceCount int)
- func (ibo *IndexBufferObject) SetData(offset int, data []uint16)
- func (ibo *IndexBufferObject) SetDataI(offset int, data []uint32)
- func (ibo *IndexBufferObject) Unbind()
- type MemoryChunk
- type PersistentBufferObject
- func (vbo *PersistentBufferObject) Bind()
- func (vbo *PersistentBufferObject) Capacity() int
- func (vbo *PersistentBufferObject) Dispose()
- func (vbo *PersistentBufferObject) GetID() uint32
- func (vbo *PersistentBufferObject) Map(size int) MemoryChunk
- func (vbo *PersistentBufferObject) Resize(newCapacity int)
- func (vbo *PersistentBufferObject) SetData(offset int, data []float32)
- func (vbo *PersistentBufferObject) Unbind()
- func (vbo *PersistentBufferObject) Unmap(offset, size int)
- type StreamingBuffer
- type VertexArrayObject
- func (vao *VertexArrayObject) AddMappedVBO(name string, maxVertices int, divisor int, format attribute.Format)
- func (vao *VertexArrayObject) AddPersistentVBO(name string, maxVertices int, divisor int, format attribute.Format)
- func (vao *VertexArrayObject) AddVBO(name string, maxVertices int, divisor int, format attribute.Format)
- func (vao *VertexArrayObject) Attach(s *shader.RShader)
- func (vao *VertexArrayObject) AttachIBO(ibo *IndexBufferObject)
- func (vao *VertexArrayObject) Bind()
- func (vao *VertexArrayObject) Dispose()
- func (vao *VertexArrayObject) Draw()
- func (vao *VertexArrayObject) DrawInstanced(baseInstance, instanceCount int)
- func (vao *VertexArrayObject) DrawPart(offset, length int)
- func (vao *VertexArrayObject) DrawPartInstanced(offset, length, baseInstance, instanceCount int)
- func (vao *VertexArrayObject) GetVBO(name string) StreamingBuffer
- func (vao *VertexArrayObject) GetVBOFormat(name string) attribute.Format
- func (vao *VertexArrayObject) MapVBO(name string, size int) MemoryChunk
- func (vao *VertexArrayObject) Resize(name string, maxVertices int)
- func (vao *VertexArrayObject) SetData(name string, offset int, data []float32)
- func (vao *VertexArrayObject) Unbind()
- func (vao *VertexArrayObject) UnmapVBO(name string, offset int, size int)
- type VertexBufferObject
- func (vbo *VertexBufferObject) Bind()
- func (vbo *VertexBufferObject) Capacity() int
- func (vbo *VertexBufferObject) Dispose()
- func (vbo *VertexBufferObject) GetID() uint32
- func (vbo *VertexBufferObject) Map(size int) MemoryChunk
- func (vbo *VertexBufferObject) Resize(newCapacity int)
- func (vbo *VertexBufferObject) SetData(offset int, data []float32)
- func (vbo *VertexBufferObject) Unbind()
- func (vbo *VertexBufferObject) Unmap(offset, size int)
Constants ¶
View Source
const ( StaticDraw = DrawMode(gl.STATIC_DRAW) DynamicDraw = DrawMode(gl.DYNAMIC_DRAW) StreamDraw = DrawMode(gl.STREAM_DRAW) StaticRead = DrawMode(gl.STATIC_READ) DynamicRead = DrawMode(gl.DYNAMIC_READ) StreamRead = DrawMode(gl.STREAM_READ) StaticCopy = DrawMode(gl.STATIC_COPY) DynamicCopy = DrawMode(gl.DYNAMIC_COPY) StreamCopy = DrawMode(gl.STREAM_COPY) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Framebuffer ¶
type Framebuffer struct {
// contains filtered or unexported fields
}
Framebuffer is a fixed resolution texture that you can draw on.
func NewFrame ¶
func NewFrame(width, height int, smooth, depth bool) *Framebuffer
NewFrame creates a new fully transparent Framebuffer with given dimensions in pixels.
func NewFrameDepth ¶
func NewFrameDepth(width, height int, smooth bool) *Framebuffer
func NewFrameF ¶
func NewFrameF(width, height int) *Framebuffer
func NewFrameLayer ¶
func NewFrameLayer(texture texture.Texture, layer int) *Framebuffer
func NewFrameMultisample ¶
func NewFrameMultisample(width, height int, samples int) *Framebuffer
func NewFrameMultisampleScreen ¶
func NewFrameMultisampleScreen(width, height int, depth bool, samples int) *Framebuffer
func (*Framebuffer) Bind ¶
func (f *Framebuffer) Bind()
Bind binds the Framebuffer. All draw operations will target this Framebuffer until Unbind is called.
func (*Framebuffer) ClearColor ¶
func (f *Framebuffer) ClearColor(r, g, b, a float32)
func (*Framebuffer) ClearColorI ¶
func (f *Framebuffer) ClearColorI(index int, r, g, b, a float32)
func (*Framebuffer) ClearColorIM ¶
func (f *Framebuffer) ClearColorIM(index int, color color2.Color)
func (*Framebuffer) ClearColorM ¶
func (f *Framebuffer) ClearColorM(color color2.Color)
func (*Framebuffer) ClearDepth ¶
func (f *Framebuffer) ClearDepth()
func (*Framebuffer) ClearDepthV ¶
func (f *Framebuffer) ClearDepthV(v float32)
func (*Framebuffer) Dispose ¶
func (f *Framebuffer) Dispose()
func (*Framebuffer) GetHeight ¶
func (f *Framebuffer) GetHeight() int
func (*Framebuffer) GetID ¶
func (f *Framebuffer) GetID() uint32
GetID returns the OpenGL framebuffer ID of this Framebuffer.
func (*Framebuffer) GetWidth ¶
func (f *Framebuffer) GetWidth() int
func (*Framebuffer) Texture ¶
func (f *Framebuffer) Texture() texture.Texture
Texture returns the Framebuffer's underlying Texture that the Framebuffer draws on.
func (*Framebuffer) Unbind ¶
func (f *Framebuffer) Unbind()
Unbind unbinds the Framebuffer. All draw operations will go to whatever was bound before this Framebuffer.
type IndexBufferObject ¶
type IndexBufferObject struct {
// contains filtered or unexported fields
}
func NewIndexBufferObject ¶
func NewIndexBufferObject(maxIndices int) *IndexBufferObject
func NewIndexBufferObjectInt ¶
func NewIndexBufferObjectInt(maxIndices int) *IndexBufferObject
func (*IndexBufferObject) Bind ¶
func (ibo *IndexBufferObject) Bind()
func (*IndexBufferObject) Capacity ¶
func (ibo *IndexBufferObject) Capacity() int
func (*IndexBufferObject) Dispose ¶
func (ibo *IndexBufferObject) Dispose()
func (*IndexBufferObject) Draw ¶
func (ibo *IndexBufferObject) Draw()
func (*IndexBufferObject) DrawInstanced ¶
func (ibo *IndexBufferObject) DrawInstanced(baseInstance, instanceCount int)
func (*IndexBufferObject) DrawPart ¶
func (ibo *IndexBufferObject) DrawPart(offset, length int)
func (*IndexBufferObject) DrawPartInstanced ¶
func (ibo *IndexBufferObject) DrawPartInstanced(offset, length, baseInstance, instanceCount int)
func (*IndexBufferObject) SetData ¶
func (ibo *IndexBufferObject) SetData(offset int, data []uint16)
reflect.TypeOf(s).Elem().Size()
func (*IndexBufferObject) SetDataI ¶
func (ibo *IndexBufferObject) SetDataI(offset int, data []uint32)
func (*IndexBufferObject) Unbind ¶
func (ibo *IndexBufferObject) Unbind()
type MemoryChunk ¶
type PersistentBufferObject ¶
type PersistentBufferObject struct {
// contains filtered or unexported fields
}
func NewPersistentBufferObject ¶
func NewPersistentBufferObject(maxFloats int) *PersistentBufferObject
func (*PersistentBufferObject) Bind ¶
func (vbo *PersistentBufferObject) Bind()
func (*PersistentBufferObject) Capacity ¶
func (vbo *PersistentBufferObject) Capacity() int
func (*PersistentBufferObject) Dispose ¶
func (vbo *PersistentBufferObject) Dispose()
func (*PersistentBufferObject) GetID ¶
func (vbo *PersistentBufferObject) GetID() uint32
func (*PersistentBufferObject) Map ¶
func (vbo *PersistentBufferObject) Map(size int) MemoryChunk
func (*PersistentBufferObject) Resize ¶
func (vbo *PersistentBufferObject) Resize(newCapacity int)
func (*PersistentBufferObject) SetData ¶
func (vbo *PersistentBufferObject) SetData(offset int, data []float32)
func (*PersistentBufferObject) Unbind ¶
func (vbo *PersistentBufferObject) Unbind()
func (*PersistentBufferObject) Unmap ¶
func (vbo *PersistentBufferObject) Unmap(offset, size int)
type StreamingBuffer ¶
type VertexArrayObject ¶
type VertexArrayObject struct {
// contains filtered or unexported fields
}
func NewVertexArrayObject ¶
func NewVertexArrayObject() *VertexArrayObject
func (*VertexArrayObject) AddMappedVBO ¶
func (*VertexArrayObject) AddPersistentVBO ¶
func (*VertexArrayObject) Attach ¶
func (vao *VertexArrayObject) Attach(s *shader.RShader)
func (*VertexArrayObject) AttachIBO ¶
func (vao *VertexArrayObject) AttachIBO(ibo *IndexBufferObject)
func (*VertexArrayObject) Bind ¶
func (vao *VertexArrayObject) Bind()
func (*VertexArrayObject) Dispose ¶
func (vao *VertexArrayObject) Dispose()
func (*VertexArrayObject) Draw ¶
func (vao *VertexArrayObject) Draw()
func (*VertexArrayObject) DrawInstanced ¶
func (vao *VertexArrayObject) DrawInstanced(baseInstance, instanceCount int)
func (*VertexArrayObject) DrawPart ¶
func (vao *VertexArrayObject) DrawPart(offset, length int)
func (*VertexArrayObject) DrawPartInstanced ¶
func (vao *VertexArrayObject) DrawPartInstanced(offset, length, baseInstance, instanceCount int)
func (*VertexArrayObject) GetVBO ¶
func (vao *VertexArrayObject) GetVBO(name string) StreamingBuffer
func (*VertexArrayObject) GetVBOFormat ¶
func (vao *VertexArrayObject) GetVBOFormat(name string) attribute.Format
func (*VertexArrayObject) MapVBO ¶
func (vao *VertexArrayObject) MapVBO(name string, size int) MemoryChunk
func (*VertexArrayObject) Resize ¶
func (vao *VertexArrayObject) Resize(name string, maxVertices int)
func (*VertexArrayObject) SetData ¶
func (vao *VertexArrayObject) SetData(name string, offset int, data []float32)
func (*VertexArrayObject) Unbind ¶
func (vao *VertexArrayObject) Unbind()
type VertexBufferObject ¶
type VertexBufferObject struct {
// contains filtered or unexported fields
}
func NewVertexBufferObject ¶
func NewVertexBufferObject(maxFloats int, mapped bool, mode DrawMode) *VertexBufferObject
func (*VertexBufferObject) Bind ¶
func (vbo *VertexBufferObject) Bind()
func (*VertexBufferObject) Capacity ¶
func (vbo *VertexBufferObject) Capacity() int
func (*VertexBufferObject) Dispose ¶
func (vbo *VertexBufferObject) Dispose()
func (*VertexBufferObject) GetID ¶
func (vbo *VertexBufferObject) GetID() uint32
func (*VertexBufferObject) Map ¶
func (vbo *VertexBufferObject) Map(size int) MemoryChunk
func (*VertexBufferObject) Resize ¶
func (vbo *VertexBufferObject) Resize(newCapacity int)
func (*VertexBufferObject) SetData ¶
func (vbo *VertexBufferObject) SetData(offset int, data []float32)
func (*VertexBufferObject) Unbind ¶
func (vbo *VertexBufferObject) Unbind()
func (*VertexBufferObject) Unmap ¶
func (vbo *VertexBufferObject) Unmap(offset, size int)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.