ikskuh / zig-opengl

OpenGL binding generator based on the opengl registry
European Union Public License 1.2
103 stars 16 forks source link

`Something#ubv`-style functions should not require null-terminated pointers #16

Open jayschwa opened 6 months ago

jayschwa commented 6 months ago

Example: glColor3ubv. It looks like these function parameters are getting null-terminated types due to the following in TranslateC:

if (result == "[*c]const GLubyte")
{
  // assume a string:
  return "?[*:0]const GLubyte";
}

I assume this is for the sake of the return type of glString[i], but I'm not sure where else it would matter, since newer GL functions seem to have switched to GLchar. If it truly only applies to glString[i] then, perhaps it makes sense to remove the special case from TranslateC and instead perform it elsewhere based on the function name.