Re: [osg-users] Problems with TBO Texture Buffer Object's

2009-11-30 Thread Johannes Schüth
Hi, I'm not quite sure but it seems that http://www.opengl.org/registry/specs/ARB/pixel_buffer_object.txt is something different than: http://www.opengl.org/registry/specs/EXT/texture_buffer_object.txt Although the way of binding the buffer seems initially the same. I just want to use

Re: [osg-users] Problems with TBO Texture Buffer Object's

2009-11-30 Thread Johannes Schüth
Hi, robertosfield wrote: Your GL code segment actually uses PBO's in it... :-) Yep :) I think TBO's use PBO calls because its also a buffer object. Bu of course i use GL_TEXTURE_BUFFER_EXT. robertosfield wrote: Do you have to use PBO's with texture buffer? Or can you just pass the

[osg-users] Problems with TBO Texture Buffer Object's

2009-11-28 Thread Johannes Schüth
Hi, i want to use texture buffer objects within my program. At the beginning i managed to get tbo's to work within a pure opengl application. This is what i did: 1. create tbo Code: // create buffer object glGenBuffers(1, tbo); glBindBuffer(GL_TEXTURE_BUFFER_EXT, *tbo); // initialize

Re: [osg-users] Can't assign more than 7 texture matrices

2009-10-20 Thread Johannes Schüth
Hi, i belive i solved this issue. I had to use: osg::Uniform* uniform = stateSet-getOrCreateUniform(matrices[0], osg::Uniform::FLOAT_MAT4); instead of: osg::Uniform* uniform = stateSet-getOrCreateUniform(matrices,

Re: [osg-users] Can't assign more than 7 texture matrices

2009-10-19 Thread Johannes Schüth
Hi, i thought i could use the buildin variabled to save some uniforms. But i did'nt realize that they were limited. Well.. i tried to use uniform arrays but with very little sucess: I create my Uniform: ref_ptrUniform matrixArrayUniform = new Uniform(Uniform::FLOAT_MAT4,matrices,10);

Re: [osg-users] Can't assign more than 7 texture matrices

2009-10-19 Thread Johannes Schüth
Hi, Wojciech Lewandowski wrote: Hi again Johannes, I hate to say that, ( don't think I enjoy doing it), but it seems to work on NVidia (at least those above GF 8x00) and I am really surprised it does not work for you especially when you have advance gpu supporting GL_EXT_gpu_shader4

[osg-users] Can't assign more than 7 texture matrices

2009-10-18 Thread Johannes Schüth
Hi, i have a small problem. I want to access gl_TextureMatrix[8] within my Shader. As you can see i used a loop to setup 10 texture matrices: Code: for (int i = 0; i 10; i++) { stateSet-setTextureAttributeAndModes(i, texMat,

Re: [osg-users] Can't assign more than 7 texture matrices

2009-10-18 Thread Johannes Schüth
Seems to be another ati related issue. I was able to reproduce this issue with pure opengl. :-\ Any suggestions on how i can handover multiple texture matrices to my shader? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18366#18366

[osg-users] osg::Image SubImage

2009-10-17 Thread Johannes Schüth
Hi, is there a way of getting a subimage from an osg::Image? I only found the option of inserting an image as a portion of a bigger image by using osg::Image::copySubImage. Thank you! Cheers, Johannes -- Read this topic online here:

Re: [osg-users] Texture Wrapping Texture2DArray (Clamping doesn't work)

2009-10-11 Thread Johannes Schüth
Hi, i think i found a workaround that will work for me. I just implemented the clamping in my fragment shader myself :) Code: #extension GL_EXT_gpu_shader4 : enable uniform sampler2DArray base_texture; varying vec2 texCoord; void main() { vec4 borderColor

Re: [osg-users] Texture Wrapping Texture2DArray (Clamping doesn't work)

2009-10-08 Thread Johannes Schüth
Hi, this is definitly no osg issue - i could reproduce it with nativ opengl. Just switch to see the difference. //#define NOARRAY http://www.jotschi.de/download/opengl_texture_array_glsl_example.tgz I will send this to ati / amd though i don't think that will help me in any way. Cheers,

Re: [osg-users] Texture Wrapping Texture2DArray (Clamping doesn't work)

2009-10-07 Thread Johannes Schüth
Hi, amazing news - i do own an ATI 4850 - I will try to update my drivers or consider to swap to another graphics card. Are you able to test this example with an ati card? Were you able to use CLAMP_TO_BORDER too? Thank you! Greetings, Johannes -- Read this topic online here:

Re: [osg-users] Texture Wrapping Texture2DArray (Clamping doesn't work)

2009-10-07 Thread Johannes Schüth
Hi, one more question. Did clamp to border work on nvidia chips? Wojciech Lewandowski wrote: We tested on ATI 4890. Vista 64 bit. Catalyst 9.9. Clamp to edge works. Clamp to border does not. Any idea why clamp to border does not work with ATI 4890? Greetings Johannes --

Re: [osg-users] Texture Wrapping Texture2DArray (Clamping doesn't work)

2009-10-06 Thread Johannes Schüth
No, not yet. But its a good news to hear that you managed to use CLAMP_TO_BORDER - Perhaps this might be a driver problem or maybe there is just a problem with my code. Yes - i use only one texture in the shader - but i have to add two textures to the texture array to make it work. You must add

Re: [osg-users] Texture Wrapping Texture2DArray (Clamping doesn't work)

2009-10-06 Thread Johannes Schüth
Hi, i managed to reproduce the problem. And i even used another much simpler shader. This might tell us that the problem is not located in my shaders. Code: #include osg/Group #include osg/Geode #include osg/ShapeDrawable #include osg/Node #include osgViewer/Viewer #include

Re: [osg-users] Texture Wrapping Texture2DArray (Clamping doesn't work)

2009-10-06 Thread Johannes Schüth
Hi, even if i use st instead of the xy coords: Code: gl_FragColor = texture2DArray(textures, vec3(gl_TexCoord[0].xy*vec2(1.5,1.5), 0)); instead of: Code: gl_FragColor = texture2DArray(textures, vec3(gl_TexCoord[0].st*vec2(1.5,1.5), 0));

Re: [osg-users] Texture Wrapping Texture2DArray (Clamping doesn't work)

2009-10-06 Thread Johannes Schüth
Hi, textureArray-setWrap(osg::Texture::WRAP_S, osg::Texture::MIRROR); textureArray-setWrap(osg::Texture::WRAP_T, osg::Texture::MIRROR); textureArray-setWrap(osg::Texture::WRAP_R, osg::Texture::MIRROR); does work with me. The textures will be mirrored. Thank you! Cheers,

Re: [osg-users] Texture Wrapping Texture2DArray (Clamping doesn't work)

2009-10-06 Thread Johannes Schüth
Hi, i read that clamping is not supported when using s3c texture compression so perhaps the internal format in which the texture2darray is stored affects the clamping behaviour? Thank you! Cheers, Johannes -- Read this topic online here:

Re: [osg-users] Texture Wrapping Texture2DArray (Clamping doesn't work)

2009-10-05 Thread Johannes Schüth
If i had read the specs earlier i would probably also remember the section you mentioned. Are there any other possible issues regarding this problem? Wojciech Lewandowski wrote: Hi Johannes, My apologies, I must have misinterpreted this pragraph of the spec: Otherwise i'm really stuck

[osg-users] Texture Wrapping Texture2DArray (Clamping doesn't work)

2009-10-04 Thread Johannes Schüth
Hi, i have just changed my code to use Texture2DArray instead of texture2D's. I works fine but i have one problem. My texture is not clamped to the border. This is my code: Texture2DArray: Code: osg::Texture2DArray* textureArray = new osg::Texture2DArray;

[osg-users] [forum] Encoding errors within code Tag

2009-10-04 Thread Johannes Schüth
Hi, i get some ugly encoding error when inserting code into the code tag: Code: for (cii = gProjectorSegments.begin(); cii != gProjectorSegments.end(); cii++) { i++; osg::TexMat* texMat = (*cii)-getTextureMat();

Re: [osg-users] Texture Wrapping Texture2DArray (Clamping doesn't work)

2009-10-04 Thread Johannes Schüth
Hi, thank you for your quick response. I have read these specs for GL_EXT_texture_array : http://www.opengl.org/registry/specs/EXT/texture_array.txt There is no clue about wrapping and clamping issues inside of it and i tried to use CLAMP_TO_EDGE as well but it had no affect at all. Greetings

Re: [osg-users] Focus object/scene (clamping frustum)

2009-09-15 Thread Johannes Schüth
Hi, I see. Of course thats very simple. I had something much more complicated in my mind. (Checking if the frustum planes intersect with some bounding box lines or so..) Anyway.. Here is my solution: Code: osg::Vec3f eye, center, up; float n; viewA1-getCamera()-getViewMatrixAsLookAt(eye,

Re: [osg-users] Focus object/scene (clamping frustum)

2009-09-14 Thread Johannes Schüth
Hi, Thank for your advice. I took a look at: http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/branches/OpenSceneGraph-2.6/src/osgGA/TrackballManipulator.cpp But i can't find any place in the code where the frustum will be calculated. Thank you! Cheers, Johannes

Re: [osg-users] Focus object/scene (clamping frustum)

2009-09-14 Thread Johannes Schüth
Hi, Yes, the computeHomePosition calculates a position and set's it. In my case i'm not able to change the camera positon at all because it is fixed. I'm able to change the orientation and the fov (by the frustum). Perhaps the osgShadow::MinimalShadowMap class does this kind of frustum

[osg-users] Focus object/scene (clamping frustum)

2009-09-13 Thread Johannes Schüth
Hi, is there any easy way to focus a object? I'm able to center my camera onto the object but i want to zoom in as much as possible. In some way i must fit the bounding sphere of my object into the camera frustum. I think i have to set the frustum my self but perhaps there is an easy way to

[osg-users] Dynamic projective textures (Applies to ShadowMaps too)

2009-09-04 Thread Johannes Schüth
Hi, I have a small problem. Imagine the following scene: The viewer/cam can see two objects. One is very near and the other is very far away from the viewpoint. Both will be textured using the same projection source. The object that is very far away from the viewer is very near to the

Re: [osg-users] Multiple projective textures - Conditional per Pixel Multipass rendering

2009-09-01 Thread Johannes Schüth
Hi, i will try uniform arrays as soon as i get to it. But the approach sounds quite good. Thank you. Paul Martz wrote: I believe you can use a uniform array of samplers. This means the number of texture can be arbitrary and therefore you don't need to recompile your shader based on

[osg-users] DelaunayTriangulator - DelaunayConstraint for convex shapes

2009-09-01 Thread Johannes Schüth
Hi, i want to triangulate the following U character like shape. [Image: http://jotschi.de/download/osg/delaunay_3.png ] The DelaunayTriangulator generates this triangulated mesh. But as you can see the space in the middle of the U is also triangulated which i do not want. [Image:

Re: [osg-users] DelaunayTriangulator - DelaunayConstraint for convex shapes

2009-09-01 Thread Johannes Schüth
Hi, that worked like a charm :) Thank you very much for the quick answer. I attach the full example. Maybe this comes handy to someone else too :) Code: osg::Geometry* contourGeom = new osg::Geometry(); contourGeom-setVertexArray(v); contourGeom-addPrimitiveSet(new

[osg-users] Multiple projective textures - Conditional per Pixel Multipass rendering

2009-08-08 Thread Johannes Schüth
Hi, I basically got multiple images that i want to project onto the same world geometry. By comparing the normal vector of the world geometry polygon and the direction vector of the projection source i want to calculate the angle in which the projected image 'shines' onto the polygon. This is

[osg-users] Camera view volume visualization

2009-06-05 Thread Johannes Schüth
Hi, i want to create a visualization of the view volume of a camera. I created a test application with two views and two cameras. I want to use one view to take a look at the created volume. This is what i did so far: I created an osgGA::TrackballManipulator() and assigned it to the camera

Re: [osg-users] Camera view volume visualization

2009-06-05 Thread Johannes Schüth
Hi, nope. Thank you very much. That was exactly what i wanted to achieve. Nice example. Thank you! Greetings, Johannes -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=13631#13631 ___ osg-users

Re: [osg-users] Website not reachable from france and austria

2009-06-02 Thread Johannes Schüth
Hi Jose, why do you want to use full virtualisation at all? Thats a waste of resources. Especially if you are hosting Linux in Linux which you'll do i assume. Paravirtualization does a much better job here. You don't have to care about interrupts and memory issues. I use OpenVZ for my server.

Re: [osg-users] Projective Texturing does not work when using shaders

2009-05-31 Thread Johannes Schüth
Hi Ulrich, thank you very much. You gave me the right hint to solve my problem. I just added the texture matrix and everything worked as expected: Code: /* set Texture matrix*/ osg::TexMat* texMat = new osg::TexMat; osg::Matrix mat; osg::Vec3 projectorPos =

[osg-users] Projective Texturing does not work when using shaders

2009-05-30 Thread Johannes Schüth
Hi, when i'm using shaders instead of fixed functionality to create projective textures the resulting texture mapping is a tiny spot in the center of the terrain model. [Image: http://www.jotschi.de/download/osg/projection_shader.jpg ] If i disable the shaders by removing the follwing line i

[osg-users] Website not reachable from france and austria

2009-05-30 Thread Johannes Schüth
Hi, i can access: blog.openscenegraph.org forum.openscenegraph.org but not www.openscenegraph.org / openscenegraph.org Seems to be a dns problem? ping www.openscenegraph.org PING lemonvm-osg.ai2.upv.es (158.42.9.50) 56(84) bytes of data. Thank you! Cheers, Johannes -- Read