コード例 #1
0
ファイル: NVPTextBox.cpp プロジェクト: llenroc/Cinder-NVP
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;
}
コード例 #2
0
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathStencilDepthOffsetNV(JNIEnv *env, jclass clazz, jfloat factor, jint units, jlong function_pointer) {
	glPathStencilDepthOffsetNVPROC glPathStencilDepthOffsetNV = (glPathStencilDepthOffsetNVPROC)((intptr_t)function_pointer);
	glPathStencilDepthOffsetNV(factor, units);
}