-
Notifications
You must be signed in to change notification settings - Fork 0
/
renderTarget.go
34 lines (29 loc) · 881 Bytes
/
renderTarget.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright (C) 2012-2014 by krepa098. All rights reserved.
// Use of this source code is governed by a zlib-style
// license that can be found in the license.txt file.
package gosfml2
/////////////////////////////////////
/// INTERFACES
/////////////////////////////////////
//RenderTexture and RenderWindow are RenderTargets
type RenderTarget interface {
Clear(Color)
Display()
SetView(*View)
GetView() *View
GetDefaultView() *View
GetViewport(view *View) IntRect
MapPixelToCoords(Vector2i, *View) Vector2f
MapCoordsToPixel(Vector2f, *View) Vector2i
PushGLStates()
PopGLStates()
ResetGLStates()
GetSize() Vector2u
Draw(Drawer, RenderStates)
DrawPrimitives([]Vertex, PrimitiveType, RenderStates)
}
/////////////////////////////////////
/// TEST
/////////////////////////////////////
var _ RenderTarget = &RenderTexture{}
var _ RenderTarget = &RenderWindow{}