I'm trying to load effect from a simple cgFx file.
This is my code :
CGcontext context = CgGL.cgCreateContext();
CGeffect cgeffect = CgGL.cgCreateEffectFromFile(context, file, null);
int error = CgGL.cgGetError();
String str= CgGL.cgGetErrorString(error);
File is a String pointing to a correct cgFx file. The return of the function cgCreateEffectFromFile is always null and the report error is "CG ERROR : The compile returned an error."
I'll try to compile the cgFx file using cgc and everything is ok.
I'll try to put this code inside and outside the jogl GLEventListener init function but the result is the same.
I need your help... I don't understand what's wrong...
edit: I found a reference to a cg function (cgGLRegisterStates(context)) that is not bind in jogl. Did the call to this function is already made when I create a context?
solve: that's it. The function cgGLRegisterStates is missing. I've had it inside my own jogl repositorie and everything works kown.