MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / GetCroppedLength

Function GetCroppedLength

deps/LLGL/sources/Renderer/OpenGL/GLObjectUtils.cpp:23–29  ·  view source on GitHub ↗

Returns the length of the specified label with a maximum length determined by GL_MAX_LABEL_LENGTH

Source from the content-addressed store, hash-verified

21
22// Returns the length of the specified label with a maximum length determined by GL_MAX_LABEL_LENGTH
23static GLsizei GetCroppedLength(const char* label)
24{
25 const GLint maxLength = GLStateManager::GetCommonLimits().maxLabelLength;
26 const std::size_t actualLength = std::strlen(label);
27 const std::size_t croppedLength = std::min(actualLength, static_cast<std::size_t>(maxLength));
28 return static_cast<GLsizei>(croppedLength);
29}
30
31#endif // /GL_KHR_debug
32

Callers 2

GLSetObjectLabelFunction · 0.85
GLSetObjectPtrLabelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected