cgGet*AnnotationValues() missing?

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=“CgUsersManual”]Given an annotation handle, its values may be retrieved through the use of one of the cgGet*AnnotationValues() entry points:

const float *cgGetFloatAnnotationValues(CGannotation, int *nvalues);
const int *cgGetIntAnnotationValues(CGannotation, int *nvalues);
const char *cgGetStringAnnotationValue(CGannotation);
const int *cgGetBooleanAnnotationValues(CGannotation, int *nvalues);

[/quote]
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.

cg-common.cfg


#
# 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

Thanks very much for the response.

bump

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

Thanks

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

Thanks for communicating back.

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.