示例#1
0
NVPTextBox::NVPTextBox() : mInvalid ( true ), mDebugDraw ( false ), mUnderline ( false ), mFontPt ( 12 ), sRGB_capable ( 0 ), hasFramebufferSRGB ( 1 ), emScale ( 2048 ), mFilling ( 1 ), mRegularAspect ( 1 ), mFillGradient ( 1 ), mFillColor ( 1, 1, 1, 1 ), mStrokeColor ( 0.f, 0.f, 0.f, 1 ), mKerningFactor ( 1.f ), mDrawBoundingBox ( false ), mDrawGlyphBounds ( false )
{
	if ( hasFramebufferSRGB ) {
		glGetIntegerv ( GL_FRAMEBUFFER_SRGB_CAPABLE_EXT, &sRGB_capable );

		if ( sRGB_capable ) {
			glEnable ( GL_FRAMEBUFFER_SRGB_EXT );
		}
	}

	//nvidia path specific depth testing params
	GLfloat slope = -0.05f;
	GLfloat bias = -1.0f;
	glPathStencilDepthOffsetNV ( slope, bias );
	glPathCoverDepthFuncNV ( GL_ALWAYS );
	xtranslate = NULL;
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathCoverDepthFuncNV(JNIEnv *env, jclass clazz, jint zfunc, jlong function_pointer) {
	glPathCoverDepthFuncNVPROC glPathCoverDepthFuncNV = (glPathCoverDepthFuncNVPROC)((intptr_t)function_pointer);
	glPathCoverDepthFuncNV(zfunc);
}