opengl

package
v0.52.2 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package opengl wraps the go-gl/gl OpenGL bindings with a compile-time OpenGL version selector.

This package allows clients to target multiple version of OpenGL when building go-flutter. default is v3.3

Golang build constraints are used for version selection.

Index

Constants

View Source
const (
	TEXTURE2D = gl.TEXTURE_2D
	RGBA8     = gl.RGBA8
)

const exposed to go-flutter

Variables

This section is empty.

Functions

func BindTexture

func BindTexture(texture uint32)

BindTexture binds a named texture to a texturing target

func CreateTexture

func CreateTexture(texture *uint32)

CreateTexture creates a texture for go-flutter uses

func DeleteTextures

func DeleteTextures(n int32, textures *uint32)

DeleteTextures deletes named textures

func GLFWWindowHint

func GLFWWindowHint()

GLFWWindowHint sets hints for the next call to CreateWindow.

func Init

func Init() error

Init opengl

func Ptr

func Ptr(data interface{}) unsafe.Pointer

Ptr takes a slice or pointer (to a singular scalar value or the first element of an array or slice) and returns its GL-compatible address.

func TexImage2D

func TexImage2D(width, height int32, pixels unsafe.Pointer)

TexImage2D specifies a two-dimensional texture image

Types

This section is empty.

Jump to

Keyboard shortcuts

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