You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using opengl in Go I have found many places where opengl writes either uint32 or int32 into []int32.
It is slightly annoying but I don't know if we can really do anything about it.
So far for me this has been the worst one https://www.opengl.org/sdk/docs/man/html/glGetActiveUniformsiv.xhtml
The *params parameter returns an array that can be GLint, GLuint or GLenum and since C doesn't care and the type size doesn't change it is acceptable to that world.
Things like this are why I kept the types as basic as possible (uint32 vs Enum for instance).
I am in favor of the named types, they will just require some extra casting every now and then.
Hi,
I noticed that the
Value
field of theAttrib
andUniform
types is of different type -uint
andint32
respectively.http://godoc.org/golang.org/x/mobile/gl#Attrib
http://godoc.org/golang.org/x/mobile/gl#Uniform
According to the documentation, they both should be
uint
.https://www.khronos.org/opengles/sdk/docs/man3/html/glGetAttribLocation.xhtml
https://www.khronos.org/opengles/sdk/docs/man3/html/glGetUniformLocation.xhtml
So I see no sense in them being of different type.
Furthermore, shouldn't the type of
Attrib
be a bit more strictly specified - for exampleuint32
- similar to other ID types in themobile/gl
API?Regards,
Momchil Atanasov
The text was updated successfully, but these errors were encountered: