From 48ddb6b6b6d4bc596e269d6b049e7f04852ba20f Mon Sep 17 00:00:00 2001 From: Antonis Geralis Date: Thu, 24 Oct 2024 19:47:34 +0300 Subject: [PATCH] review --- src/raylib.nim | 3 +-- src/rlgl.nim | 4 +--- wrapper/builder.nim | 1 - wrapper/config/rlgl.cfg | 4 ++++ wrapper/snippets/raylib_header.nim | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/raylib.nim b/src/raylib.nim index bf78afc..70a3408 100644 --- a/src/raylib.nim +++ b/src/raylib.nim @@ -128,7 +128,7 @@ const # Taken from raylib/src/config.h MaxShaderLocations* = 32 ## Maximum number of shader locations supported MaxMaterialMaps* = 12 ## Maximum number of shader maps supported - MaxMeshVertexBuffers* = 7 ## Maximum vertex buffers (VBO) per mesh + MaxMeshVertexBuffers* = 9 ## Maximum vertex buffers (VBO) per mesh type ConfigFlags* {.size: sizeof(int32).} = enum ## System/Window config flags @@ -2439,7 +2439,6 @@ proc exportWaveAsCode*(wave: Wave, fileName: string): bool = ## Export wave sample data to code (.h), returns true on success exportWaveAsCodeImpl(wave, fileName.cstring) - type RaylibError* = object of CatchableError diff --git a/src/rlgl.nim b/src/rlgl.nim index 6588572..64caa77 100644 --- a/src/rlgl.nim +++ b/src/rlgl.nim @@ -401,8 +401,7 @@ proc getShaderLocsDefault*(): ShaderLocsPtr {.importc: "rlGetShaderLocsDefault", ## Get default shader locations proc loadRenderBatch*(numBuffers: int32, bufferElements: int32): RenderBatch {.importc: "rlLoadRenderBatch", sideEffect.} ## Load a render batch system -proc unloadRenderBatch*(batch: RenderBatch) {.importc: "rlUnloadRenderBatch", sideEffect.} - ## Unload render batch system +proc unloadRenderBatch(batch: RenderBatch) {.importc: "rlUnloadRenderBatch", sideEffect.} proc drawRenderBatch*(batch: var RenderBatch) {.importc: "rlDrawRenderBatch", sideEffect.} ## Draw render batch data (Update->Draw->Reset) proc setRenderBatchActive*(batch: var RenderBatch) {.importc: "rlSetRenderBatchActive", sideEffect.} @@ -548,7 +547,6 @@ proc getLocationAttrib*(shaderId: uint32, attribName: string): ShaderLocation = ## Get shader location attribute getLocationAttribImpl(shaderId, attribName.cstring) - proc `=destroy`*(x: RenderBatch) = unloadRenderBatch(x) proc `=dup`*(source: RenderBatch): RenderBatch {.error.} diff --git a/wrapper/builder.nim b/wrapper/builder.nim index e36d28f..559cb10 100644 --- a/wrapper/builder.nim +++ b/wrapper/builder.nim @@ -266,5 +266,4 @@ proc genBindings*(b: var Builder; ctx: ApiContext; for fnc in ctx.funcsToWrap: generateWrappedProc(b, fnc) b.addNL() - b.addNL() b.addRaw moduleEnd diff --git a/wrapper/config/rlgl.cfg b/wrapper/config/rlgl.cfg index c2a761a..a2c82d0 100644 --- a/wrapper/config/rlgl.cfg +++ b/wrapper/config/rlgl.cfg @@ -76,6 +76,10 @@ rlSetBlendFactorsSeparate/glEqAlpha: BlendFuncOrEq rlVertexBuffer/elementCount rlRenderBatch/bufferCount +[ PrivateSymbols ] + +rlUnloadRenderBatch + [ ArrayTypes ] rlVertexBuffer/vertices diff --git a/wrapper/snippets/raylib_header.nim b/wrapper/snippets/raylib_header.nim index e45c9f4..7a32534 100644 --- a/wrapper/snippets/raylib_header.nim +++ b/wrapper/snippets/raylib_header.nim @@ -128,4 +128,4 @@ const # Taken from raylib/src/config.h MaxShaderLocations* = 32 ## Maximum number of shader locations supported MaxMaterialMaps* = 12 ## Maximum number of shader maps supported - MaxMeshVertexBuffers* = 7 ## Maximum vertex buffers (VBO) per mesh + MaxMeshVertexBuffers* = 9 ## Maximum vertex buffers (VBO) per mesh