implementation hints to application

Hi

There were some discussions about which part of OpenGL are hardware accelerated and which part is done in software.The purpose of such a discussion is to get hints about the best performance.

I think this problem and other similar ones can be solved by introducing a kind of hint system but instead of the existing application guides implementation the implementation should give hints to the applicaition for example which texture format it should use, how many texture units it should use without haveing negative impact on performance, how many register combiners are usable with full speed …

Because the implementation knows best what is hw accelerated,it could give this information to the application.The application can use this information but is not forced to do so. I could imagine a kind of followiwing system

#define GL_HINT_DONT_CARE 0xabcdef1
#define GL_HINT_HW_ACCEL 0xab12345
#define GL_HINT_MAX_SPEED
#define GL_HINT_MIN_MEMUSAGE
#define GL_HINT_TEXTURE_FORMAT 0x12345678
GLint hint;
GLint retval;
glGetApplicationHintbv(GL_HINT_TEXTURE_FORMAT,&hint);
if(hint==GL_HINT_DONT_CARE)
{
// no hint availablhase, app can use texture format it would like to use
}
else if(hint==GL_HINT_MAX_SPEED)
{
glGetApplicationHintParameteriv(GL_GET_TEXTURE_FORMAT,&retval);
switch(retval)
{
case TEXTURE_FORMAT_3ub:
//setup texture data as unsigned_byte
case TEXTURE_FORMAT_4ui:
//setup texture data as unsigned_int
default:
/…no special handling planned
}
}

in a similar way each extension could add new application hint, if there is the need , or just return don’t care

I think the entry points could be done in a better way but that was the only one i could iamgine.

Bye
ScottManDeath