xDAtelier / BlockCgFX

Load and use .cgfx effect files with your c++ applications. Follows the standards of Cinder framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Block CgFX
------------

Load CgFX effect files easily in to your applications

You will need to install Cg Toolkit from: http://developer.nvidia.com/object/cg_toolkit.html



Example:

V::CGFXManager cgManager;
V::ShaderCGFXRef shader0;

void setup()
{
	cgManager.init();
	shader0 = cgManager.loadEffectFromFile( "data/SSAOgame.cgfx" );
}


void draw()
{
	shader0.enable();
	shader0.setTextureParameter( "DepthSampler", depthTex.getId() );
	shader0.setParameter1f( "foo", 1 );
	shader0.setTechnique( "technique_name" );
	shader0.setPass();
	renderGeometry();
	shader0.resetPass();
	shader0.disable();
}

About

Load and use .cgfx effect files with your c++ applications. Follows the standards of Cinder framework