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
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
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
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,
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);
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
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,
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
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:
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
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,
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:
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
--
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
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
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));
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,
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:
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
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;
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();
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
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,
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
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
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
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
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
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:
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
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
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
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
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.
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 =
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
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
37 matches
Mail list logo