mtOpenGL

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFbo

func CreateFbo(colorTex, depthTex *uint32, width, height int32, multisampling bool, samples int32, isFloatingPoint bool, mipmapLevels int32) uint32

func CreateFboWithExistingTextures

func CreateFboWithExistingTextures(colorTex, depthTex *uint32, texType uint32) uint32

func CreateLightFbo

func CreateLightFbo(colorTex, depthTex *uint32, width, height int32, multisampling bool, samples int32) uint32

Some internal format changes, like only having the RG channels but with higher 32F precision.

func CreateTexture

func CreateTexture(width, height int32, internalFormat, format, internalType uint32, multisampling bool, samples, mipmapLevels int32) uint32

func NewComputeProgram

func NewComputeProgram(computeShaderName string) (uint32, error)

func NewProgram

func NewProgram(vertexShaderName, geometryShaderName, tessControlShaderName, tessEvalShaderName, fragmentShaderName string) (uint32, error)

Mostly taken from the Demo. But compiling and linking shaders just should be done like this anyways.

Types

type ImageTexture

type ImageTexture struct {
	TextureHandle uint32
	TextureSize   mgl32.Vec2
}

func CreateImageTexture

func CreateImageTexture(imageName string, isRepeating bool) ImageTexture

type PngImage

type PngImage struct {
	Img image.Image
}

func LoadImage

func LoadImage(file string) (PngImage, error)

func (*PngImage) RGBAAt

func (png *PngImage) RGBAAt(x, y int, flippedY bool) (float32, float32, float32, float32)

func (*PngImage) RangeX

func (png *PngImage) RangeX() int

func (*PngImage) RangeY

func (png *PngImage) RangeY() int

Jump to

Keyboard shortcuts

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