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  
  cgGet*AnnotationValues() missing?  (Read 1132 times)
0 Members and 1 Guest are viewing this topic.
Offline xinaesthetic

Full Member
**

Posts: 207
Medals: 1



« on: 2009-11-04 13:03:02 »

I'd very much like to be able to do data-driven stuff with Cg shaders, making configurable parameter mappings with ranges read from CgAnnotations in the shader source.

I can iterate the parameters of an effect, and then iterate the annotations of each parameter and get their names and types... but not get the actual annotation values.

Quote from: CgUsersManual
Given an annotation handle, its values may be retrieved through the use of one of the cgGet*AnnotationValues() entry points:
1  
2  
3  
4  
const float *cgGetFloatAnnotationValues(CGannotation, int *nvalues);
const int *cgGetIntAnnotationValues(CGannotation, int *nvalues);
const char *cgGetStringAnnotationValue(CGannotation);
const int *cgGetBooleanAnnotationValues(CGannotation, int *nvalues);


I haven't yet moved on from JOGL 1.1.1 for my main project, but I checked with JOGL-2 and the situation seems to be similar.

Presumably CgGL is implemented by GlueGen... Is there a particular reason these methods are not implemented?  Can I help?  I notice there no mention of these methods in http://download.java.net/media/jogl/builds/archive/jsr-231-2.0-beta10/logs/2009-09-15-win64build.log, while other CgGL methods with similar names are there with warnings about unspecified buffer capacities that I'm sure devs are well aware of.  I've never tried to build JOGL myself, and I'm not totally of-et with the build process.
Offline bienator

JGO Ninja
***

Posts: 632
Medals: 1


OutOfCoffeeException


« Reply #1 on: 2009-11-04 13:31:37 »

cg-common.cfg
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
#
# FIXME!!!!  Ignore these functions for now because bugs in the
# emitter code can't handle them
#
Ignore cgGetBooleanAnnotationValues
Ignore cgGetBoolStateAssignmentValues
Ignore cgGetFloatAnnotationValues
Ignore cgGetFloatStateAssignmentValues
Ignore cgGetIntAnnotationValues
Ignore cgGetIntStateAssignmentValues
Ignore cgGetParameterValues
Ignore cgGetProgramOptions

Wink

Sven is on holidays and I never used cg... can't help you much

Offline xinaesthetic

Full Member
**

Posts: 207
Medals: 1



« Reply #2 on: 2009-11-04 13:56:53 »

Thanks very much for the response.
Games published by our own members! Go get 'em!
Offline amayorga

JGO n00b
*

Posts: 3



« Reply #3 on: 2010-04-21 13:11:25 »

*bump*

I'm wondering if this issue has been/will be fixed.

Thanks
Offline xinaesthetic

Full Member
**

Posts: 207
Medals: 1



« Reply #4 on: 2010-04-21 13:18:57 »

Yeah, I'm still wondering about this.  I was thinking about PMing Sven, but I didn't get 'round to it.
Offline amayorga

JGO n00b
*

Posts: 3



« Reply #5 on: 2010-04-21 13:30:09 »

Thanks for communicating back.
Offline amayorga

JGO n00b
*

Posts: 3



« Reply #6 on: 2010-04-27 10:07:22 »

I was wondering if something similar is happening with cgUpdatePassParameters.  I can't seem to get my program to compile if I try to use it.
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.08 seconds with 21 queries.