mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-17 16:38:33 +00:00
make test compile with latest opengl version
This commit is contained in:
@@ -6,7 +6,7 @@ export
|
||||
opengl
|
||||
|
||||
type
|
||||
EGL* = object of E_Base
|
||||
EGL* = object of Exception
|
||||
EGL_code* = object of EGL
|
||||
code*: EGL_err
|
||||
EGL_err {.pure.} = enum
|
||||
|
||||
@@ -8,7 +8,7 @@ type
|
||||
TShaderType* {.pure.} = enum
|
||||
frag = GL_FRAGMENT_SHADER,
|
||||
vert = GL_VERTEX_SHADER
|
||||
E_Shader* = object of E_Base
|
||||
E_Shader* = object of Exception
|
||||
E_UnknownShaderType* = object of E_Shader
|
||||
|
||||
converter pathToShaderType*(s: string): TShaderType =
|
||||
|
||||
@@ -25,7 +25,7 @@ proc whiteTex*(): TTex =
|
||||
setTexParams()
|
||||
|
||||
var pixel = [255'u8, 255'u8, 255'u8, 255'u8]
|
||||
?glTexImage2D(GLtexture2D, 0, GL_RGBA, 1, 1, 0, GL_BGRA, cGLUnsignedByte, pixel[0].addr)
|
||||
?glTexImage2D(GLtexture2D, 0, GLint GL_RGBA, 1, 1, 0, GL_BGRA, cGLUnsignedByte, pixel[0].addr)
|
||||
?glBindTexture(GLtexture2D, 0)
|
||||
|
||||
result = gWhiteTex
|
||||
|
||||
Reference in New Issue
Block a user