Documentation ¶
Overview ¶
Package lux is the core of the engine. It provides many abstraction to OpenGL techniques.
Index ¶
- Constants
- Variables
- func CreateWindow(width, height int, title string, fullscreen bool) (window *glfw.Window)
- func D(x ...interface{})
- func Fstri()
- func GenDepthTexture(width, height int32) gl.Texture2D
- func GenRGBTexture2D(width, height int32) gl.Texture2D
- func GetOpenglVersion() string
- func InitGLFW()
- func InitPostProcessSystem()
- func LoadPng(file string) (gl2.Texture2D, error)
- func MustNotGLError()
- func NewProgram(shaders ...Shader) (gl.Program, error)
- func QueryExtentions()
- func SaveTexture2D(t gl.Texture2D, filename string) error
- func SetContext()
- func StartHeadless() (window *glfw.Window)
- func TerminateGLFW()
- func Traverse(*Camera, func(*Node))
- func Update(float32)
- func ViewportChange(width, height int32)
- type Agent
- type AgentManager
- type AggregateFB
- type AssetManager
- type Camera
- type DirectionalLight
- type GBuffer
- type Light
- type LightAccumulator
- type Mesh
- type Node
- func (n *Node) AttachChildren()
- func (n *Node) Iden()
- func (n *Node) QuatRotate(angle float32, axis *glm.Vec3)
- func (n *Node) Scale(amount float32)
- func (n *Node) SetQuatRotate(angle float32, axis *glm.Vec3)
- func (n *Node) SetScale(amount float32)
- func (n *Node) SetTranslate(x, y, z float32)
- func (n *Node) Translate(x, y, z float32)
- type Particle
- type ParticleSystem
- type PointLight
- type PostProcessFramebuffer
- type PostProcessFramebufferer
- type RenderProgram
- type SceneGraph
- type Shader
- type ShadowCubeFBO
- type ShadowFBO
- func (sfbo *ShadowFBO) BindForDrawing()
- func (sfbo *ShadowFBO) Delete()
- func (sfbo *ShadowFBO) LookAt(ex, ey, ez, tx, ty, tz float32)
- func (sfbo *ShadowFBO) Render(mesh Mesh, transform *Transform)
- func (sfbo *ShadowFBO) SetOrtho(left, right, bottom, top, near, far float32)
- func (sfbo *ShadowFBO) ShadowMap() gl2.Texture2D
- func (sfbo *ShadowFBO) ShadowMat() glm.Mat4
- func (sfbo *ShadowFBO) Unbind()
- type SpotLight
- type Transform
- func (t *Transform) Copy(t2 *Transform)
- func (t *Transform) Iden()
- func (t *Transform) Mat4() glm.Mat4
- func (t *Transform) QuatRotate(angle float32, axis *glm.Vec3)
- func (t *Transform) Scale(amount float32)
- func (t *Transform) SetMatrix(m *[16]float32)
- func (t *Transform) SetQuatRotate(angle float32, axis *glm.Vec3)
- func (t *Transform) SetScale(amount float32)
- func (t *Transform) SetTranslate(x, y, z float32)
- func (t *Transform) Translate(x, y, z float32)
- type VUNMesh
Constants ¶
const (
Launcher int32 = 0
)
the types of particle there are
Variables ¶
var Extensions map[string]bool
On load will contain all available OpenGL extension.
var PostProcessFragmentShaderToneMapping = `#version 330
uniform sampler2D tex;
uniform vec2 resolution;
uniform float time;
in vec2 uv;
layout (location=0) out vec4 outputColor;
float luminance(vec3 color) {
return 0.2126 * color.r + 0.7152 * color.g + 0.0722 * color.b;
}
vec3 tone(vec3 x) {
float A = 0.15;
float B = 0.50;
float C = 0.10;
float D = 0.20;
float E = 0.02;
float F = 0.30;
return ((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;
}
void main(){
vec3 x = vec3(texture(tex,uv));
outputColor = vec4(tone(x), 1);
}
` + "\x00"
PostProcessFragmentShaderToneMapping is a tone mapping shader, needs to be used right after the GBuffer.
var PostprocessfragmentshaderFlip = `#version 330
uniform sampler2D tex;
uniform vec2 resolution;
uniform float time;
in vec2 uv;
layout (location=0) out vec4 outputColor;
void main(){
outputColor=texture(tex,vec2(uv.x,1-uv.y));
}
` + "\x00"
Sample post process shader to flip texture top-botom (usefull for awesomium)
var PostprocessfragmentshaderFxaa = `#version 330
#define FXAA_REDUCE_MIN (1.0/128.0)
#define FXAA_REDUCE_MUL (1.0/8.0)
#define FXAA_SPAN_MAX 8.0
uniform sampler2D tex;
uniform vec2 resolution;
uniform float time;
in vec2 uv;
layout (location=0) out vec4 outputColor;
void main(){
vec2 inverse_resolution=vec2(1.0/resolution.x,1.0/resolution.y);
vec3 rgbNW = texture(tex, (gl_FragCoord.xy + vec2(-1.0,-1.0)) * inverse_resolution).xyz;
vec3 rgbNE = texture(tex, (gl_FragCoord.xy + vec2(1.0,-1.0)) * inverse_resolution).xyz;
vec3 rgbSW = texture(tex, (gl_FragCoord.xy + vec2(-1.0,1.0)) * inverse_resolution).xyz;
vec3 rgbSE = texture(tex, (gl_FragCoord.xy + vec2(1.0,1.0)) * inverse_resolution).xyz;
vec3 rgbM = texture(tex, gl_FragCoord.xy * inverse_resolution).xyz;
vec3 luma = vec3(0.299, 0.587, 0.114);
float lumaNW = dot(rgbNW, luma);
float lumaNE = dot(rgbNE, luma);
float lumaSW = dot(rgbSW, luma);
float lumaSE = dot(rgbSE, luma);
float lumaM = dot(rgbM, luma);
float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));
float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));
vec2 dir;
dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));
dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));
float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) * (0.25 * FXAA_REDUCE_MUL),FXAA_REDUCE_MIN);
float rcpDirMin = 1.0/(min(abs(dir.x), abs(dir.y)) + dirReduce);
dir = min(vec2( FXAA_SPAN_MAX, FXAA_SPAN_MAX),max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),dir * rcpDirMin)) * inverse_resolution;
vec3 rgbA = 0.5 * (texture(tex, gl_FragCoord.xy * inverse_resolution + dir * (1.0/3.0 - 0.5)).xyz + texture(tex, gl_FragCoord.xy * inverse_resolution + dir * (2.0/3.0 - 0.5)).xyz);
vec3 rgbB = rgbA * 0.5 + 0.25 * (texture(tex, gl_FragCoord.xy * inverse_resolution + dir * - 0.5).xyz + texture(tex, gl_FragCoord.xy * inverse_resolution + dir * 0.5).xyz);
float lumaB = dot(rgbB, luma);
if((lumaB < lumaMin) || (lumaB > lumaMax)) {
outputColor = vec4(rgbA,1.0);
} else {
outputColor = vec4(rgbB,1.0);
}
}` + "\x00"
Sample post process shader to apply FXAA
var PostprocessfragmentshaderInverse = `#version 330
uniform sampler2D tex;
uniform vec2 resolution;
uniform float time;
in vec2 uv;
layout (location=0) out vec4 outputColor;
void main(){
outputColor=1-texture(tex,uv);
}
` + "\x00"
Sample post process shader to inverse colors
var PostprocessfragmentshaderNormalvisual = `#version 330
uniform sampler2D tex;
uniform vec2 resolution;
uniform float time;
in vec2 uv;
layout (location=0) out vec4 outputColor;
void main(){
outputColor=texture(tex,uv);
}
` + "\x00"
Sample post process shader to visualise normals
var PostprocessfragmentshaderNothing = `#version 330
uniform sampler2D tex;
uniform vec2 resolution;
uniform float time;
in vec2 uv;
layout (location=0) out vec4 outputColor;
void main(){
outputColor=texture(tex,uv);
}
` + "\x00"
Sample post process shader to just blit the texture (could use texture blit as well)
var PostprocessfragmentshaderViewdepth = `#version 330
uniform sampler2D tex;
uniform vec2 resolution;
uniform float time;
in vec2 uv;
layout (location=0) out vec4 outputColor;
float LinearizeDepth(float z){
float n = 0.1;
float f = 5;
return (2.0 * n) / (f + n-z*(f-n));
}
void main(){
float depth = texture(tex,uv).r;
outputColor=vec4(vec3(depth),1);
}
` + "\x00"
Sample post process shader to visualise depth (works differently on my mac and gnu+linux, weird)
var PostprocessfragmentshaderWobbly = `#version 330
uniform sampler2D tex;
uniform vec2 resolution;
uniform float time;
in vec2 uv;
layout (location=0) out vec4 outputColor;
void main() {
vec2 coord = uv;
coord.y = coord.y+sin(coord.y*100)/200;
coord.x = coord.x+cos(coord.x*100)/200;
outputColor = texture(tex, coord);
}
` + "\x00"
Sample post process shader to make the texture all wavy
Functions ¶
func CreateWindow ¶
CreateWindow creates a new glfw window. If fullscreen will place the screen on primary monitor.
func D ¶
func D(x ...interface{})
D is simply a alias to log.Println(... interface{}). Helps to debug without having to import "log" all the time.
func Fstri ¶
func Fstri()
Fstri draws a fullscreen triangle such that it covers the entire screen with uv coordinates from [0,0]-[1,1]
func GenDepthTexture ¶
GenDepthTexture is a utility function to generate a depth Texture2D
func GenRGBTexture2D ¶
GenRGBTexture2D is a utility function to generate an empty 2D textures of size (width,height), internal format RGB adn data type UNSIGNED_BYTE
func GetOpenglVersion ¶
func GetOpenglVersion() string
GetOpenglVersion will return the current OpenGL version.
func InitPostProcessSystem ¶
func InitPostProcessSystem()
InitPostProcessSystem will allocate all the resources required to make the Image Post Processing system work.
func MustNotGLError ¶
func MustNotGLError()
MustNotGLError will check opengl for error and panic if one was generated
func NewProgram ¶
NewProgram will create an OpenGL program from the given shaders, any combinations can be used.
func QueryExtentions ¶
func QueryExtentions()
QueryExtentions will grab every extension currently loaded and populate lux.Extensions.
func SaveTexture2D ¶
SaveTexture2D take a Texture2D and a filename and saves it as a png image.
func SetContext ¶
func SetContext()
SetContext will set a OpenGL core 3.3 context with foward compatibility and debug context
func StartHeadless ¶
StartHeadless will initialize everything but wont actually create a window, so you can test your application.
func ViewportChange ¶
func ViewportChange(width, height int32)
ViewportChange is an alias to glViewport(0, 0, width, height)
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
Agent is the handle to control a tickable agent.
type AgentManager ¶
type AgentManager struct {
// contains filtered or unexported fields
}
AgentManager is a struct to manage and synchronize all the Agents.
func NewAgentManager ¶
func NewAgentManager() *AgentManager
NewAgentManager create an AgentManager and initialize all required values.
func (*AgentManager) AgentCount ¶
func (am *AgentManager) AgentCount() int
AgentCount return the number of active agent.
func (*AgentManager) NewAgent ¶
func (am *AgentManager) NewAgent(callback func() bool) *Agent
NewAgent starts a goroutine that will run callback every frame until it returns false, it will then die.
func (*AgentManager) Tick ¶
func (am *AgentManager) Tick()
Tick will notify every agent that they need to execute their callback.
type AggregateFB ¶
type AggregateFB struct {
DiffUni, NormalUni, PosUni, DepthUni gl2.UniformLocation
Out gl2.Texture2D
// contains filtered or unexported fields
}
AggregateFB is the FBO used to aggregate all the textures that the geometry shader built.
type AssetManager ¶
type AssetManager struct { Models map[string]Mesh Textures map[string]gl.Texture2D Programs map[string]gl.Program // contains filtered or unexported fields }
AssetManager keeps track of loaded textures, models and programs
func NewAssetManager ¶
func NewAssetManager(root, models, shaders, textures string) (out AssetManager)
NewAssetManager makes a new asset manager
-root: the root of all the other folders. eg. "assets" -models: location of models. eg. "models", located at "assets/models" -shaders: location of shaders. Not really used right now becasue everything is hard coded :\. eg. "shaders", located at "assets/shaders" -textures: location of texture. eg. "textures", located at "assets/textures"
func (*AssetManager) LoadModel ¶
func (am *AssetManager) LoadModel(name, iname string)
LoadModel loads a single model. Only wavefront available for now. iname is the internal name to be set in the map.
func (*AssetManager) LoadRenderProgram ¶
func (am *AssetManager) LoadRenderProgram(vertexShader, fragmentShader, iname string)
LoadRenderProgram is supose to load a render program, althouhg with the geometry buffer takes care of most of it. Do not use.
func (*AssetManager) LoadTexture ¶
func (am *AssetManager) LoadTexture(name, iname string)
LoadTexture Load an image as a texture2D. iname is the internal name to be set in the map.
type Camera ¶
Camera contains a view and projection matrix.
func (*Camera) SetOrtho ¶
SetOrtho sets the projection of this camera to an orthographic projection.
func (*Camera) SetPerspective ¶
SetPerspective sets the projection of this camera to a perspective projection.
type DirectionalLight ¶
type DirectionalLight struct {
Dx, Dy, Dz, R, G, B float32
}
DirectionalLight represent sources like the sun. Actually pretty much only the sun.
func (*DirectionalLight) CastsShadow ¶
func (dl *DirectionalLight) CastsShadow(cast bool)
CastsShadow is a placeholder, dont call it will panic.
func (*DirectionalLight) SetColor ¶
func (dl *DirectionalLight) SetColor(r, g, b float32)
SetColor sets this spotlight color.
func (*DirectionalLight) Upload ¶
func (dl *DirectionalLight) Upload(u gl.UniformLocation)
Upload is a placeholder, dont call it will panic.
type GBuffer ¶
type GBuffer struct {
PUni, VUni, MUni, NUni, MVPUni, DiffuseUni gl2.UniformLocation
AlbedoTex, NormalTex, PositionTex, DepthTex gl2.Texture2D
AggregateFramebuffer AggregateFB
LightAcc LightAccumulator
// contains filtered or unexported fields
}
GBuffer is lux implementation of a geometry buffer for defered rendering
func NewGBuffer ¶
NewGBuffer will create a new geometry buffer and allocate all the resources required
func (*GBuffer) Aggregate ¶
func (gb *GBuffer) Aggregate()
Aggregate performs the lighting calculation per pixel. This is essentially a special post process pass.
func (*GBuffer) Render ¶
Render will render the mesh in the different textures. No lighting calculation is performed here.
func (*GBuffer) RenderLight ¶
func (gb *GBuffer) RenderLight(cam *Camera, light *PointLight, shadowmat glm.Mat4, tex gl2.Texture2D, roughness, F0, Kd float32)
RenderLight calculates the cook-torrance shader and accumulates its intensity in the geometry buffer.
type Light ¶
type Light interface { SetColor(float32, float32, float32) Upload(gl.UniformLocation) CastsShadow(bool) }
Light is the interface that group all the common light operations.
type LightAccumulator ¶
type LightAccumulator struct {
AlbedoUni, NormalUni, PosUni, DepthUni gl2.UniformLocation
Out gl2.Texture2D
CookRoughnessValue, CookF0, CookK gl2.UniformLocation
PointLightPosUni gl2.UniformLocation
CamPosUni gl2.UniformLocation
ShadowMapUni, ShadowMatUni gl2.UniformLocation
// contains filtered or unexported fields
}
LightAccumulator takes all the lights and accumulates their effect in a gbuffer
type Mesh ¶
type Mesh interface { Bind() Delete() Size() int32 DrawCall() }
Mesh is an interface to represent any renderable mesh
func NewVUNModel ¶
func NewVUNModel(indices []uint16, indexedVertices []glm.Vec3, indexedUvs []glm.Vec2, indexedNormals []glm.Vec3) Mesh
NewVUNModel process and uploads the data to the GPU.
func NewVUNModelGlm ¶
func NewVUNModelGlm(indices []uint16, indexedVertices []glm.Vec3, indexedUvs []glm.Vec2, indexedNormals []glm.Vec3) Mesh
NewVUNModelGlm process and uploads the data to the GPU.
func NewWavefrontModelFromFile ¶
NewWavefrontModelFromFile loads a wavefront from the given file. Can only load files that are triangulated and with UV. Does not do anythign with material property.
type Node ¶
type Node struct { Transform // contains filtered or unexported fields }
Node is a single item in a scene tree. It may just contain more children or it may be a model.
func (*Node) AttachChildren ¶
func (n *Node) AttachChildren()
AttachChildren attaches a children to this node
func (*Node) QuatRotate ¶
QuatRotate add the rotation represented by this (angle,quat) to the current transform.
func (*Node) Scale ¶
Scale add a scaling operation to the currently stored transform. I do not allow non-uniform scaling to prevent ending up with matrices without an inverse.
func (*Node) SetQuatRotate ¶
SetQuatRotate will reset this transform to represent the rotation represented by this (angle,quat).
func (*Node) SetScale ¶
SetScale reset this transform to represent only the scaling transform of `amount` I do not allow non-uniform scaling to prevent ending up with matrices without an inverse.
func (*Node) SetTranslate ¶
SetTranslate reset this transform to represent only the translation transform given by (x,y,z).
type ParticleSystem ¶
type ParticleSystem struct {
// contains filtered or unexported fields
}
ParticleSystem is a particle system, it generates tiny points in space and renders them
func NewParticleSystem ¶
func NewParticleSystem(position, direction glm.Vec3, size int) *ParticleSystem
NewParticleSystem builds a particle system
type PointLight ¶
type PointLight struct {
X, Y, Z, R, G, B float32
}
PointLight is a simple point light with colors.
func (*PointLight) CastsShadow ¶
func (pl *PointLight) CastsShadow(cast bool)
CastsShadow is a placeholder, dont call it will panic.
func (*PointLight) Move ¶
func (pl *PointLight) Move(x, y, z float32)
Move sets the point light position to (x,y,z).
func (*PointLight) SetColor ¶
func (pl *PointLight) SetColor(r, g, b float32)
SetColor sets this point light color.
func (*PointLight) Upload ¶
func (pl *PointLight) Upload(u gl.UniformLocation)
Upload is a placeholder, dont call it will panic.
type PostProcessFramebuffer ¶
type PostProcessFramebuffer struct { Fb gl2.Framebuffer Tex gl2.Texture2D Prog gl2.Program // contains filtered or unexported fields }
PostProcessFramebuffer is the generic post process framebuffer
func NewPostProcessFramebuffer ¶
func NewPostProcessFramebuffer(width, height int32, fragmentSource string) (*PostProcessFramebuffer, error)
NewPostProcessFramebuffer creates a new PostProcessFramebuffer and allocated all the ressources. You do not control the vertex shader but you can give a fragment shader. The fragment shader must have the following uniforms:
-resolution: float vec2, representing the size of the texture -time: float, glfw time since the begining of the program -tex: sampler2D, the input texture to this post process pass
func (*PostProcessFramebuffer) Delete ¶
func (ppfb *PostProcessFramebuffer) Delete()
Delete releases all the resources allocated to this post process fbo.
func (*PostProcessFramebuffer) PostRender ¶
func (ppfb *PostProcessFramebuffer) PostRender()
PostRender renable depth test
func (*PostProcessFramebuffer) PreRender ¶
func (ppfb *PostProcessFramebuffer) PreRender()
PreRender binds either the next post process fbo if there is one or unbinds any fbo to render to screen. Also disable depth test.
func (*PostProcessFramebuffer) Render ¶
func (ppfb *PostProcessFramebuffer) Render(t gl2.Texture2D)
Render takes a texture and feed it to the fragment shader as a fullscreen texture. It will call the next post process pass if there is one.
func (*PostProcessFramebuffer) SetNext ¶
func (ppfb *PostProcessFramebuffer) SetNext(n PostProcessFramebufferer)
SetNext sets the post process effect to pass automatically after this post process.
type PostProcessFramebufferer ¶
type PostProcessFramebufferer interface { PreRender() Render(gl2.Texture2D) SetNext(PostProcessFramebufferer) }
PostProcessFramebufferer is an interface to represent a single PostProcess effect.
type RenderProgram ¶
type RenderProgram struct { Prog gl.Program M, V, P, Diffuse, Light, N, Eye gl.UniformLocation }
RenderProgram is the lux representation of a OpenGL program vertex-fragment along with all the common uniforms.
func LoadProgram ¶
func LoadProgram(vertexfile, fragfile string) (out RenderProgram, err error)
LoadProgram loads a vertex-fragment program and gathers: "M": model matrix uniform "V": view matrix uniform "P": projection matrix uniform "N": normal matrix uniform "diffuse":diffuse texture sampler2d "pointlight":array of vec3 for light position
func (*RenderProgram) Delete ¶
func (rp *RenderProgram) Delete()
Delete releases all resources held by this program object
type SceneGraph ¶
type SceneGraph struct {
// contains filtered or unexported fields
}
SceneGraph is a graph for a scene.
type Shader ¶
Shader represent an OpenGL shader object along with its type.
func CompileShader ¶
CompileShader will take the shader source and generate a shader object based on which type you give it. Returns an error if it fails.
type ShadowCubeFBO ¶
type ShadowCubeFBO struct {
// contains filtered or unexported fields
}
ShadowCubeFBO is a packed framebuffer and cubemap with depth only for shadows.
func NewShadowCubeFBO ¶
func NewShadowCubeFBO(width, height int32) *ShadowCubeFBO
NewShadowCubeFBO makes a new ShadowCubeFBO.
type ShadowFBO ¶
type ShadowFBO struct {
// contains filtered or unexported fields
}
ShadowFBO is the structure to hold all the resources required to render shadow maps.
func NewShadowFBO ¶
NewShadowFBO will create a new FBO, a new depth texture and the program needed to generate shadow map currently not optimized, we should probably reuse the FBO and absolutely reuse the program.
func (*ShadowFBO) BindForDrawing ¶
func (sfbo *ShadowFBO) BindForDrawing()
BindForDrawing binds this fbo, change face culling for back face, start using the shadow program, calculate projection and clears the texture.
func (*ShadowFBO) Delete ¶
func (sfbo *ShadowFBO) Delete()
Delete will clean up all the resources allocated to this FBO.
func (*ShadowFBO) LookAt ¶
LookAt sets the view matrix to look at (tx,ty,tz) from (ex,ey,ez), the up direction is always (0,1,0).
func (*ShadowFBO) Render ¶
Render takes a mesh and a transform and render them, adding them to the depth texture data.
type SpotLight ¶
type SpotLight struct {
X, Y, Z, Tx, Ty, Tz, A, R, G, B float32
}
SpotLight are similar to PointLight except they have an angle
func (*SpotLight) CastsShadow ¶
CastsShadow is a placeholder, dont call it will panic.
func (*SpotLight) Upload ¶
func (sl *SpotLight) Upload(u gl.UniformLocation)
Upload is a placeholder, dont call it will panic.
type Transform ¶
Transform represent a single local-to-world transformation matrix. It might be upgraded to be used in a tree. (parent-child relation)
func (*Transform) Iden ¶
func (t *Transform) Iden()
Iden set this transform to the identity 4x4 matrix
func (*Transform) Mat4 ¶
Mat4 returns the mathgl 4x4 matrix that represents this transform local-to-world transformation matrix.
func (*Transform) QuatRotate ¶
QuatRotate add the rotation represented by this (angle,quat) to the current transform.
func (*Transform) SetQuatRotate ¶
SetQuatRotate will reset this transform to represent the rotation represented by this (angle,quat).
func (*Transform) SetScale ¶
SetScale reset this transform to represent only the scaling transform of `amount`
func (*Transform) SetTranslate ¶
SetTranslate reset this transform to represent only the translation transform given by (x,y,z).
type VUNMesh ¶
type VUNMesh struct { VAO gl2.VertexArray Indices, Positions, Uvs, Normals gl2.Buffer Msize int32 }
VUNMesh is a Vertex-Uv-Normal mesh
func (*VUNMesh) Bind ¶
func (m *VUNMesh) Bind()
Bind the vertex array and all vertex attrib required to render this mesh.
func (VUNMesh) Delete ¶
func (m VUNMesh) Delete()
Delete all allocated resources (buffers, vertexarray,etc).
Source Files ¶
- Application.go
- AssetManager.go
- TextureUtils.go
- agents.go
- camera.go
- depthtexture.go
- doc.go
- engine.go
- gbuffer.go
- gbuffer_shaders.go
- glinfo.go
- hardcoded.go
- imagesaver.go
- light.go
- models.go
- particlesystems.go
- postprocess.go
- quicklog.go
- renderingutils.go
- scene.go
- shaders.go
- shadowcubefbo.go
- shadowfbo.go
- transform.go
- utils.go