Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  [SOLVE] [CgFx] Load effect error  (Read 637 times)
0 Members and 2 Guests are viewing this topic.
Offline Trevidos

JGO n00b
*

Posts: 12



« on: 2006-01-26 07:26:40 »

Hi,

I'm trying to load effect from a simple cgFx file.
This is my code :
1  
2  
3  
4  
5  
       CGcontext context = CgGL.cgCreateContext();
      CGeffect cgeffect = CgGL.cgCreateEffectFromFile(context, file, null);
      int error = CgGL.cgGetError();
      String str= CgGL.cgGetErrorString(error);
      System.out.println(str);


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.
Offline Ken Russell

JGO Kernel
*****

Posts: 3446
Medals: 3


Java games rock!


« Reply #1 on: 2006-01-29 00:16:02 »

Thanks for finding this. I've upgraded JOGL's Cg header files to the current 1.4 rc1-4 which include cgGLRegisterStates. This should show up in the nightly builds within a few days.
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.087 seconds with 20 queries.