Hello Andreas,

Andreas Halm wrote:
> Related to that is the question, which is the simplest way to query
> PROGRAM_UNDER_NATIVE_LIMITS_ARB. Currently I have vertex and fragment
> programs in chunks and would like to know if it runs in hardware, ideally
> while initializing which is done in a static method.
> 
> When initializing the window/viewport is already available, although
> currently not routed to the initialization method. So something like manual
> activation would be needed I guess.

hm, the problem is that a ShaderProgramChunk can not be activated, the 
rendering backend transforms those into ShaderExecutableChunk and only 
those can be activated.

Gerrit: any ideas?

> A workaround would be to enable/disable initialization based on the graphics
> card string, but how would I know the limits ... I would have thought an ATI
> X1900 is very well able to write to result.depth.z in hardware, but it looks
> like it is not!

you could query OpenGL constants using win->getConstantValue(). Some of 
them can be viewed with glxinfo -l and on this machine here I get:

GL_VERTEX_PROGRAM_ARB:
         GL_MAX_PROGRAM_INSTRUCTIONS_ARB = 512
         GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 512
         GL_MAX_PROGRAM_TEMPORARIES_ARB = 48
         GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB = 48
         GL_MAX_PROGRAM_PARAMETERS_ARB = 256

and a bunch more, but for all of them the native limit is equal to the 
limit, so if the program compiles/links at all, it should run in 
hardware (this is on an Nvidia Quadro FX 4500).

        Cheers,
                Carsten

------------------------------------------------------------------------------
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to