Versions in this module Expand all Collapse all v0 v0.1.0 Nov 3, 2020 Changes in this version + const ColorAttributeIndex + const CoordAttributeIndex + const NormalAttributeIndex + const TangentAttributeIndex + const TexCoordAttributeIndex + type CubeTexture struct + ID uint32 + func (t *CubeTexture) Allocate(data CubeTextureData) error + func (t *CubeTexture) Release() error + type CubeTextureData struct + BackSideData []byte + BottomSideData []byte + Dimension int32 + Format DataFormat + FrontSideData []byte + LeftSideData []byte + RightSideData []byte + TopSideData []byte + type DataFormat int + const DataFormatRGBA32F + const DataFormatRGBA8 + type DepthFunc int + const DepthFuncLess + const DepthFuncLessOrEqual + type Framebuffer struct + AlbedoTextureID uint32 + DepthTextureID uint32 + Height int32 + ID uint32 + NormalTextureID uint32 + Width int32 + func (b *Framebuffer) Allocate(data FramebufferData) error + func (b *Framebuffer) Release() error + func (b Framebuffer) HasAlbedoAttachment() bool + func (b Framebuffer) HasDepthAttachment() bool + func (b Framebuffer) HasNormalAttachment() bool + type FramebufferData struct + HasAlbedoAttachment bool + HasDepthAttachment bool + HasNormalAttachment bool + Height int32 + UsesHDRAlbedo bool + Width int32 + type IndexWriter struct + func NewIndexWriter(vad VertexArrayData) *IndexWriter + func (w *IndexWriter) Next() *IndexWriter + func (w *IndexWriter) SetIndex(index uint16) *IndexWriter + type Item struct + AlbedoColor sprec.Vec4 + AlbedoCubeTexture *CubeTexture + AlbedoTwoDTexture *TwoDTexture + AmbientReflectionTexture *CubeTexture + AmbientRefractionTexture *CubeTexture + BackfaceCulling bool + Exposure float32 + IndexCount int32 + IndexOffset int + LightDirectionWS sprec.Vec3 + Metalness float32 + MetalnessTwoDTexture *TwoDTexture + ModelMatrix sprec.Mat4 + NormalScale float32 + NormalTwoDTexture *TwoDTexture + Primitive RenderPrimitive + Program *Program + Roughness float32 + RoughnessTwoDTexture *TwoDTexture + VertexArray *VertexArray + type Pipeline struct + func (p *Pipeline) BeginSequence() *Sequence + func (p *Pipeline) EndSequence(sequence *Sequence) + func (p *Pipeline) SchedulePostRender(action func()) + func (p *Pipeline) SchedulePreRender(action func()) + type Program struct + AlbedoColorLocation int32 + AlbedoCubeTextureLocation int32 + AlbedoTwoDTextureLocation int32 + AmbientReflectionTextureLocation int32 + AmbientRefractionTextureLocation int32 + CameraMatrixLocation int32 + ExposureLocation int32 + FBColor0TextureLocation int32 + FBColor1TextureLocation int32 + FBDepthTextureLocation int32 + FragmentShaderID uint32 + ID uint32 + LightDirectionWSLocation int32 + MetalnessLocation int32 + MetalnessTwoDTextureLocation int32 + ModelMatrixLocation int32 + NormalScaleLocation int32 + NormalTwoDTextureLocation int32 + ProjectionMatrixLocation int32 + RoughnessLocation int32 + RoughnessTwoDTextureLocation int32 + VertexShaderID uint32 + ViewMatrixLocation int32 + func (p *Program) Allocate(data ProgramData) error + func (p *Program) Release() error + type ProgramData struct + FragmentShaderSourceCode string + VertexShaderSourceCode string + type RenderPrimitive int + const RenderPrimitiveLineLoop + const RenderPrimitiveLineStrip + const RenderPrimitiveLines + const RenderPrimitivePoints + const RenderPrimitiveTriangleFan + const RenderPrimitiveTriangleStrip + const RenderPrimitiveTriangles + type Renderer struct + func NewRenderer() *Renderer + func (r *Renderer) BeginPipeline() *Pipeline + func (r *Renderer) EndPipeline(pipeline *Pipeline) + func (r *Renderer) Render() + type Sequence struct + BackgroundColor sprec.Vec4 + BlitFramebufferColor bool + BlitFramebufferDepth bool + BlitFramebufferSmooth bool + CameraMatrix sprec.Mat4 + ClearColor bool + ClearDepth bool + DepthFunc DepthFunc + ProjectionMatrix sprec.Mat4 + SourceFramebuffer *Framebuffer + TargetFramebuffer *Framebuffer + TestDepth bool + ViewMatrix sprec.Mat4 + WriteDepth bool + func (s *Sequence) BeginItem() *Item + func (s *Sequence) EndItem(item *Item) + type TwoDTexture struct + ID uint32 + func (t *TwoDTexture) Allocate(data TwoDTextureData) error + func (t *TwoDTexture) Release() error + type TwoDTextureData struct + Data []byte + Height int32 + Width int32 + type VertexArray struct + ID uint32 + IndexBufferID uint32 + VertexBufferID uint32 + func (a *VertexArray) Allocate(data VertexArrayData) error + func (a *VertexArray) Release() error + func (a *VertexArray) Update(data VertexArrayData) error + type VertexArrayData struct + IndexData []byte + Layout VertexArrayLayout + VertexData []byte + func NewVertexArrayData(vertices, indices int, layout VertexArrayLayout) VertexArrayData + type VertexArrayLayout struct + ColorOffset int + ColorStride int32 + CoordOffset int + CoordStride int32 + HasColor bool + HasCoord bool + HasNormal bool + HasTangent bool + HasTexCoord bool + NormalOffset int + NormalStride int32 + TangentOffset int + TangentStride int32 + TexCoordOffset int + TexCoordStride int32 + type VertexWriter struct + func NewVertexWriter(vad VertexArrayData) *VertexWriter + func (w *VertexWriter) Next() *VertexWriter + func (w *VertexWriter) SetCoord(x, y, z float32) *VertexWriter