Documentation
¶
Index ¶
- Variables
- func Interpolate(bary gl.Vec3, v0, v1, v2 float32) float32
- func InterpolateVec2(bary gl.Vec3, v0, v1, v2 gl.Vec2) gl.Vec2
- func IntersectLine(p0, p1, p2, p3 gl.Vec2) (intersection gl.Vec2, intersects bool)
- func Sample2D(texture image.Image, uv gl.Vec2) emu.Glyph
- type Camera
- type Context
- func (c *Context) Camera() *Camera
- func (c *Context) Clear()
- func (c *Context) ClearZBuffer()
- func (c *Context) Image() image.Image
- func (c *Context) Line(s LineShader, v0, v1 gl.Vec3)
- func (c *Context) Lines(s LineShader, verts []gl.Vec3, segments [][2]int)
- func (c *Context) Resize(size geom.Vec2)
- func (c *Context) SetTarget(i image.Image)
- func (c *Context) Size() geom.Vec2
- func (c *Context) Triangle(s Shader, v0, v1, v2 gl.Vec3)
- func (c *Context) TriangleStrip(s Shader, vertices []gl.Vec3)
- func (c *Context) Triangles(s Shader, verts []gl.Vec3, faces [][3]int)
- type DefaultFragmentShader
- type DefaultLineFragmentShader
- type DefaultVertexShader
- type Drawable
- type FragmentShader
- type LineFragmentShader
- type LineShader
- type NoopVertexShader
- type Rect
- type Shader
- type TransformShader
- type VertexShader
Constants ¶
This section is empty.
Variables ¶
View Source
var StaticShader = func(uv gl.Vec3) emu.Glyph { c := emu.EmptyGlyph() c.Char = '*' return c }
Functions ¶
func IntersectLine ¶ added in v1.6.0
IntersectLine calculates the intersections of two lines, each of which is defined by two points. `intersects` is true if and only if the intersection of the two lines falls on those lines. In other words, the lines are treated as being of finite length.
Types ¶
type Camera ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (*Context) ClearZBuffer ¶ added in v1.6.0
func (c *Context) ClearZBuffer()
func (*Context) Line ¶ added in v1.6.0
func (c *Context) Line(s LineShader, v0, v1 gl.Vec3)
Line draws a line in world space from v0 to v1 using the given shader.
type DefaultFragmentShader ¶ added in v1.6.0
type DefaultFragmentShader struct{}
type DefaultLineFragmentShader ¶ added in v1.6.0
type DefaultLineFragmentShader struct{}
type DefaultVertexShader ¶
type DefaultVertexShader struct{}
type FragmentShader ¶
type LineFragmentShader ¶ added in v1.6.0
type LineShader ¶ added in v1.6.0
type LineShader interface {
VertexShader
LineFragmentShader
}
type NoopVertexShader ¶ added in v1.6.0
type NoopVertexShader struct{}
type Rect ¶
func (Rect) Intersections ¶ added in v1.6.0
type Shader ¶
type Shader interface {
VertexShader
FragmentShader
}
type TransformShader ¶
Click to show internal directories.
Click to hide internal directories.