Hi Shuiying

2) geometry shader. You can create one with osg::Shader* sh = new 
osg::Shader(osg::Shader::GEOMETRY)
usage same as with other osg shaders in cpp code
3) If they are supported by your opengl implementation:
a) you should use declaration of shader version where they are supported with  
"#version 400" (iirc this is first version with double support in gl core) in 
your shaders (must be first line on some platforms) 
OR
b) you should enable extension GL_ARB_gpu_shader_fp64 which enables double's 
support in glsl with "#extension GL_ARB_gpu_shader_fp64 : enable"

Cant say anything about 1st question.

Cheers

12.01.2012, 22:14, "wang shuiying" <shuiying.w...@fu-berlin.de>:
> Hi,
>
> Thank you all a lot for your help. That really helps me a lot.
>
> Now I know that polygon triangulation and rasterization algorithms have
> something to do with the imperfectness of my programm.
>
> I have some other questions:
>
> (1)
> According to triangle raterization function (3.9), p185 in
>
> http://www.opengl.org/registry/doc/glspec42.core.20110808.pdf
>
>    if the eye direction of  osg camera is on the same line with the
> polygon normal vector,  there would be less distortion in the generated
> fragment attributes (in my case, the eyecoord position corresponding to
> each fragement) than if they are not on the same line.
>
> Is the conclusion I said above  right?
>
> (2)
> in
>
> http://www.opengl.org/registry/doc/glspec42.core.20110808.pdf
>
> on P.7, there is a geometry processor, which is notated as a Programmable 
> unit. Is it possible to use this programmable unit as the way vertex and 
> fragment shader are used in open scene graph?
>
> (3)
> also in
>
> http://www.opengl.org/registry/doc/glspec42.core.20110808.pdf
> on P.19, it is said that the variable type include double. But when I change 
> float into double in my shader, the programme doesn't work. Why? It is not 
> possible to use double type in Open scene graph?
>
> Thank you in advance!
>
> Shuiying
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to