render: move render_world_helper, remove chunks drawn behind view

This commit is contained in:
2022-01-27 01:09:45 +08:00
parent d8df67bc20
commit 7b6c16789c
11 changed files with 257 additions and 56 deletions

View File

@@ -66,6 +66,11 @@ func NewTextureRGBA(image *image.RGBA) *Texture {
return &Texture{tex: tex}
}
// NewTextureFromHandle creates a new *Texture from an existing OpenGL handle.
func NewTextureFromHandle(handle uint32) *Texture {
return &Texture{tex: handle}
}
// updateFilters updates the MIN/MAG_FILTER parameters of the texture based on t.smooth and t.hasMipmap.
//
// It does not bind the texture; the caller has to do that