mirror of
https://github.com/Kugelschieber/go-game.git
synced 2026-01-18 06:40:28 +00:00
Removed shader, added 3D rendering (no demo yet, coming next), started bitmap font rendering, a few fixes and improvements.
This commit is contained in:
19
loader.go
19
loader.go
@@ -75,6 +75,25 @@ type Ply struct {
|
||||
IndexBuffer, VertexBuffer, TexCoordBuffer, NormalBuffer *VBO
|
||||
}
|
||||
|
||||
// Drops contained GL buffers.
|
||||
func (p *Ply) Drop() {
|
||||
if p.IndexBuffer != nil {
|
||||
p.IndexBuffer.Drop()
|
||||
}
|
||||
|
||||
if p.VertexBuffer != nil {
|
||||
p.VertexBuffer.Drop()
|
||||
}
|
||||
|
||||
if p.TexCoordBuffer != nil {
|
||||
p.TexCoordBuffer.Drop()
|
||||
}
|
||||
|
||||
if p.NormalBuffer != nil {
|
||||
p.NormalBuffer.Drop()
|
||||
}
|
||||
}
|
||||
|
||||
// Returns the name of this resource.
|
||||
func (p *Ply) GetName() string {
|
||||
return p.name
|
||||
|
||||
Reference in New Issue
Block a user