Documentation ¶
Index ¶
- Constants
- type OpenglRenderer
- func (glRenderer *OpenglRenderer) AddLight(light *renderer.Light)
- func (glRenderer *OpenglRenderer) AntiAliasing(samples int)
- func (glRenderer *OpenglRenderer) BackGroundColor(r, g, b, a float32)
- func (glRenderer *OpenglRenderer) Camera() *renderer.Camera
- func (glRenderer *OpenglRenderer) CreatePostEffect(shader *renderer.Shader)
- func (glRenderer *OpenglRenderer) DestroyCubeMap(cubeMap *renderer.CubeMap)
- func (glRenderer *OpenglRenderer) DestroyGeometry(geometry *renderer.Geometry)
- func (glRenderer *OpenglRenderer) DestroyMaterial(material *renderer.Material)
- func (glRenderer *OpenglRenderer) DestroyPostEffects(shader *renderer.Shader)
- func (glRenderer *OpenglRenderer) DrawGeometry(geometry *renderer.Geometry, transform mgl32.Mat4)
- func (glRenderer *OpenglRenderer) LockCursor(lock bool)
- func (glRenderer *OpenglRenderer) RemoveLight(light *renderer.Light)
- func (glRenderer *OpenglRenderer) SetCamera(camera *renderer.Camera)
- func (glRenderer *OpenglRenderer) SetInit(callback func())
- func (glRenderer *OpenglRenderer) SetRender(callback func())
- func (glRenderer *OpenglRenderer) SetUpdate(callback func())
- func (glRenderer *OpenglRenderer) Start()
- func (glRenderer *OpenglRenderer) UseCubeMap(cubeMap *renderer.CubeMap)
- func (glRenderer *OpenglRenderer) UseMaterial(material *renderer.Material)
- func (glRenderer *OpenglRenderer) UseRendererParams(params renderer.RendererParams)
- func (glRenderer *OpenglRenderer) UseShader(shader *renderer.Shader)
- func (glRenderer *OpenglRenderer) WindowDimensions() mgl32.Vec2
Constants ¶
View Source
const MAX_DIRECTIONAL_LIGHTS = 4
View Source
const MAX_POINT_LIGHTS = 4
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OpenglRenderer ¶
type OpenglRenderer struct {
WindowWidth, WindowHeight int
FullScreen bool
WindowTitle string
Window *glfw.Window
// contains filtered or unexported fields
}
OpenglRenderer - opengl implementation
func NewOpenglRenderer ¶
func NewOpenglRenderer(WindowTitle string, WindowWidth, WindowHeight int, FullScreen bool) *OpenglRenderer
NewOpenglRenderer - create new renderer
func (*OpenglRenderer) AddLight ¶
func (glRenderer *OpenglRenderer) AddLight(light *renderer.Light)
func (*OpenglRenderer) AntiAliasing ¶
func (glRenderer *OpenglRenderer) AntiAliasing(samples int)
func (*OpenglRenderer) BackGroundColor ¶
func (glRenderer *OpenglRenderer) BackGroundColor(r, g, b, a float32)
BackGroundColor - set background color for the scene
func (*OpenglRenderer) Camera ¶
func (glRenderer *OpenglRenderer) Camera() *renderer.Camera
func (*OpenglRenderer) CreatePostEffect ¶
func (glRenderer *OpenglRenderer) CreatePostEffect(shader *renderer.Shader)
func (*OpenglRenderer) DestroyCubeMap ¶
func (glRenderer *OpenglRenderer) DestroyCubeMap(cubeMap *renderer.CubeMap)
func (*OpenglRenderer) DestroyGeometry ¶
func (glRenderer *OpenglRenderer) DestroyGeometry(geometry *renderer.Geometry)
func (*OpenglRenderer) DestroyMaterial ¶
func (glRenderer *OpenglRenderer) DestroyMaterial(material *renderer.Material)
func (*OpenglRenderer) DestroyPostEffects ¶
func (glRenderer *OpenglRenderer) DestroyPostEffects(shader *renderer.Shader)
func (*OpenglRenderer) DrawGeometry ¶
func (glRenderer *OpenglRenderer) DrawGeometry(geometry *renderer.Geometry, transform mgl32.Mat4)
func (*OpenglRenderer) LockCursor ¶
func (glRenderer *OpenglRenderer) LockCursor(lock bool)
func (*OpenglRenderer) RemoveLight ¶
func (glRenderer *OpenglRenderer) RemoveLight(light *renderer.Light)
func (*OpenglRenderer) SetCamera ¶
func (glRenderer *OpenglRenderer) SetCamera(camera *renderer.Camera)
func (*OpenglRenderer) SetInit ¶
func (glRenderer *OpenglRenderer) SetInit(callback func())
func (*OpenglRenderer) SetRender ¶
func (glRenderer *OpenglRenderer) SetRender(callback func())
func (*OpenglRenderer) SetUpdate ¶
func (glRenderer *OpenglRenderer) SetUpdate(callback func())
func (*OpenglRenderer) UseCubeMap ¶
func (glRenderer *OpenglRenderer) UseCubeMap(cubeMap *renderer.CubeMap)
func (*OpenglRenderer) UseMaterial ¶
func (glRenderer *OpenglRenderer) UseMaterial(material *renderer.Material)
func (*OpenglRenderer) UseRendererParams ¶
func (glRenderer *OpenglRenderer) UseRendererParams(params renderer.RendererParams)
func (*OpenglRenderer) UseShader ¶
func (glRenderer *OpenglRenderer) UseShader(shader *renderer.Shader)
func (*OpenglRenderer) WindowDimensions ¶
func (glRenderer *OpenglRenderer) WindowDimensions() mgl32.Vec2
Click to show internal directories.
Click to hide internal directories.