Re: [osg-users] Help: wrong ouput from frag shader

2012-01-18 Thread J.P. Delport
Hi, On 18/01/2012 20:24, wang shuiying wrote: Hi, J.P. the camera isn't rendering to a texture. Yes it is. It is just made for you automatically. FBO renders to a texture and the image is read from this texture when you attach it to the camera. I suggest attaching a texture (to the same buf

Re: [osg-users] osgexport for blender?

2012-01-18 Thread Maia Randria
Hi Cedric, I found on https://github.com/cedricpinson/osgexport/pull/4 a new commit. Is the animation included now and working ? Maia -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44901#44901 ___

Re: [osg-users] osgvolume opacity settings

2012-01-18 Thread Clement.Chu
Change my question. I followed the osgvolume example. I made a bit different to use setImage function. osg::ref_ptr tile = new osgVolume::VolumeTile; osgVolume->addChild(tile.get()); osg::ref_ptr osgImage = new osg::Image; osg::

Re: [osg-users] osgvolume opacity settings

2012-01-18 Thread Robert Osfield
Hi Clement, I really don't know what is going on at your end, what you are expecting, what you've coded, there is no way I can provide any answers. Robert. On 18 January 2012 17:31, wrote: > HI Robert, > >     I replaced the program from coin to osg and I don't know why osg display > the imag

Re: [osg-users] Help: wrong ouput from frag shader

2012-01-18 Thread wang shuiying
Hi, J.P. the camera isn't rendering to a texture. In my programme, camera is set to be prerender, render target is FRAME_BUFFER_OBJECT, I attach the camera to an image, in order to get the bufferdata via image. the image data type is allocated as GL_FLOAT. Related setup details are listed

Re: [osg-users] osgvolume opacity settings

2012-01-18 Thread Clement.Chu
HI Robert, I replaced the program from coin to osg and I don't know why osg display the image from the same volume data is different from coin. I think the problem is on texture format since I changed to use different parameter of texture format such as GL_RGBA, GL_RGB16F_ARB, GL_RGBA8.

Re: [osg-users] osgvolume opacity settings

2012-01-18 Thread Robert Osfield
Hi Clement, I can't work out specifically what you are expecting to happen. What coin does is something I have no experience with so can't comment on how you might try to obtain a similar image. Robert. On 18 January 2012 15:14, wrote: > Hi Robert, > >   Thanks for your reply.  I found the pr

Re: [osg-users] Help: wrong ouput from frag shader.

2012-01-18 Thread Sebastian Messerschmidt
tryFrag_Color = vec4(abs(dist2/100.0),0,0,1) instead of Frag_Color = vec4(abs(dist2/100),0,0,1); Hello, Sebastian There is also another strange problem . When Vertex shader is as follows: varying out vec3 pos; varying out float dist2; void m

Re: [osg-users] Help: wrong ouput from frag shader.

2012-01-18 Thread wang shuiying
Hello, Sebastian There is also another strange problem . When Vertex shader is as follows: varying out vec3 pos; varying out float dist2; void main() { vec3 pos1 = (gl_ModelViewMatrix * (gl_Vertex - vec4(0.0,0.0,0.0,0.0))).xyz;

Re: [osg-users] Help:what is openGl shader version 140?

2012-01-18 Thread wang shuiying
Hello Sebastian, You are right. I have other errors in the shader when such warnings happened. After I correct them, it works normal! Thank you very much for the explanation! Shuiying On 01/18/2012 08:04 AM, Sebastian Messerschmidt wrote: Hello shuiying, either your card doesn't support gl

Re: [osg-users] Help: wrong ouput from frag shader.

2012-01-18 Thread wang shuiying
Hello, Sebastian Thank you for your reply! In my programme, camera is set to be prerender, render target is FRAME_BUFFER_OBJECT, I attach the camera to an image, in order to get the bufferdata via image. (1) the fragment shader is as following: out vec4 Frag_Color; void main() { F

Re: [osg-users] Place axes at corner

2012-01-18 Thread Robert Osfield
Hi Clement, On 18 January 2012 04:21, wrote: >  The example is not quite suitable on my case because my application is > running on MFC window, but I still got some idea from the example to locate > the axes on corner. It doesn't matter whether you are using MFC or the OSG's native windows, o