On Tue, Oct 23, 2012 at 8:40 PM, Jason Daly wrote:
> How can TexGen and a shader help here? Would it allow me to calculate the
> UV coordinates for a given photo (camera position etc.) and the mesh?
>
>
>
> The more I think about it, the more I think you'll want to use a shader
> for this. The b
Hi all
I want to pass a custom vertex attribute (lets say a material code) to my
vertex shader.
For the moment I use BIND_PER_VERTEX:
Code:
int l_SMC = 1027; // some material code
for (unsigned int i=0; iasGeometry();
if (l_Geom)
{
osg::Array* l_VertexArray = l_Geom->getVertexArray()
Hi all
I want to pass a custom vertex attribute (lets say a material code) to my
vertex shader.
For the moment I use BIND_PER_VERTEX:
[code]
int l_SMC = 1027; // some material code
for (unsigned int i=0; iasGeometry();
if (l_Geom)
{
osg::Array* l_VertexArray = l_Geom->getVertexArray();
Hi wouldnt it be better to use uniform in this case? Cheers. 24.10.2012, 13:28, "Daniel Schmid" :Hi all I want to pass a custom vertex attribute (lets say a material code) to my vertex shader. For the moment I use BIND_PER_VERTEX: [code]int l_SMC = 1027; // some material code for (unsigned int i=0;
When I would use uniforms, I cannot set different values for different
geometries. Uniforms are global for a particular stateset. So I HAVE to use
vertex attributes, since in my shader I want to treat some particular surface
in a special way, but without the need of separate stateset.
-
Hi,
In my application, I use a custom CullVisitor, this way :
osgUtil::CullVisitor::prototype() = new MyCustomCullVisitor();
But this affects all viewers in my application.
Is there anyway to explicitly set a custom CullVisitor on a specific
osgViewer::Viewer ?
I would like to use twos differ
Hi Daniel,
you are right, with BIND_OVERALL and just one element in the array, OSG should
apply the single attribute to all vertices of the geometry. You can check this
behavior in Geometry.cpp searching for BIND_OVERALL. Also there is the
createTexturedQuadGeometry() function which does setup
Hi
> As you say, setting Uniforms requires a state change, while with an attribute
> the rendering is done at the GPU completely.
it is kind of same both ways... here you need glUniform* call, there you need
to bind vertex attrib and call glVertexAttribPointer*
and rendering is done at the GPU
Hi,
I think OpenGL specs doesn't allow to share a vertex attribute values between
multiple vertices.
Aurelien
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=50753#50753
___
osg-users mailing list
o
Hi samfan,
I tried it again with the updated SDKs and NDKs, using SDK r20 and NDK r8b.
What I think is that it's a change in the NDK that brings on this error. I got
it to build (and work without linker errors) by modifying the file
jni/osgNativeLib.cpp by changing 3 lines:
line 78: const char
Hi dev community,
I'm working on an Android App based on the example AndroidExampleGLES1/2. In my
case it's GLES1, but this problem persists in both GLES versions.
The Problem occurs after the following steps (and it's easily reproducible):
1. run the android osgviewer app
2. load a model
3. put
Hi,
I ported my program from mingw and Code Blocks to Visual Studio 2010 Express
and found that I couldn't get uniform arrays to work. Has anyone experienced
this? I'm new to Visual Studio so I might have missed something.
I made a small test program that works on my old system but not on my ne
On 10/24/2012 03:03 AM, Christoph Heindl wrote:
Thanks for the hints. From browsing the documentation it seems though
that this would also texture non-visible triangles (i.e backfacing
triangles)? This however would lead to messy texturing, since I have
photos from around the mesh.
Shouldn
On 10/24/2012 05:28 AM, Daniel Schmid wrote:
Since the material code is unique within geometries, so actually I
would need to transfer it only once per Geometry. If I change to
BIND_OVERALL, the data is no longer transferred, or at least my shader
cannot detect it anymore. I thought i should
Hi,
sorry, I was wrong. It really seems the same in terms of state changes.
A use case for a BIND_OVERALL attribute is probably that you have different
types of geometry with and without individual attributes (for example color) in
your scene that you want to render using the same shader.
Tha
On Wed, Oct 24, 2012 at 12:37 PM, Sergey Polischuk wrote:
> Hi
>
>> As you say, setting Uniforms requires a state change, while with an
>> attribute the rendering is done at the GPU completely.
>
> it is kind of same both ways... here you need glUniform* call, there you need
> to bind vertex att
Hi,
I am trying to add a 2D box to my scene (consisting of lines 1 pixel wide) that
a user can resize by dragging the sides or corners, or rotate by dragging a
handle. I'm attempting to use the osgManipulator Dragger classes for this
purpose. I created a subclass of CompositeDragger and added
If you did exactly as it was the original example then it's the normal
behaviour... because the viewer is reinitialized every time (it's stated in
the docs), if not... I'm not a seer that knows what have you done in the
code.
2012/10/24 Bernd Kampl
> m working on an Android App based on the exam
Hello Andy,
First of all, thank you for responding, I wasn't even sure the mail got
through ;-)
Hey Sebastian,
I've been looking at this off-and-on for a while now, though I have no clean
solution. From my investigation it looks like the osg::CullVisitor tweaks the
_computed_znear and _com
On 10/24/2012 11:35 AM, Jason Daly wrote:
On 10/24/2012 05:28 AM, Daniel Schmid wrote:
Since the material code is unique within geometries, so actually I
would need to transfer it only once per Geometry. If I change to
BIND_OVERALL, the data is no longer transferred, or at least my
shader ca
Hi,
I've noticed that osgGA::OrbitManipulator code for right and middle mouse
movement has hard-coded values such as:
Code:
// doc in parent
bool OrbitManipulator::performMovementMiddleMouseButton( const double
eventTimeDelta, const double dx, const double dy )
{
// pan model
float scale = -0
Hello Janna,
Is there particular reason scale is hard-coded and no parameter is exposed to
be able to modify movement scale for middle and right mouse button? Or is there
some other way to do it?
There was a large refactoring of camera manipulators about 2 years ago.
OrbitManipulator is one
22 matches
Mail list logo