Hi Sebastian,
SMesserschmidt wrote:
1. Is the shader really set to the correct state set? Try some simple
non-geometry shader to see if it is working in general.
I commented line 29 in the .cpp file that adds the geometry shader to the
program, and a red point was displayed in the centre of
Most likely your geometry shader is broken.
I can try to check it using your code later this afternoon (CET).
Cheers
Sebastian
Hi Sebastian,
SMesserschmidt wrote:
1. Is the shader really set to the correct state set? Try some simple
non-geometry shader to see if it is working in general.
I
Hi Ahmed,
One thing which is definitely an error:
You are never setting the type of the shaders.
e.g. in your createProgram you should do:
vertexShader-setType(osg::Shader::VERTEX);
geometryShader-setType(osg::Shader::GEOMETRY);
fragmentShader-setType(osg::Shader::FRAGMENT);
Hi
Hi Sebastian,
SMesserschmidt wrote:
One thing which is definitely an error:
You are never setting the type of the shaders.
Thank your for pointing that out but I'm sure that's not the problem. I'm using
osgDB::readShaderFile to load the shaders sources from disk. The function uses
Hi Sebastian,
SMesserschmidt wrote:
One thing which is definitely an error:
You are never setting the type of the shaders.
Thank your for pointing that out but I'm sure that's not the problem. I'm using
osgDB::readShaderFile to load the shaders sources from disk. The function uses
Hi Ahmed,
Since your fragment is not executed (your point should be at least red)
there might be 2 ways to inspect.
1. Is the shader really set to the correct state set? Try some simple
non-geometry shader to see if it is working in general.
2. Are there errors when using the shader? Some
Hi,
I'm trying to generate a cube using GLSL shaders. The basic idea is to pass a
single vertex that represents the center of the cube, and let the geometry
shader do the calculations. No luck so far, the only output I get is a single
white pixel (point) in the center of the screen. C++/GLSL
CPP file:
Code:
#include osgDB/ReadFile
#include osgViewer/Viewer
struct ModelViewProjectionMatrixCallback : public osg::Uniform::Callback {
ModelViewProjectionMatrixCallback(osg::Camera *fCamera) :
_camera(fCamera) {
}
virtual void operator()(osg::Uniform *uniform,
8 matches
Mail list logo