kvark's picture

[GL] let GetUniformName() return String

Project:The Open Toolkit library
Category:support request

We are programming in .NET, so why should we bother about char buffer length?
It would be very convenient to have some methods return the value instead of accepting the pointer to it.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture


Status:open» confirmed

Shaders enjoy helper overloads that hide the StringBuilder/char pointer ugliness. We can certainly add similar overloads to GetActive*Name.

the Fiddler's picture


Status:confirmed» fixed

Rev. 2297 now contains GetActiveAttrib, GetActiveUniform, GetActiveUniformName and GetActiveUniformBlockName overloads that return strings.

Note that these overloads allocate memory and shouldn't be used during rendering. This is not typically a problem, as GetActive*() methods tend to be used at load-time. If this is a concern, you can use always cache a StringBuilder and use the old overloads instead.

kvark's picture


Priority:minor» normal
Status:fixed» open

GetActiveUniformName returns garbage: 'Vertex sha'
Looks like a shader info log trimmed by uniform name max length.

the Fiddler's picture


Status:open» closed

Please open new issues for new bugs! Moved here: #1265: New GetActiveUniformName overload returns garbage.