2020-06-29 04:41:58 +00:00
|
|
|
package d2interface
|
2020-02-01 04:18:11 +00:00
|
|
|
|
2020-06-30 21:04:41 +00:00
|
|
|
// Renderer interface defines the functionality of a renderer
|
2020-02-01 04:18:11 +00:00
|
|
|
type Renderer interface {
|
|
|
|
GetRendererName() string
|
|
|
|
SetWindowIcon(fileName string)
|
2020-02-02 01:39:28 +00:00
|
|
|
Run(f func(Surface) error, width, height int, title string) error
|
2020-02-01 04:18:11 +00:00
|
|
|
IsDrawingSkipped() bool
|
2020-02-09 19:12:04 +00:00
|
|
|
CreateSurface(surface Surface) (Surface, error)
|
|
|
|
NewSurface(width, height int, filter Filter) (Surface, error)
|
|
|
|
IsFullScreen() bool
|
|
|
|
SetFullScreen(fullScreen bool)
|
|
|
|
SetVSyncEnabled(vsync bool)
|
|
|
|
GetVSyncEnabled() bool
|
|
|
|
GetCursorPos() (int, int)
|
2020-02-01 04:18:11 +00:00
|
|
|
CurrentFPS() float64
|
|
|
|
}
|