Documentation
¶
Overview ¶
Package sdlplay implements the GUI interface. Suitable for applications that require a minimalist screen intended for playing games/cartrdiges, rather than debugging them.
Index ¶
- type SdlPlay
- func (scr *SdlPlay) Destroy(output io.Writer)
- func (scr *SdlPlay) EndRendering() error
- func (scr *SdlPlay) NewFrame(frameNum int) error
- func (scr *SdlPlay) NewScanline(scanline int) error
- func (scr *SdlPlay) Resize(topScanline, numScanlines int) error
- func (scr *SdlPlay) Service()
- func (scr *SdlPlay) SetAltPixel(x, y int, red, green, blue byte, vblank bool) error
- func (scr *SdlPlay) SetFeature(request gui.FeatureReq, args ...interface{}) error
- func (scr *SdlPlay) SetPixel(x, y int, red, green, blue byte, vblank bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SdlPlay ¶
type SdlPlay struct {
television.Television
// contains filtered or unexported fields
}
SdlPlay is a simple SDL implementation of the television.PixelRenderer interface
func NewSdlPlay ¶
func NewSdlPlay(tv television.Television, scale float32) (*SdlPlay, error)
NewSdlPlay is the preferred method of initialisation for SdlPlay.
func (*SdlPlay) Destroy ¶
Destroy implements GuiCreator interface
MUST ONLY be called from the #mainthread
func (*SdlPlay) NewFrame ¶
NewFrame implements television.PixelRenderer interface
MUST NOT be called from #mainthread
func (*SdlPlay) Resize ¶
Resize implements television.PixelRenderer interface
MUST NOT be called from #mainthread
func (*SdlPlay) Service ¶
func (scr *SdlPlay) Service()
Service implements GuiCreator interface.
MUST ONLY be called from the #mainthread
func (*SdlPlay) SetFeature ¶
func (scr *SdlPlay) SetFeature(request gui.FeatureReq, args ...interface{}) error
SetFeature implements the GUI interface
func (*SdlPlay) SetPixel ¶
SetPixel implements television.PixelRenderer interface
MUST NOT be called from #mainthread
interesting that writing to pixel array does not trigger a race condition even though we read pixels, when updating texture, in a different thread.
!!TODO: race condition in SetPixel() in sdlplay?