Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLbyte definition in ARM systems causes problems in GLAbstraction and GLVisualize #39

Closed
vvjn opened this issue Feb 26, 2018 · 1 comment · Fixed by #74
Closed

GLbyte definition in ARM systems causes problems in GLAbstraction and GLVisualize #39

vvjn opened this issue Feb 26, 2018 · 1 comment · Fixed by #74

Comments

@vvjn
Copy link

vvjn commented Feb 26, 2018

So I'm using the Nvidia Jetson TX2 to run GLVisualize and I came across this method ambiguity error when running the following function in GLAbstraction.jl

gluniform(location::Integer, x::Union{GLubyte, GLushort, GLuint}) 	 = glUniform1ui(GLint(location), x)
gluniform(location::Integer, x::Union{GLbyte, GLshort, GLint, Bool}) = glUniform1i(GLint(location),  x)

The ambiguity is at gluniform(::Integer, x::UInt8), since on the Jetson, both GLbyte and GLubyte maps to UInt8.

This is because Cchar (and thus, ModernGL.GLbyte) maps to UInt8 in the Jetson, while in x86 computers, Cchar maps to Int8. I fixed in the Jetson by defining ModernGL.GLbyte as Int8 in the Jetson. Also before fixing this, GLVisualize had issues rendering colors properly, but after this fix, the colors render properly. I'm not completely sure why this is happening, but ModernGL.GLbyte probably needs to be more consistently defined across architectures.

@r3tex
Copy link

r3tex commented Mar 18, 2019

Wow, incredible find! Now we can use Makie on the Jetson TX2 and it's fast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants