Documentation ¶
Overview ¶
Package poly will provide a 3D renderer to display polygonal art (aka low-poly).
Note: the rendrer is not yet functional.
Index ¶
- Variables
- func BindMaterialBuffer()
- func BindMeshBuffers()
- func DeleteMaterialBuffer()
- func DeleteMeshBuffers()
- func DirectionalLightSpectralIlluminance(illuminance, temperature float64) color.LRGB
- func Err() error
- func PipelineSetup() gl.PipelineConfig
- func SetupMaterialBuffer(p []Material) error
- func SetupMeshBuffers(m Meshes) error
- func TemperatureColor(temperature float64) color.LRGB
- func ToneMapACES() gl.PipelineConfig
- func ToneMapHable() gl.PipelineConfig
- func ToneMapHejl() gl.PipelineConfig
- func ToneMapReinhardt() gl.PipelineConfig
- func ToneMapSimpleACES() gl.PipelineConfig
- type Face
- type Instance
- type Material
- type MeshID
- type Meshes
- type PlanarCamera
- func (c *PlanarCamera) Bind()
- func (c *PlanarCamera) ChangeDistance(d float32)
- func (c *PlanarCamera) Distance() float32
- func (c *PlanarCamera) Focus() coord.XYZ
- func (c *PlanarCamera) Move(forward, lateral, vertical float32)
- func (c *PlanarCamera) Orientation() (yaw, pitch, roll float32)
- func (c *PlanarCamera) Rotate(yaw, pitch, roll float32)
- func (c *PlanarCamera) SetDistance(d float32)
- func (c *PlanarCamera) SetExposure(aperture, shutterTime, sensitivity float64)
- func (c *PlanarCamera) SetFieldOfView(fov float32, near, far float32)
- func (c *PlanarCamera) SetFocus(p coord.XYZ)
- func (c *PlanarCamera) SetOrientation(yaw, pitch, roll float32)
- func (c *PlanarCamera) View() space.Matrix
- func (c *PlanarCamera) WindowResized()
Constants ¶
This section is empty.
Variables ¶
var ( Gold = color.LRGB{1.000000, 0.765557, 0.336057} Silver = color.LRGB{0.971519, 0.959915, 0.915324} Aluminium = color.LRGB{0.913183, 0.921494, 0.924524} Copper = color.LRGB{0.955008, 0.637427, 0.538163} Chromium = color.LRGB{0.549585, 0.556114, 0.554256} Nickel = color.LRGB{0.659777, 0.608679, 0.525649} Titanium = color.LRGB{0.541931, 0.496791, 0.449419} Cobalt = color.LRGB{0.662124, 0.654864, 0.633732} Platinum = color.LRGB{0.672411, 0.637331, 0.585456} Iron = color.LRGB{0.560, 0.570, 0.580} )
Functions ¶
func BindMaterialBuffer ¶
func BindMaterialBuffer()
func BindMeshBuffers ¶
func BindMeshBuffers()
func DeleteMaterialBuffer ¶
func DeleteMaterialBuffer()
func DeleteMeshBuffers ¶
func DeleteMeshBuffers()
func Err ¶
func Err() error
Err returns the first unchecked error of the package since last call to the function. The error is then considered checked, and further calls to Err will return nil until the next error occurs.
Note: errors occuring while there already is an unchecked error will not be recorded. However, if the debug mode is active, all errors will be logged.
func PipelineSetup ¶
func PipelineSetup() gl.PipelineConfig
func SetupMaterialBuffer ¶
func SetupMeshBuffers ¶
func TemperatureColor ¶
func ToneMapACES ¶
func ToneMapACES() gl.PipelineConfig
ToneMapACES provides a fragment shader function to apply tone mapping at the end of the pipeline. In order to use it, add the following declaration in your fragment shader:
vec3 glam_ToneMap(vec3 Color);
func ToneMapHable ¶
func ToneMapHable() gl.PipelineConfig
ToneMapHable provides a fragment shader function to apply tone mapping at the end of the pipeline. In order to use it, add the following declaration in your fragment shader:
vec3 glam_ToneMap(vec3 Color);
func ToneMapHejl ¶
func ToneMapHejl() gl.PipelineConfig
ToneMapHejl provides a fragment shader function to apply tone mapping at the end of the pipeline. In order to use it, add the following declaration in your fragment shader:
vec3 glam_ToneMap(vec3 Color);
func ToneMapReinhardt ¶
func ToneMapReinhardt() gl.PipelineConfig
ToneMapReinhardt provides a fragment shader function to apply tone mapping at the end of the pipeline. In order to use it, add the following declaration in your fragment shader:
vec3 glam_ToneMap(vec3 Color);
func ToneMapSimpleACES ¶
func ToneMapSimpleACES() gl.PipelineConfig
ToneMapSimpleACES provides a fragment shader function to apply tone mapping at the end of the pipeline. In order to use it, add the following declaration in your fragment shader:
vec3 glam_ToneMap(vec3 Color);
Types ¶
type Instance ¶
type Instance struct { BaseVertex uint32 `layout:"1"` // contains filtered or unexported fields }
type PlanarCamera ¶
type PlanarCamera struct {
// contains filtered or unexported fields
}
A PlanarCamera is a camera designed to move on a plane. Rotation is locked around the "up" axis.
func (*PlanarCamera) Bind ¶
func (c *PlanarCamera) Bind()
func (*PlanarCamera) ChangeDistance ¶
func (c *PlanarCamera) ChangeDistance(d float32)
func (*PlanarCamera) Distance ¶
func (c *PlanarCamera) Distance() float32
func (*PlanarCamera) Focus ¶
func (c *PlanarCamera) Focus() coord.XYZ
func (*PlanarCamera) Move ¶
func (c *PlanarCamera) Move(forward, lateral, vertical float32)
func (*PlanarCamera) Orientation ¶
func (c *PlanarCamera) Orientation() (yaw, pitch, roll float32)
func (*PlanarCamera) Rotate ¶
func (c *PlanarCamera) Rotate(yaw, pitch, roll float32)
func (*PlanarCamera) SetDistance ¶
func (c *PlanarCamera) SetDistance(d float32)
func (*PlanarCamera) SetExposure ¶
func (c *PlanarCamera) SetExposure(aperture, shutterTime, sensitivity float64)
func (*PlanarCamera) SetFieldOfView ¶
func (c *PlanarCamera) SetFieldOfView(fov float32, near, far float32)
func (*PlanarCamera) SetFocus ¶
func (c *PlanarCamera) SetFocus(p coord.XYZ)
func (*PlanarCamera) SetOrientation ¶
func (c *PlanarCamera) SetOrientation(yaw, pitch, roll float32)
func (*PlanarCamera) View ¶
func (c *PlanarCamera) View() space.Matrix
func (*PlanarCamera) WindowResized ¶
func (c *PlanarCamera) WindowResized()