Documentation ¶
Index ¶
- func Register(d Driver)
- type AttributeLocation
- type BaseType
- type BufferDef
- type BufferTarget
- type BufferUsage
- type Context
- type DataType
- type Driver
- type ProgramCollection
- type ProgramDef
- type ProgramId
- type ProgramResource
- type ResourceType
- type SamplerType
- type ShaderDef
- type ShaderId
- type ShaderType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AttributeLocation ¶
type BufferDef ¶
type BufferDef struct { Name string Usage BufferUsage Attributes []ProgramResource }
type BufferTarget ¶
type BufferTarget uint32
const ( BufferTargetArray BufferTarget = iota + 1 BufferTargetCopyRead BufferTargetCopyWrite BufferTargetElementArray BufferTargetPixelPack BufferTargetPixelUnpack BufferTargetTexture BufferTargetTransformFeedback BufferTargetUniform )
func (BufferTarget) String ¶
func (i BufferTarget) String() string
type BufferUsage ¶
type BufferUsage uint32
const ( BufferUsageStreamDraw BufferUsage = iota + 1 BufferUsageStreamRead BufferUsageStreamCopy BufferUsageStaticDraw BufferUsageStaticRead BufferUsageStaticCopy BufferUsageDynamicDraw BufferUsageDynamicRead BufferUsageDynamicCopy )
func (BufferUsage) String ¶
func (i BufferUsage) String() string
type DataType ¶
type DataType struct { Base BaseType Sampler SamplerType Cols byte Matrix bool Size uint }
type Driver ¶
type Driver interface { Name() string Init() error ShaderCreate(typ ShaderType, sources ...string) (ShaderId, error) ShaderDelete(id ShaderId) ProgramCreate(locations []AttributeLocation, shaders ...ShaderId) (ProgramId, error) ProgramDelete(id ProgramId) ProgramAttributes(id ProgramId) ([]ProgramResource, error) }
type ProgramCollection ¶
type ProgramCollection interface {
Program(name string) (ProgramDef, error)
}
type ProgramDef ¶
type ProgramDef struct { Name string Group string Locations []AttributeLocation Buffers []BufferDef Shaders []ShaderDef }
type ProgramResource ¶
type ProgramResource struct { Resource ResourceType Name string Type DataType Index uint }
func (ProgramResource) GoString ¶
func (pr ProgramResource) GoString() string
type ResourceType ¶
type ResourceType uint32
const ( ResourceTypeUniform ResourceType = iota + 1 ResourceTypeAttribute )
func (ResourceType) String ¶
func (i ResourceType) String() string
type SamplerType ¶
type SamplerType uint32
const ( SamplerType1d SamplerType = iota + 1 SamplerType2d SamplerType3d SamplerTypeCude SamplerType2dRect SamplerType1dArray SamplerType2dArray SamplerTypeCubeArray SamplerTypeBuffer SamplerType2dMS SamplerType2dMSArray SamplerType1dShadow SamplerType2dShadow SamplerTypeCubeShadow SamplerType2dRectShadow SamplerType1dArrayShadow SamplerType2dArrayShadow SamplerTypeCubeArrayShadow )
func (SamplerType) String ¶
func (i SamplerType) String() string
type ShaderDef ¶
type ShaderDef struct { Type ShaderType Source []string }
type ShaderType ¶
type ShaderType uint32
const ( ShaderTypeVertex ShaderType = iota + 1 ShaderTypeGeometry ShaderTypeFragment )
func (ShaderType) String ¶
func (i ShaderType) String() string
Click to show internal directories.
Click to hide internal directories.