image

package
v0.0.0-...-dd2ef8f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2017 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const BFS = `
#version 330 core

in vec4 VertexColor;
in vec2 TexCoord;

out vec4 color;

uniform sampler2D imageTexture;

void main()
{
	color = texture(imageTexture, TexCoord);
}
` + "\x00"
View Source
const BVS = `
#version 330 core

layout (location = 0) in vec3 position;
layout (location = 1) in vec3 color;
layout (location = 2) in vec2 texCoord;

out vec4 VertexColor;
out vec2 TexCoord;

void main()
{
	gl_Position = vec4(position, 1.0);
	VertexColor = vec4(color, 1.0f);	
	TexCoord = vec2(texCoord.x, 1.0f - texCoord.y);
}
` + "\x00"

Variables

This section is empty.

Functions

func Xrror

func Xrror(base string) *xrror

Types

type Image

type Image struct {
	image.Image
	// contains filtered or unexported fields
}

func New

func New(path string) (*Image, error)

func (*Image) Draw

func (i *Image) Draw()

func (*Image) Free

func (i *Image) Free()

func (*Image) Path

func (i *Image) Path() string

type Mesh

type Mesh struct {
	Handle uint32
}

func NewMesh

func NewMesh() *Mesh

func (*Mesh) Bind

func (m *Mesh) Bind()

func (*Mesh) Free

func (m *Mesh) Free()

type Shader

type Shader struct {
	Handle uint32
	Err    error
}

func NewShader

func NewShader(kind uint32, raw string) *Shader

func Program

func Program(shaders ...*Shader) *Shader

func ProgramMust

func ProgramMust(shaders ...*Shader) *Shader

func (*Shader) Free

func (s *Shader) Free()

func (*Shader) Use

func (s *Shader) Use()

type Texture

type Texture struct {
	Handle uint32
}

func NewTexture

func NewTexture(im image.Image) *Texture

func (*Texture) Bind

func (t *Texture) Bind()

func (*Texture) Free

func (t *Texture) Free()

func (*Texture) SetImage

func (t *Texture) SetImage(im image.Image)

func (*Texture) SetMagFilter

func (t *Texture) SetMagFilter(x int32)

func (*Texture) SetMinFilter

func (t *Texture) SetMinFilter(x int32)

func (*Texture) SetRGBA

func (t *Texture) SetRGBA(im *image.RGBA)

func (*Texture) SetWrapS

func (t *Texture) SetWrapS(x int32)

func (*Texture) SetWrapT

func (t *Texture) SetWrapT(x int32)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL