/* void glObjectLabelKHR ( GLenum identifier, GLuint name, GLsizei length, const GLchar *label ) */
static void
android_glObjectLabelKHR__IIILjava_lang_String_2
  (JNIEnv *_env, jobject _this, jint identifier, jint name, jint length, jstring label) {
    jint _exception = 0;
    const char * _exceptionType = NULL;
    const char * _exceptionMessage = NULL;
    const char* _nativelabel = 0;

    if (!label) {
        _exception = 1;
        _exceptionType = "java/lang/IllegalArgumentException";
        _exceptionMessage = "label == null";
        goto exit;
    }
    _nativelabel = _env->GetStringUTFChars(label, 0);

    glObjectLabelKHR(
        (GLenum)identifier,
        (GLuint)name,
        (GLsizei)length,
        (GLchar *)_nativelabel
    );

exit:
    if (_nativelabel) {
        _env->ReleaseStringUTFChars(label, _nativelabel);
    }

    if (_exception) {
        jniThrowException(_env, _exceptionType, _exceptionMessage);
    }
}
Beispiel #2
0
void AbstractObject::labelImplementationKhr(const GLenum identifier, const GLuint name, const Containers::ArrayView<const char> label) {
    #ifndef MAGNUM_TARGET_GLES
    glObjectLabel(identifier, name, label.size(), label);
    #elif !defined(CORRADE_TARGET_NACL)
    glObjectLabelKHR(identifier, name, label.size(), label);
    #else
    static_cast<void>(identifier);
    static_cast<void>(name);
    static_cast<void>(label);
    CORRADE_ASSERT_UNREACHABLE();
    #endif
}