Index
Modules:
nagu/color
,
nagu/glfw
,
nagu/mvp_matrix
,
nagu/opengl
,
nagu/position
,
nagu/program
,
nagu/shader
,
nagu/shape
,
nagu/texture
,
nagu/triangle
,
nagu/types/texture
,
nagu/utils
,
nagu/vao
,
nagu/vbo
.
API symbols
`$`:
color: `$`(color: Color): string
position: `$`(pos: Position): string
shape: `$`[V, V3x, V4x: static int](shape: Shape[V, V3x, V4x] | BindedShape[V, V3x, V4x]): string
`*`:
position: `*`(pos: Position; value: float32): Position
position: `*`(pos1, pos2: Position): Position
`+`:
color: `+`(hex: string): Color
position: `+`(pos: Position; value: float32): Position
position: `+`(pos1, pos2: Position): Position
`-`:
position: `-`(pos: Position): Position
position: `-`(pos: Position; value: float32): Position
position: `-`(pos1, pos2: Position): Position
`/`:
position: `/`(pos: Position; value: float32): Position
position: `/`(pos1, pos2: Position): Position
`==`:
position: `==`(pos1, pos2: Position): bool
`=~`:
position: `=~`(pos1, pos2: Position): bool
`[]=`:
program: `[]=`(program: Program | BindedProgram; name: string; matrix4v: array[16, float32])
program: `[]=`(program: Program | BindedProgram; name: string; v1: int)
program: `[]=`[I: static int; T](program: Program | BindedProgram; name: string; data: tuple[vbo: BindedVBO[I, T], size: int])
`[]`:
program: `[]`(program: Program | BindedProgram; name: string): int
`bind`:
program: `bind`(program: var Program): BindedProgram
vao: `bind`(vao: var VAO): BindedVAO
vbo: `bind`[I: static int; T](vbo: var VBO[I, T]): BindedVBO[I, T]
attach:
program: attach(program: Program | var BindedProgram; shader: ShaderObject)
BindedModelMatrixVector:
mvp_matrix: BindedModelMatrixVector
BindedProgram:
program: BindedProgram
BindedShape:
shape: BindedShape
BindedTexture:
texture: BindedTexture
BindedTextureElem:
texture: BindedTextureElem
BindedTextureQuad:
texture: BindedTextureQuad
BindedTextureUV:
texture: BindedTextureUV
BindedTriangle:
triangle: BindedTriangle
BindedVAO:
vao: BindedVAO
BindedVBO:
vbo: BindedVBO
clear:
glfw: clear(context: var NaguContext; color: Color; alpha: float32 = 0.0'f32)
Color:
color: Color
compile:
shader: compile(shader: ShaderObject): ShaderObject
convertGLExpression:
shader: convertGLExpression(kind: ShaderObjectKind): opengl.GLenum
coord:
position: coord(pos: Position): tuple[x, y, z: float32]
data:
vbo: data[I: static int; T](vbo: VBO[I, T] | BindedVBO[I, T]): array[I, T]
data=:
vbo: data=[I: static int; T](vbo: var BindedVBO[I, T]; data: array[I, T])
debugOpenGLStatement:
utils: debugOpenGLStatement(body: untyped): untyped
destroyWindow:
glfw: destroyWindow(context: NaguContext)
draw:
shape: draw[V, V3x, V4x: static int](shape: var BindedShape[V, V3x, V4x]; mode: VAODrawMode)
texture: draw(texture: var BindedTexture)
vao: draw(vao: BindedVAO; count: uint; mode: VAODrawMode)
GLFWDefect:
glfw: GLFWDefect
GLFWInitializeDefect:
glfw: GLFWInitializeDefect
id:
program: id(program: Program | BindedProgram): opengl.GLuint
shader: id(shader: ShaderObject): uint
texture: id(texture: AllTextures): opengl.GLuint
vbo: id[B: static bool; I: static int; T](vbo: VBOObj[B, I, T]): uint
identityMatrix:
program: identityMatrix(): mvpMatrix
index:
program: index(program: Program | BindedProgram; name: string): int
init:
color: init(_: typedesc[Color]; r, g, b: range[0.0 .. 1.0]): Color
mvp_matrix: init[V: static int](_: typedesc[ModelMatrix[V]]): ModelMatrix[V]
position: init(_: typedesc[Position]; x, y, z: float32): Position
program: init(_: typedesc[Program]): Program
shader: init(_: typedesc[ShaderObject]; kind: ShaderObjectKind): ShaderObject
texture: init(_: typedesc[Texture]; id: opengl.GLuint = 0; vao: VAO = nil; quad: TextureQuad = nil; uv: TextureUV = nil; elem: TextureElem = nil; model_matrix: array[4, ModelMatrixVector[16]]; wrapS: TextureWrapParameter = TextureWrapParameter.tInitialValue; wrapT: TextureWrapParameter = TextureWrapParameter.tInitialValue; magFilter: TextureMagFilterParameter = TextureMagFilterParameter.tInitialValue; minFilter: TextureMinFilterParameter = TextureMinFilterParameter.tInitialValue; program: Program = nil): Texture
vao: init(_: typedesc[VAO]): VAO
vbo: init[I: static int; T](_: typedesc[VBO[I, T]]): VBO[I, T]
isWindowOpen:
glfw: isWindowOpen(context: NaguContext): bool
link:
program: link(program: var Program | var BindedProgram)
linked:
program: linked(program: Program | BindedProgram): bool
load:
shader: load(shader: ShaderObject; path: string): ShaderObject
log:
program: log(program: var Program | var BindedProgram): string
shader: log(shader: ShaderObject): string
magFilter:
texture: magFilter(texture: AllTextures): TextureMagFilterParameter
magFilter=:
texture: magFilter=(texture: var BindedTexture; mag_filter_param: TextureMagFilterParameter)
make:
program: make(_: typedesc[Program]; vertex_shader: ShaderObject; fragment_shader: ShaderObject): Program
program: make(_: typedesc[Program]; vertex_shader: ShaderObject; fragment_shader: ShaderObject; attributes: seq[string] = @[]; uniforms: seq[string] = @[]; subroutine_uniforms: seq[(ShaderObjectKind, string)] = @[]): Program
shader: make(_: typedesc[ShaderObject]; kind: ShaderObjectKind; path: string): ShaderObject
shape: make[V, V3x, V4x: static int](_: typedesc[Shape[V, V3x, V4x]]; positions: array[V, Vec3[float32]]; colors: array[V, Vec4[float32]]; vertex_shader_path: string; fragment_shader_path: string): Shape[V, V3x, V4x]
texture: make(_: typedesc[Texture]; position: Position = Position.init(0, 0, 0); vertex_shader_path: string; fragment_shader_path: string): Texture
vao: make(_: typedesc[VAO]): VAO
map:
position: map(pos: Position; fn: float32 -> float32): Position
position: map(pos1, pos2: Position; fn: (float32, float32) -> float32): Position
minFilter:
texture: minFilter(texture: AllTextures): TextureMinFilterParameter
minFilter=:
texture: minFilter=(texture: var BindedTexture; min_filter_param: TextureMinFilterParameter)
ModelMatrix:
mvp_matrix: ModelMatrix
ModelMatrixVector:
mvp_matrix: ModelMatrixVector
mvpMatrix:
program: mvpMatrix
NaguContext:
glfw: NaguContext
NaguContextObj:
glfw: NaguContextObj
OpenGLDefect:
opengl: OpenGLDefect
OpenGLInitializeDefect:
glfw: OpenGLInitializeDefect
pixels=:
texture: pixels=[W, H: static[int]; T](texture: var BindedTexture; data: array[H, array[W, array[4, T]]])
texture: pixels=(texture: var BindedTexture; img: tuple[data: seq[uint8], width: int, height: int])
texture: pixels=(texture: var BindedTexture; width, height: uint; data: pointer)
pollEventsAndSwapBuffers:
glfw: pollEventsAndSwapBuffers(context: NaguContext)
Position:
position: Position
Program:
program: Program
ProgramCreationDefect:
program: ProgramCreationDefect
ProgramDefect:
program: ProgramDefect
ProgramLinkingDefect:
program: ProgramLinkingDefect
ProgramNotExistsActiveSubroutineUniformDefect:
program: ProgramNotExistsActiveSubroutineUniformDefect
ProgramNotExistsActiveUniformDefect:
program: ProgramNotExistsActiveUniformDefect
ProgramVariableKind:
program: ProgramVariableKind
pvkAttrib:
ProgramVariableKind.pvkAttrib
pvkSubroutineUniform:
ProgramVariableKind.pvkSubroutineUniform
pvkUniform:
ProgramVariableKind.pvkUniform
registerAttrib:
program: registerAttrib(program: var Program | var BindedProgram; name: string)
registerSubroutineUniform:
program: registerSubroutineUniform(program: var Program | var BindedProgram; shaderType: ShaderObjectKind; name: string)
registerUniform:
program: registerUniform(program: var Program | var BindedProgram; name: string)
rgb:
color: rgb(color: Color): tuple[r, g, b: float32]
setModelMatrix:
shape: setModelMatrix[V, V3x, V4x: static int](shape: var BindedShape[V, V3x, V4x]; matrix4v: array[16, float32])
texture: setModelMatrix(texture: var BindedTexture; matrix4v: array[16, float32])
texture: setModelMatrix(texture: var BindedTexture; matrix4v: Mat4[float32])
setup:
glfw: setup(width: int32 = 500; height: int32 = 500; title: string = "window"): NaguContext
ShaderCreationDefect:
shader: ShaderCreationDefect
ShaderDefect:
shader: ShaderDefect
ShaderFailedCompilationDefect:
shader: ShaderFailedCompilationDefect
ShaderObject:
shader: ShaderObject
ShaderObjectKind:
shader: ShaderObjectKind
Shape:
shape: Shape
ShapeObj:
shape: ShapeObj
soFragment:
ShaderObjectKind.soFragment
soGeometry:
ShaderObjectKind.soGeometry
soTessControl:
ShaderObjectKind.soTessControl
soTessEvaluation:
ShaderObjectKind.soTessEvaluation
soVertex:
ShaderObjectKind.soVertex
target:
vbo: target[B: static bool; I: static int; T](vbo: VBOObj[B, I, T]): VBOTarget
target=:
vbo: target=[I: static int; T](vbo: var BindedVBO[I, T]; target: VBOTarget)
Texture:
texture: Texture
TextureElem:
texture: TextureElem
TextureMagFilterParameter:
texture: TextureMagFilterParameter
TextureMinFilterParameter:
texture: TextureMinFilterParameter
TextureQuad:
texture: TextureQuad
TextureUV:
texture: TextureUV
TextureWrapParameter:
texture: TextureWrapParameter
toBindedTexture:
texture: toBindedTexture(texture: Texture): BindedTexture
toBindedVBO:
vbo: toBindedVBO[I: static int; T](vbo: VBO[I, T]): BindedVBO[I, T]
toColor:
color: toColor(hex: string): Color
color: toColor(color: tColor): Color
toTexture:
texture: toTexture(texture: BindedTexture): Texture
toVBO:
vbo: toVBO[I: static int; T](vbo: BindedVBO[I, T]): VBO[I, T]
Triangle:
triangle: Triangle
unbind:
program: unbind(program: var BindedProgram): Program
vao: unbind()
vbo: unbind[I: static int; T](vbo: var BindedVBO[I, T]): VBO[I, T]
update:
glfw: update(context: NaguContext; body: untyped)
usage:
vbo: usage[B: static bool; I: static int; T](vbo: VBOObj[B, I, T]): VBOUsage
usage=:
vbo: usage=[I: static int; T](vbo: var BindedVBO[I, T]; usage: VBOUsage)
use:
program: use(program: var Program; procedure: proc (program: var BindedProgram))
shape: use[V, V3x, V4x: static int](shape: var Shape[V, V3x, V4x]; procedure: proc ( shape: var BindedShape[V, V3x, V4x]))
texture: use(texture: var Texture; procedure: proc (texture: var BindedTexture))
vao: use(vao: var VAO; procedure: proc (vao: var BindedVAO))
vbo: use[I: static int; T](vbo: var VBO[I, T]; procedure: proc (vbo: var BindedVBO[I, T]))
useColors:
shape: useColors[V, V3x, V4x: static int](shape: var BindedShape[V, V3x, V4x]; procedure: proc (shape: var BindedShape[V, V3x, V4x]; vbo: var BindedVBO[V4x, float32]))
useElem:
texture: useElem(bindedTexture: var BindedTexture; procedure: proc ( texture: var BindedTexture; vbo: var BindedTextureElem))
useModelMatrix:
texture: useModelMatrix(bindedTexture: var BindedTexture; procedure: proc ( texture: var BindedTexture; vbo: var array[4, BindedModelMatrixVector[16]]))
useModelMatrixVector:
shape: useModelMatrixVector[V, V3x, V4x: static int]( bindedShape: var BindedShape[V, V3x, V4x]; index: range[0 .. 3]; procedure: proc ( shape: var BindedShape[V, V3x, V4x]; vbo: var BindedModelMatrixVector[V4x]))
texture: useModelMatrixVector(bindedTexture: var BindedTexture; index: range[0 .. 3]; procedure: proc (texture: var BindedTexture; vbo: var BindedModelMatrixVector[16]))
usePositions:
shape: usePositions[V, V3x, V4x: static int](shape: var BindedShape[V, V3x, V4x]; procedure: proc (shape: var BindedShape[V, V3x, V4x]; vao: var BindedVAO; vbo: var BindedVBO[V3x, float32]))
shape: usePositions[V, V3x, V4x: static int](shape: var BindedShape[V, V3x, V4x]; procedure: proc (shape: var BindedShape[V, V3x, V4x]; vbo: var BindedVBO[V3x, float32]))
useQuad:
texture: useQuad(bindedTexture: var BindedTexture; procedure: proc ( texture: var BindedTexture; vbo: var BindedTextureQuad))
useUV:
texture: useUV(bindedTexture: var BindedTexture; procedure: proc (texture: var BindedTexture; vbo: var BindedTextureUV))
useVAO:
shape: useVAO[V, V3x, V4x: static int](shape: var BindedShape[V, V3x, V4x]; procedure: proc ( shape: var BindedShape[V, V3x, V4x]; vao: var BindedVAO))
texture: useVAO(bindedTexture: var BindedTexture; procedure: proc (texture: var BindedTexture; vao: var BindedVAO))
VAO:
vao: VAO
VAODrawMode:
vao: VAODrawMode
VBO:
vbo: VBO
VBOTarget:
vbo: VBOTarget
VBOUsage:
vbo: VBOUsage
vdmLineLoop:
VAODrawMode.vdmLineLoop
vdmLines:
VAODrawMode.vdmLines
vdmLinesAdjacency:
VAODrawMode.vdmLinesAdjacency
vdmLineStrip:
VAODrawMode.vdmLineStrip
vdmLineStripAdjancency:
VAODrawMode.vdmLineStripAdjancency
vdmPoints:
VAODrawMode.vdmPoints
vdmTriangleFan:
VAODrawMode.vdmTriangleFan
vdmTriangles:
VAODrawMode.vdmTriangles
vdmTrianglesAdjacency:
VAODrawMode.vdmTrianglesAdjacency
vdmTriangleStrip:
VAODrawMode.vdmTriangleStrip
vdmTriangleStripAdjacency:
VAODrawMode.vdmTriangleStripAdjacency
vtArrayBuffer:
VBOTarget.vtArrayBuffer
vtAtomicCounterBuffer:
VBOTarget.vtAtomicCounterBuffer
vtCopyReadBuffer:
VBOTarget.vtCopyReadBuffer
vtCopyWriteBuffer:
VBOTarget.vtCopyWriteBuffer
vtDispatchIndirectBuffer:
VBOTarget.vtDispatchIndirectBuffer
vtDrawIndirectBuffer:
VBOTarget.vtDrawIndirectBuffer
vtElementArrayBuffer:
VBOTarget.vtElementArrayBuffer
vtPixelPackBuffer:
VBOTarget.vtPixelPackBuffer
vtPixelUnpackBuffer:
VBOTarget.vtPixelUnpackBuffer
vtQueryBuffer:
VBOTarget.vtQueryBuffer
vtShaderStorageBuffer:
VBOTarget.vtShaderStorageBuffer
vtTextureBuffer:
VBOTarget.vtTextureBuffer
vtTransformFeedbackBuffer:
VBOTarget.vtTransformFeedbackBuffer
vtUniformBuffer:
VBOTarget.vtUniformBuffer
vuDynamicCopy:
VBOUsage.vuDynamicCopy
vuDynamicDraw:
VBOUsage.vuDynamicDraw
vuDynamicRead:
VBOUsage.vuDynamicRead
vuStaticCopy:
VBOUsage.vuStaticCopy
vuStaticDraw:
VBOUsage.vuStaticDraw
vuStaticRead:
VBOUsage.vuStaticRead
vuStreamCopy:
VBOUsage.vuStreamCopy
vuStreamDraw:
VBOUsage.vuStreamDraw
vuStreamRead:
VBOUsage.vuStreamRead
WindowCreationDefect:
glfw: WindowCreationDefect
wrapS:
texture: wrapS(texture: AllTextures): TextureWrapParameter
wrapS=:
texture: wrapS=(texture: var BindedTexture; wrap_param: TextureWrapParameter)
wrapT:
texture: wrapT(texture: AllTextures): TextureWrapParameter
wrapT=:
texture: wrapT=(texture: var BindedTexture; wrap_param: TextureWrapParameter)