Documentation ¶
Index ¶
- type CollisionMeshComponent
- type ColorComponent
- type IndiceComponent
- type Light
- type Material
- type MaterialComponent
- type MeshComponent
- type MeshEntity
- type NormalComponent
- type OGLRenderer
- type PBRMaterial
- type PipelineRenderer
- type RGB
- type ShaderComponent
- type ShadersMap
- type TEXIndex
- type TexComponent
- type TexCoord
- type Texture
- type TexturesMap
- type TransformComponent
- type VAOIndex
- type VBOIndex
- type VertexComponent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollisionMeshComponent ¶
type CollisionMeshComponent struct { Indice IndiceComponent Vertex VertexComponent Normal NormalComponent Transform TransformComponent }
CollisionMeshComponent stores a Reduced low poly bounds mesh for standard type explicit collision handling
type ColorComponent ¶
type IndiceComponent ¶
type Light ¶
Light color should be treated as a wattage output per unit surface area Given the initial positional conditions.
type Material ¶
type Material struct { AlphaCutoff float32 AlphaMode int DoubleSided int BaseColor RGB SpecularColor RGB EmissiveFactor RGB ColorTexture *Texture NormalTexture *Texture OcclusionTexture *Texture EmmissiveTexture *Texture MetallicTexutre *Texture MetallicRoughMaterial *PBRMaterial Name string }
func NewMaterial ¶
type MaterialComponent ¶
type MaterialComponent struct {
Name string
}
type MeshComponent ¶
type MeshComponent struct { *IndiceComponent *VertexComponent *NormalComponent *ColorComponent *TransformComponent *TexComponent *ShaderComponent *MaterialComponent }
type MeshEntity ¶
type MeshEntity struct { Basic ecs.BasicEntity Mesh MeshComponent VAO int //VAO Index }
MeshEntity is a non-exported Entity component for ECS Systems
func (*MeshEntity) PrintDebug ¶
func (m *MeshEntity) PrintDebug()
-----------Debug Struct Objects------------------------//
type NormalComponent ¶
type OGLRenderer ¶
type OGLRenderer interface { Setup(width int, height int, name string) error AddShader(path string, gl_shader_type uint32) (uint32, error) LinkShaders(vertexGLID uint32, fragmentGLID uint32) (uint32, error) GetUniformLocation(program uint32, name string) (int32, error) Layout(num_vao int, num_vbo int, num_tex int) error BufferArrayData(vboID int, width int, offset int, ref []byte) error BufferArrayFloat(vboID int, width int, offset int, ref []float32) error BufferArrayPointer(vboID int, width int, ref unsafe.Pointer) error BufferIndexData(vboID int, width int, offset int, ref []byte) error InvalidateBuffer(vboID int, width int) error Draw(mesh_entities []*MeshEntity, shaders *ShadersMap, materials map[string]*Material, mapid uint32) error VertexArrayAttr(index int, components int, gltype uint32, offset int) BindVertexArray(vao_index int) BindArrayBuffer(vbo_index int) LoadTexture(path string, index int) (uint32, error) LoadEnvironment(path string, index int) (uint32, error) SetActiveTexture(glid uint32, index uint32) Update(dt float64) error ShouldClose() bool SwapBuffers() Status() error GetVBO(int) uint32 GetVAO(int) uint32 }
OGLRenderer interface defines basic named operations for OpenGL renderer interaction via the RenderSystem component. Allows rendersystem to work with the heterogenous OGL API without a corrollary to the CommandBuffer type GPU APIs such as Vulkan, DX12, METAL Those renderer types are defined seperately in the CommandRenderer interace
type PBRMaterial ¶
type PBRMaterial struct { MetallicRoughnessTexture *Texture Metallic float32 Roughness float32 Anisoptric float32 }
func NewPBRMaterial ¶
func NewPBRMaterial(color RGB, metalness float32, roughness float32) *PBRMaterial
type PipelineRenderer ¶
type PipelineRenderer interface {
InitPipeline() error //thats all i got lol
}
PipelineRenderer interface deals with DX12, METAL, VULKAN like APIs that support more similar APIs for interactions with the GPU. This pipeline renderer remains abstract but the interface is declared for future support and testing purposes.
type ShaderComponent ¶
type ShadersMap ¶
type ShadersMap struct { //Shader VertexShaderPaths map[string]string FragmentShaderPaths map[string]string ShaderPrograms map[string]uint32 FragShaderID map[string]uint32 VertShaderID map[string]uint32 ProgramID map[string]uint32 ShaderUniforms map[string]int32 ProgramLinks map[uint32]uint32 }
RenderContext Holds Graphics API Draw Parameters
type TexComponent ¶
type TexCoord ¶
type TexCoord struct {
// contains filtered or unexported fields
}
TexCoord Render Structure
type TexturesMap ¶
type TransformComponent ¶
Transform stores the mesh model transformation along with the "Position" Position is once calc'd center of mass for the mesh and used for OCTREE Identification of the Mesh