Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRenderTransaction ¶
Types ¶
type MediaCache ¶
type MediaCache interface {
CacheImages(event bus.DrawLayersEvent)
CacheFonts(event lib.Font)
GetImage(img string) *rl.Image
GetFont(fontName string) *rl.Font
GetAudio(fileName string) *rl.Sound
}
func NewMediaCache ¶
func NewMediaCache() MediaCache
type MediaCacheData ¶
type MediaCacheData struct {
// contains filtered or unexported fields
}
func (*MediaCacheData) CacheFonts ¶
func (c *MediaCacheData) CacheFonts(evt lib.Font)
func (*MediaCacheData) CacheImages ¶
func (c *MediaCacheData) CacheImages(evt bus.DrawLayersEvent)
type RaylibPeerController ¶
type RaylibPeerController interface {
bus.DrawEventListener
bus.AudioEventListener
bus.TextEventListener
bus.KeysRegistrationEventListener
bus.ControlEventListener
MediaCache
GetControlEvents() []bus.ControlEvent
GetDrawEvent() bus.DrawEvent
GetAudioEvent() bus.AudioEvent //One event at at time...
GetTextEvent() bus.TextEvent
GetKeysRegistrationEvent() bus.KeysRegistrationEvent
}
func NewRaylibPeerController ¶
func NewRaylibPeerController() RaylibPeerController
The peer raylibPeerController is to mediate any impedance mismatch between the tight single threaded loop of the Raylib engine and the concurrent mechanisms of Golang. Note: Raylib is very fast but very intolerant of mutations on any data it is using. So the peer and MediaCache can keep off thread data for rendering, listening and sending. Raylib loop will query this raylibPeerController for data it needs.
type RenderPipelineData ¶
type RenderPipelineData struct {
// contains filtered or unexported fields
}
func (*RenderPipelineData) Add ¶
func (r *RenderPipelineData) Add(function renderingPipelineFunction) RendererPipeline
func (*RenderPipelineData) Execute ¶
func (r *RenderPipelineData) Execute(transaction *renderData)
type RenderTransaction ¶
type RenderTransaction interface {
GetDrawEvent() bus.DrawEvent
SetDrawEvent(event bus.DrawEvent)
GetTextEvent() bus.TextEvent
SetTextEvent(evt bus.TextEvent)
GetMediaCache() MediaCache
SetMediaCache(MediaCache)
GetRenderImage() *rl.Image
SetRenderImage(*rl.Image) //Mot used currently but will be in future instead of cache.
SetRenderTexture(*rl.Texture2D)
GetRenderTexture() *rl.Texture2D
SetPreviousTexture(*rl.Texture2D)
GetPreviousTexture() *rl.Texture2D
}
TODO Revamp this
type RendererPipeline ¶
type RendererPipeline interface {
Add(function renderingPipelineFunction) RendererPipeline
Execute(transaction *renderData)
}
func NewRendererPipeline ¶
func NewRendererPipeline() RendererPipeline
Click to show internal directories.
Click to hide internal directories.