Exemple #1
0
void NVprPathRendererState::coverDilated(GLenum bbox_id, const float4x4 &mvp, float4 &dilations)
{
    float bbox[4];
    glGetPathParameterfvNV(path, bbox_id, bbox);

    RectBounds bounds(bbox[0], bbox[1], bbox[2], bbox[3]);

    // XXX TODO: dilate the box

    // XXX TODO: get rid of this once the driver returns the correct bbox
    bounds = RectBounds(-1.1, -1.1, 1.1, 1.1).transform(inverse(mvp));

    glBegin(GL_QUADS); {
        glVertex2f(bounds.x, bounds.y);
        glVertex2f(bounds.x, bounds.w);
        glVertex2f(bounds.z, bounds.w);
        glVertex2f(bounds.z, bounds.y);
    } glEnd();
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathParameterfvNV(JNIEnv *env, jclass clazz, jint name, jint param, jlong value, jlong function_pointer) {
	GLfloat *value_address = (GLfloat *)(intptr_t)value;
	glGetPathParameterfvNVPROC glGetPathParameterfvNV = (glGetPathParameterfvNVPROC)((intptr_t)function_pointer);
	glGetPathParameterfvNV(name, param, value_address);
}