Fix bug with new nimterop
This commit is contained in:
parent
83fc8d7187
commit
f246054ac6
2 changed files with 6 additions and 1 deletions
|
|
@ -22,6 +22,8 @@ const underscoreReg = re"_(.)"
|
||||||
|
|
||||||
# Symbol renaming examples
|
# Symbol renaming examples
|
||||||
proc onSymbol*(sym: var Symbol) {.exportc, dynlib.} =
|
proc onSymbol*(sym: var Symbol) {.exportc, dynlib.} =
|
||||||
|
if sym.name.startsWith("__"):
|
||||||
|
sym.name = sym.name[2..<sym.name.len]
|
||||||
if sym.name.startsWith("GL_BYTE"):
|
if sym.name.startsWith("GL_BYTE"):
|
||||||
sym.name = "CGL_BYTE"
|
sym.name = "CGL_BYTE"
|
||||||
if sym.name.startsWith("GL_SHORT"):
|
if sym.name.startsWith("GL_SHORT"):
|
||||||
|
|
@ -56,3 +58,6 @@ proc onSymbol*(sym: var Symbol) {.exportc, dynlib.} =
|
||||||
sym.name = sym.name.replace(underscoreReg, camelCase)
|
sym.name = sym.name.replace(underscoreReg, camelCase)
|
||||||
if sym.name == "type":
|
if sym.name == "type":
|
||||||
sym.name = "kind"
|
sym.name = "kind"
|
||||||
|
|
||||||
|
if sym.name.startsWith("GetTransformFeedbacki_v"):
|
||||||
|
sym.name = sym.name & "u"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import os, strutils, strformat
|
import os, strutils, strformat
|
||||||
import nimterop/[cimport, build]
|
import nimterop/[cimport, build, globals]
|
||||||
|
|
||||||
const
|
const
|
||||||
ProjectCacheDir* = getProjectCacheDir("nimglew")
|
ProjectCacheDir* = getProjectCacheDir("nimglew")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue