[GEM-dev] number of geometry with GLSL

Jack jack at rybn.org
Tue Mar 23 05:00:41 CET 2010


Le lundi 22 mars 2010 à 21:19 +0100, cyrille henry a écrit :
> 
> Jack a écrit :
> > Hello,
> > 
> > I am working on this small patch and would like to repeat a geo (square)
> > several times but i am limited to 42 times.
> > Do you know why ?
> 
> it's strange, but i have the same limitation.
> 42 is the answer.
> ;-)
OK :) 
It seems this number depends if i pass the varying variable gl_Color to
the fragment shader, right ?
Because i can draw my square 85 times without this variable in the
fragment shader (gl_FragColor=vec4(1.0,1.0,1.0,1.0) instead of
gl_FragColor=gl_Color).
But what else ? How can i determine this value (42 or 85) with the
specifications of my GPU ?

I thought it would be possible to use shader to draw much more geos with
this method (with an equation in this shader), but i was wrong.
So i have to draw a 'curve' with vertices (with something like [polygon]
or with [GEMglVertex3f]) and then apply a geometry shader ? This is not
very easy if i have 100 vertices to define ! :)
I hope that i miss something.
I will dig tomorrow.
Thanx.
++

Jack


> 
> C
> 
> > Here some infos :
> > 
> > [glsl_geometry]: geometry_shader Hardware Info
> > [glsl_geometry]: ============================
> > [glsl_geometry]: MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT: 2048
> > [glsl_geometry]: MAX_VARYING_FLOATS: 60
> > [glsl_geometry]: MAX_COMBINED_TEXTURE_IMAGE_UNITS: 32
> > [glsl_geometry]: MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT: 32
> > [glsl_geometry]: MAX_TEXTURE_IMAGE_UNITS: 32
> > [glsl_geometry]: MAX_TEXTURE_COORDS: 8
> > [glsl_vertex]: Vertex_shader Hardware Info
> > [glsl_vertex]: ============================
> > [glsl_vertex]: MAX_VERTEX_ATTRIBS: 16
> > [glsl_vertex]: MAX_VERTEX_UNIFORM_COMPONENTS_ARB: 4096
> > [glsl_vertex]: MAX_VARYING_FLOATS: 60
> > [glsl_vertex]: MAX_COMBINED_TEXTURE_IMAGE_UNITS: 32
> > [glsl_vertex]: MAX_VERTEX_TEXTURE_IMAGE_UNITS: 32
> > [glsl_vertex]: MAX_TEXTURE_IMAGE_UNITS: 32
> > [glsl_vertex]: MAX_TEXTURE_COORDS: 8
> > [glsl_fragment]: glsl_fragment Hardware Info
> > [glsl_fragment]: ============================
> > [glsl_fragment]: MAX_FRAGMENT_UNIFORM_COMPONENTS: 2048
> > [glsl_fragment]: MAX_TEXTURE_COORDS: 8
> > [glsl_fragment]: MAX_TEXTURE_IMAGE_UNITS: 32
> > 
> > Thanx.
> > ++
> > 
> > Jack
> > 
> > 
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > _______________________________________________
> > GEM-dev mailing list
> > GEM-dev at iem.at
> > http://lists.puredata.info/listinfo/gem-dev
> 






More information about the GEM-dev mailing list