Пример #1
0
func (p *Pipe) Render() {
	gl.Color4f(0.0, 255.0, 0.0, 1.0)
	rimHeight := 20
	utils.TexturedQuad(p.pipe, p.X, 0, p.Width, p.Y-rimHeight)
	utils.TexturedQuad(p.rim, p.X, p.Y-rimHeight, p.Width, rimHeight)
	utils.TexturedQuad(p.rim, p.X, p.Y+p.Height, p.Width, rimHeight)
	utils.TexturedQuad(p.pipe, p.X, p.Y+p.Height+rimHeight, p.Width, p.ScreenHeight-p.Height)
}
Пример #2
0
func renderBackground(screen *sdl.Surface, bg *glh.Texture) {
	utils.TexturedQuad(bg, 0, 0, int(screen.W), int(screen.H))
}
Пример #3
0
func (b *Bird) Render() {
	utils.TexturedQuad(b.texture, b.X, b.Y, b.Width, b.Height)
}