Skip to main content
GameDev.net gamedev.net
🔒 Locked

Setting CGFX context variable

Started by dustamulet Aug 7, 2006 at 12:09 AM 0 replies 350+ views
Original Post
dustamulet
dustamulet
Hi, I was wondering if there is a function to set variables in a cgfx file that are associated with the same context. For example if these two cgfx files are associated with the same context: effect1.cgfx:

float4x4  ModelViewProjection;
...

effect2.cgfx:

float4x4  ModelViewProjection;
...

is it possible to make a call like cgSetNamedParameter( context, "ModelViewProjection", &modelViewProj ); so that for all effects with the variable "ModelViewProjection", it is set to modelViewProj? Thanks :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.