[osg-users] Geometry::addPrimitiveSet() performance issue in 3.6.x

2020-05-13 Thread OpenSceneGraph Users
Hi, I noticed a performance regression in the 3.6.5 release compared to 3.4.x caused by Geometry::addPrimitiveSet() when adding a largish (thousands) number of primitiveSets to a Geometry. This performance regression is caused by Geometry::getOrCreateElementBufferObject in the case the

Re: [osg-users] Geometry Shininess and Color Array

2019-09-24 Thread Erik Hensens
Thank you AnyOldName3! Calling pMaterial->setColorMode(osg::Material::AMBIENT_AND_DIFFUSE) allowed me to use a color array on my geometry and set the shininess as well, just like I wanted to. I really appreciate your help! Thank you, Erik -- Read this topic online here:

Re: [osg-users] Geometry Shininess and Color Array

2019-09-15 Thread Chris Djali
Hi, Have you tried playing with osg::Material::setColorMode? It controls glColorMaterial settings, which is used to switch between having the material colour be determined by the global colour or vertex colours. You probably had the Material set to use its own colour, but if you re-add it and

[osg-users] Geometry Shininess and Color Array

2019-09-13 Thread Erik Hensens
Hello! I have a Geometry on whose state set I used to set a material that I made shiny via osg::Material::setShininess(). The problem is that now I have the need to set various colors across the geometry. I tried doing this with the geometry's color array, but that approach didn't work unless

Re: [osg-users] geometry shader with opengles

2018-04-03 Thread Julien Valentin
On osx, opengl requires strict gl context, so you have to use core version your shader lyn wrote: > Hi, > > I have succeeded on Android ,But not well on IOS,whether it is iphone4 or 6p > or 6sp... > they all show: version '310' is not supported > (geometry shader only works on es3.1 later) >

Re: [osg-users] geometry shader with opengles

2018-04-03 Thread lin hui
Hi, I have succeeded on Android ,But not well on IOS,whether it is iphone4 or 6p or 6sp... they all show: version '310' is not supported (geometry shader only works on es3.1 later) But version 300 is OK(but couldn't use geometry shader),So is there somthing i missed? code now like this:

Re: [osg-users] geometry shader with opengles

2018-04-02 Thread Julien Valentin
Hi osgtransformfeedback example is surely what you're searching for. And give us feedback, i haven't tested tfb on es plateform.. Cheers lyn wrote: > Hi, > > I want to know if osg support geometry shader with opengles3.2?I have changed > the profile to GLES3.I'm now testing on IOS. > I have

[osg-users] geometry shader with opengles

2018-04-02 Thread lin hui
Hi, I want to know if osg support geometry shader with opengles3.2?I have changed the profile to GLES3.I'm now testing on IOS. I have info like this: GEOMETRY glCompileShader "" FAILED GEOMETRY Shader "" infolog: ERROR: 0:15: 'layout' : syntax error: syntax error and this is my code: #version

Re: [osg-users] Geometry in world coordinates but with same screen size - how to do?

2017-01-19 Thread tianzjyh
Hi, Roko, Just check function osg::AutoTransform::setPosition(const Vec3d& pos), and try setting "pos" to (0,0,0), then maybe you will find a clue. -- Cheers, --- TianZJ At 2017-01-20 10:10:31, "Roko Talk" wrote: >Hi TianZJ, > >thank you for your reply

Re: [osg-users] Geometry in world coordinates but with same screen size - how to do?

2017-01-19 Thread Roko Talk
Hi TianZJ, thank you for your reply :) - Are you sure combining stuff from within the osgautotransform example is enough to achieve what I want for osg::Geometry? Because for text I can realize it with the above posted command. Many thanks! :) Cheers, Roko -- Read this topic

Re: [osg-users] Geometry in world coordinates but with same screen size - how to do?

2017-01-19 Thread tianzjyh
hi, Roko, The example "osgautotransform" demonstrates different kinds of text auto-transform, e.g. ranged min-scale, max-scale, fixed position. If you are not sure about the implementation inside the source code, just try to combine the different kinds of texts inside the example, and

Re: [osg-users] Geometry in world coordinates but with same screen size - how to do?

2017-01-19 Thread Roko Talk
Ps. To specify what I'm exactly looking for, it is an equivalent for osg::Geometry of the following stuff for osgText::TextBase::: Code: CharacterSizeMode OBJECT_COORDS_WITH_MAXIMUM_SCREEN_SIZE_CAPPED_BY_FONT_HEIGHT I hope now it is clear what I'm looking for :) -- Read

Re: [osg-users] Geometry in world coordinates but with same screen size - how to do?

2017-01-19 Thread Roko Talk
Hey Robert, I thought it is clear what I'm struggling with. I'm able to reproduce the whole osgautotransform example. Also I'm able to reproduce it with a geometry geode. But I'm struggling with what functionalities I have to combine to be able to let my geometry geode have a constant screen

Re: [osg-users] Geometry in world coordinates but with same screen size - how to do?

2017-01-19 Thread Robert Osfield
On 19 January 2017 at 15:34, Roko Talk wrote: > does any one else has maybe an idea? : ) I suspect others will be like myself and unable to guess what bit you are struggling to get working and what you don't understand. Why not create a small example, such as by modifying

Re: [osg-users] Geometry in world coordinates but with same screen size - how to do?

2017-01-19 Thread Roko Talk
Hey guys, does any one else has maybe an idea? : ) Many thanks! Cheers, Roko -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=70007#70007 ___ osg-users mailing list

Re: [osg-users] Geometry in world coordinates but with same screen size - how to do?

2017-01-18 Thread Roko Talk
Hey Robert, I checked out the whole example (as I did before my first post), but sadly none of them does what I would like to have, something staying at specific world coordinates but keeping it screen size when I zoom. Do I have to combine some parts of the example? Or am I just to unable to

Re: [osg-users] Geometry in world coordinates but with same screen size - how to do?

2017-01-18 Thread Robert Osfield
On 18 January 2017 at 14:49, Roko Talk wrote: > Hi Robert, > > Many thanks for the fast reply! > > Do I understand correctly that the example contains exactly the case I'm > looking for? Or just something close to what I'm looking for? The example doesn't do *exactly*

Re: [osg-users] Geometry in world coordinates but with same screen size - how to do?

2017-01-18 Thread Roko Talk
Hi Robert, Many thanks for the fast reply! Do I understand correctly that the example contains exactly the case I'm looking for? Or just something close to what I'm looking for? And I have no idea what to do with you FYI ^^' - I assume it is relevant to my problem, but do you mind to explain

Re: [osg-users] Geometry in world coordinates but with same screen size - how to do?

2017-01-18 Thread Robert Osfield
Hi Roko, Have a look at the osgautotransform example as this is both a unit test and means of illustrating how to use it. FYI, the coordinates of the subgraph of the AutoTransform are scaled to screen coords, so a subgraph of 10 units across will be scaled to 10 pixels on screen. Robert. On 18

[osg-users] Geometry in world coordinates but with same screen size - how to do?

2017-01-18 Thread Roko Talk
Hi guys, I'm now trying desperately for hours now and not able to achieve the following. : ( I have a geometry, a 2D cross mark (everything is 2D), and I would like it to stick at specific world coordinates and in addition have always the same screen size, no matter what the zoom level is. I

[osg-users] Geometry::setNormalBinding() and setColorBinding()

2016-06-14 Thread Antoine Rennuit
Hi all, I have been using Geometry::setNormalBinding() and setColorBinding() in my code for years but I have just realized that the code is now deprecated because it is not efficient. I have read some more details about it here.

Re: [osg-users] Geometry of Generic 3D Surface from Collection of Points

2015-08-17 Thread Robert Osfield
Hi Erik, The OSG has the osgUtil::DelaunayTriangulator and the GLU based osgUtil::Tessellator can be used for tessellating meshes, but both utilize a 2D projection to a plan to work out the connectivity so aren't appropriate for meshes that will be folded. Robert. On 17 August 2015 at 02:21,

Re: [osg-users] Geometry of Generic 3D Surface from Collection of Points

2015-08-17 Thread Erik Hensens
Thanks Sebastian, My requirement is not actually as simple as trying to graph a 3D function, I was just trying to keep my question clear. In reality I just have the coordinates of the boundary of a three-dimensional path that I need to represent with a Geometry. It looks like the CGAL library

Re: [osg-users] Geometry of Generic 3D Surface from Collection of Points

2015-08-17 Thread Erik Hensens
Thanks Robert. That answers my question perfectly - I figured there was a simple way to do what I wanted using OSG only but that I just couldn't find it. I'm fine with using a different approach to solve this problem. I haven't looked too far but perhaps CGAL can provide me with what I need.

Re: [osg-users] Geometry of Generic 3D Surface from Collection of Points

2015-08-17 Thread Erik Hensens
Thanks for the response Robert! So, does that mean that there is no way to do what I want without somehow determining the coordinates of every individual triangle? And there's not even any way to do a 3D tessellation to get such triangle coordinates? :' robertosfield wrote: Hi Erik, The

Re: [osg-users] Geometry of Generic 3D Surface from Collection of Points

2015-08-17 Thread Robert Osfield
Hi Erik, On 17 August 2015 at 14:44, Erik Hensens ehens...@hunter.com wrote: Sorry but could you expand just a little bit on what you mean by For instance if you had a data set that has two input variables that specify a surface in 3D then you could create a regular tessellation in the 2D

Re: [osg-users] Geometry of Generic 3D Surface from Collection of Points

2015-08-17 Thread Robert Osfield
Hi Erik, On 17 August 2015 at 13:39, Erik Hensens ehens...@hunter.com wrote: So, does that mean that there is no way to do what I want without somehow determining the coordinates of every individual triangle? And there's not even any way to do a 3D tessellation to get such triangle

Re: [osg-users] Geometry of Generic 3D Surface from Collection of Points

2015-08-17 Thread Robert Osfield
Hi Erik, On 17 August 2015 at 14:18, Erik Hensens ehens...@hunter.com wrote: Thanks Robert. That answers my question perfectly - I figured there was a simple way to do what I wanted using OSG only but that I just couldn't find it. I'm fine with using a different approach to solve this

Re: [osg-users] Geometry of Generic 3D Surface from Collection of Points

2015-08-17 Thread Sebastian Messerschmidt
Hi Erik, From what I understand you have a function generating a z value for x,y pairs. So basically you simply have to sample your function in regular distances to get the triangle coordinates. If you already have the sampled points without further information you need to use the delaunay

Re: [osg-users] Geometry of Generic 3D Surface from Collection of Points

2015-08-17 Thread Erik Hensens
Hi Robert, Sorry but could you expand just a little bit on what you mean by For instance if you had a data set that has two input variables that specify a surface in 3D then you could create a regular tessellation in the 2D input space then map the 2D coordinates to their final 3D coordinates

Re: [osg-users] Geometry shader based apps/examples have shader compile failures...

2015-07-27 Thread Mark Pai
Hello Sebastian, Thanks a lot for sending help. I installed the shader analyzer and started testing my geometry shader. I found that if your code has a line comment right before the code, as below, then the compile fails. // some comment out vec2 uv; But, if you separate the line comment and

Re: [osg-users] Geometry shader based apps/examples have shader compile failures...

2015-07-24 Thread Sebastian Messerschmidt
Hi Mark, If a shader gets compiled correcty has nothing to do with osg. You probably updated your driver recently. NVidia decided to follow the GLSL grammar more strictly. For instance code like float x = vec2(1) is not working anymore, since implicit conversion of types is not allowed in

[osg-users] Geometry shader based apps/examples have shader compile failures...

2015-07-23 Thread Mark Pai
Hello, I am using OSG ver 3.4.0-Rc1 under Window 8.1, Visual Studio 2012 Win64. NVidia laptop driver Ver: 353.30. Of-late, I started noticing strange geometry shader compile failures with applications that worked perfectly (in 3.2) after I switched to osg 3.4.0-rc1. First-of, my own

Re: [osg-users] Geometry vertices and nan/inf

2015-03-16 Thread Erik Hensens
robertosfield wrote: Your code is rather perverse and potentially unsafe way to get at the xyz coords, but if the array is a Vec3Array then it should probably work OK. A better way to look at to coords is to cast the array to a Vec3Array and access the vertices via the std::vector

Re: [osg-users] Geometry vertices and nan/inf

2015-03-14 Thread Robert Osfield
Hi Erik, Your code is rather perverse and potentially unsafe way to get at the xyz coords, but if the array is a Vec3Array then it should probably work OK. A better way to look at to coords is to cast the array to a Vec3Array and access the vertices via the std::vector methods (Vec3Array

[osg-users] Geometry vertices and nan/inf

2015-03-14 Thread Erik Hensens
Hello all, I'm analyzing the vertices of a geometry like so: Code: osg::Array *pVertexArray = pGeometry-getVertexArray(); int nVertices = (int)(pVertexArray-getNumElements()); osg::Vec3 *pVertexData = (osg::Vec3 *)(pVertexArray-getDataPointer()); for (int i = 0; i nVertices; i++) { float

Re: [osg-users] geometry and normals

2014-07-26 Thread Gianni Ambrosio
STTrife wrote: Anyway you have indexed vertices obviously, but you can also use non-indexed vertices. In that case you just specify the vertices for each triangle separately. That's basically my first implementation and the reason why I asked confirmation here was to understand which

Re: [osg-users] geometry and normals

2014-07-25 Thread Bram Vaessen
it seems like you are using referenced vertices in your roads mesh? (at least that is what I understand from int* oConnections (the int references vertices indexes right?) I think that if you want to use the accelerated drawing you should convert it to simple vertex arrays, where the vertices

Re: [osg-users] geometry and normals

2014-07-25 Thread Gianni Ambrosio
Hi STTrife, which is the difference between what you say and what Robert suggested here? robertosfield wrote: As for memory/GL efficiency, the most efficient way to the geometry to the GPU is to use index primitives via the osg::DrawElements* primitive set, this allows you to share vertex,

Re: [osg-users] geometry and normals

2014-07-25 Thread Bram Vaessen
Well to give better advice, I would need to understand what is exactly stored in float* oPoints and int* oConnections. What I assume is that oPoints (an array of floats) contains x1,y1,z1,x2,y2,z2, etc. and then oConnections (an array of ints) contains a serie of references to those points for

Re: [osg-users] geometry and normals

2014-07-25 Thread Gianni Ambrosio
OK, this is an exaple (flat square road): Code: osg::Geometry* geometry = getGeometry(); osg::Vec3 myCoords[] = { osg::Vec3(-1.0f,1.0f,0.0f), osg::Vec3(-1.0f,-1.0f,0.0f), osg::Vec3(1.0f,-1.0f,0.0f), osg::Vec3(1.0f,1.0f,0.0f) }; int numCoords =

Re: [osg-users] geometry and normals

2014-07-25 Thread Bram Vaessen
First: In your example the coordinates are stored in an array of Vec3, but in the other code you posted, the oPoints is an array of float so there seems to be a bit of a contradiction there? Anyway you have indexed vertices obviously, but you can also use non-indexed vertices. In that case

Re: [osg-users] geometry and normals

2014-07-25 Thread Robert Osfield
Hi Bram, Most modern hardware will be best driven using indexed primitives sets rather than duplicating vertices - it typically wins on memory bandwidth and ability to utilize the vertex cache on the GPU. If the amount of shared indices is low then duplicating vertices is likely to be better.

Re: [osg-users] geometry and normals

2014-07-24 Thread Gianni Ambrosio
Hi Robert, one more question. I would like to implement a method in my core class to get vertices and indices to use both in osg geometry and in a wavefront writer. The problem is the array type. I don't want to write the same code twice one for the wavefront writer and one for osg geometry

Re: [osg-users] geometry and normals

2014-07-24 Thread Robert Osfield
HI Giannu, I can't work out what your one more question is, I've re-read what you written and am just as confused. Robert. On 24 July 2014 11:43, Gianni Ambrosio g.ambrosio+...@gmail.com wrote: Hi Robert, one more question. I would like to implement a method in my core class to get

Re: [osg-users] geometry and normals

2014-07-24 Thread Gianni Ambrosio
OK, is there a way to pass a C array to geometry-setVertexArray()? Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60432#60432 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] geometry and normals

2014-07-24 Thread Trajce Nikolov NICK
Hi Gianni, this is more into STL programming. This link explains cheap conversion between C array and STL vector http://stackoverflow.com/questions/1733143/converting-between-c-stdvector-and-c-array-without-copying Nick On Thu, Jul 24, 2014 at 1:28 PM, Gianni Ambrosio g.ambrosio+...@gmail.com

Re: [osg-users] geometry and normals

2014-07-24 Thread Gianni Ambrosio
Hi Nick, no this is not a problem of converting C arrays to stl vectors. I'm going to explain the case in detail soon .. Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60434#60434 ___

Re: [osg-users] geometry and normals

2014-07-24 Thread Gianni Ambrosio
Here I am with an example that explains my scenario. I commented the code with questions, hoping this is clearer. Code: // This is a core road that contains all data and must not know of OSG at all class Road { // This method builds vertices and indexes based on the internal data

Re: [osg-users] geometry and normals

2014-07-24 Thread Robert Osfield
HI Gianni, An osg::Array subclass like Vec3Array is a std::vector so you can use all your usual std::vector access methods and code for it. Sample applies to DrawElementsUShort. The easist way to manage things would be simply have your road code build it using osg::Vec3Array, or get it to fill

[osg-users] geometry and normals

2014-07-23 Thread Gianni Ambrosio
Hi All, I need to draw a surface. Looking at OSG examples I implemented it this way: Code: osg::Geometry* geometry = getGeometry(); osg::Vec3Array* vertices = new osg::Vec3Array; GraphicVectorPtr graphicVector = road-graphicVector(); size_t count = graphicVector-count(); size_t

Re: [osg-users] geometry and normals

2014-07-23 Thread Robert Osfield
Hi Gianni, The SmoothingVisititor is really just a fallback for when no normals are provided with a model, the best way to get the precisely the result you want is to provider per vertex normals. As for memory/GL efficiency, the most efficient way to the geometry to the GPU is to use index

Re: [osg-users] geometry and normals

2014-07-23 Thread Gianni Ambrosio
Hi Robert, just because I had in mind a thread in this forum where it seems, on the contrary, that was NOT recommended for GL efficiency. Do you mean something like the code inside createBackground() of osggeometry.cpp example? polyGeom-setVertexArray(new osg::Vec3Array(numCoords,myCoords));

Re: [osg-users] geometry and normals

2014-07-23 Thread Robert Osfield
HI Gianni, On 23 July 2014 16:25, Gianni Ambrosio ga...@vi-grade.com wrote: Hi Robert, just because I had in mind a thread in this forum where it seems, on the contrary, that was NOT recommended for GL efficiency. What isn't recommend is using the deprecated

Re: [osg-users] geometry and normals

2014-07-23 Thread Gianni Ambrosio
Thank you Robert for explanation and clarification. Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60415#60415 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] Geometry in a Geode

2014-04-17 Thread Robert Osfield
Hi Quentin, You haven't provide enough information about what you are doing to know what is going wrong. My best guess is that you've got DisplayLists enabled on the osg::Geometry (this is the default) but haven't called dirtyDisplayList() and dirtyBound(); Robert. On 27 August 2013 11:18,

[osg-users] Geometry shader results in OGL error in OSG 3.2

2014-04-09 Thread Paulo Maciel
Hello, First time posting. We developed an OSG based viewer using OSG 3.0.1. Recently, I upgraded to using OSG 3.2. We have a geometry shader that implements a billboard for trees. Even though I can still see the trees, they are no longer aligned with the line of sight (i.e. don't rotate

[osg-users] Geometry in a Geode

2014-02-25 Thread Quentin
Hi, I'm trying to add some Geometry in the same geode but just one is display, how to display some geometry in a geode? Thank you! Cheers, Quentin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55997#55997

[osg-users] Geometry topology serialization

2014-01-24 Thread Émeric MASCHINO
Hi, The OpenSceneGraph 3.0 Beginner's Guide states that OSG doesn't support algorithmic topology functionalities at present, probably because it seems a little weird for a rendering API to implement this. I'm fine with this. Now, I've written a ReaderWriter plugin to read a custom file format

Re: [osg-users] Geometry Merging Problem

2013-02-20 Thread Sergey Polischuk
Hi if you are using osgconv at any stage to convert your model, it implicitly invokes optimizer. you can control this with env var OSG_OPTIMIZER, to turn optimizer off you can pass OSG_OPTIMIZER=OFF Cheers. 19.02.2013, 20:38, "Adam Stambler" ada...@gmail.com:Hi All,I believe I am having trouble

[osg-users] Geometry Merging Problem

2013-02-19 Thread Adam Stambler
Hi All, I believe I am having trouble with OSG automatically optimizing my sets of Geometry. I am visualizing a 3D reconstruction using OSG. Each part of the reconstruction is put into its own OSG Geometry and Geode. All of the parts are then put a group and saved to an .ive file. In another

Re: [osg-users] Geometry Merging Problem

2013-02-19 Thread Adam Stambler
Hi Folks, Sorry for the spam. It turns out my problem was due to how I was coloring my selected geometry. For some reason changing the primitive color is changing the colors of multiple geodes. Sorry for the spam. Adam On Tue, Feb 19, 2013 at 11:38 AM, Adam Stambler ada...@gmail.com wrote:

Re: [osg-users] Geometry sharing

2012-12-12 Thread Robert Osfield
Hi Ale, On 26 November 2012 10:41, Ale Maro sash...@teletu.it wrote: I have my own data structure to manage mesh geometry. Is there a way share it with OSG to avoid vertex list duplication? You could implement your own osg::Array subclass. See how the osg::Array subclasses like Vec3Array

[osg-users] Geometry sharing

2012-12-05 Thread Ale Maro
Hi, I have my own data structure to manage mesh geometry. Is there a way share it with OSG to avoid vertex list duplication? Thank you! Cheers, Ale -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=51239#51239

Re: [osg-users] Geometry not rendered on ATI using GL3 shaders

2012-04-10 Thread Roland Hill
All, It looks like the problem is to do with Display Lists. There may also have been a problem with Atomic Counters a you suggested, Martin. 1) I updated to the latest svn which included the atomic counters fix and rebuilt. This got rid of the 'invalid enumerant' error messages, but there was

Re: [osg-users] Geometry not rendered on ATI using GL3 shaders

2012-04-08 Thread Roland Hill
Hi David, I am using the Catalyst 12.1 driver which I think is the latest available. I've managed to track the error down to the following two lines in Program.cpp (both throw OpenGL errors). Line 798_extensions-glGetActiveUniformsiv( _glProgramHandle,

Re: [osg-users] Geometry not rendered on ATI using GL3 shaders

2012-04-08 Thread Martin Naylor
To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Geometry not rendered on ATI using GL3 shaders Hi David, I am using the Catalyst 12.1 driver which I think is the latest available. I've managed to track the error down to the following two lines in Program.cpp (both throw OpenGL errors

Re: [osg-users] Geometry not rendered on ATI using GL3 shaders

2012-04-06 Thread Roland Hill
Hi David, Thanks for your suggestion. I tried adding the line but it did not make any difference - still nothing rendered using osgsimplegl3 on the ATI machine. I have updated to the latest trunk and now get the following message: Warning: detected OpenGL error 'invalid enumerant' at After

Re: [osg-users] Geometry not rendered on ATI using GL3 shaders

2012-04-06 Thread David Callu
Hi Roland So there are an OpenGL error somewhere in the scene graph when OSG compile GL object. You can use gDEBugger to track down the gl call that generate an error. BTW have you installed the latest ATI driver ? David Callu 2012/4/6 Roland Hill roland.h...@fourwindstechnology.com.au Hi

Re: [osg-users] Geometry not rendered on ATI using GL3 shaders

2012-04-05 Thread David Callu
Hi Roland, Hi have an Nvidia so I can't test on my side: can you add this line program-addBindFragDataLocation(fragData, 0); at the end of configureShaders function and try again. HTH David Callu 2012/3/28 Roland Hill roland.h...@fourwindstechnology.com.au Hi, I have been trying to

[osg-users] Geometry not rendered on ATI using GL3 shaders

2012-04-04 Thread Roland Hill
Hi, I have been trying to convert my application to use version 1.50 compliant shaders and found that they work on my NVidia machine, but not on my ATI Mobility Radeon HD 5850 laptop. The shaders compile and link on the ATI, but no geometry gets rendered. Both machines are running Ubuntu

Re: [osg-users] Geometry object shared by multiple Nodes.

2012-03-21 Thread Robert Osfield
Hi Eldar, What you are seeing is by using a vertex shader to position the vertex data you are moving it so the bounding box of the osg::Geometry becomes inappropriate. The OSG does it's culling and set up of near/far planes based on the bounding volume of the nodes and drawables so if you don't

[osg-users] Geometry object shared by multiple Nodes.

2012-03-20 Thread Eldar Insafutdinov
Hi, I am trying to reuse Geometry objects between multiple osg::Node instances and apply geometry shader to reposition them. On the attached testcase I tried to implement this. The first osg::Node instance uses unmodified Geometry, and the second one uses vertex shader to shift the quad

Re: [osg-users] Geometry object shared by multiple Nodes.

2012-03-20 Thread Glenn Waldron
Sounds like it might be getting clipped by the near clip plane. OSG automatically computes a near clip plane based on the bounds of the real geometry in the scene. It doesn't account for geometry that's altered by a vertex shader. Check into osg::CullSettings for ways to alter the way clip planes

Re: [osg-users] Geometry object shared by multiple Nodes.

2012-03-20 Thread Eldar Insafutdinov
Thanks, Glenn. I now think it really is the case, because if I position 2 geometries close enough, the second one isn't truncated. I will investigate in details the CullSettings class. Cheers, Eldar -- Read this topic online here:

Re: [osg-users] Geometry object shared by multiple Nodes.

2012-03-20 Thread Eldar Insafutdinov
There's actually one more question I intended to ask: in case of sharing a Geometry object through the API does it actually create only one instance of it on the graphics card side? The whole reason I use this trick to save both systems and graphics memory. Cheers, Eldar --

Re: [osg-users] Geometry object shared by multiple Nodes.

2012-03-20 Thread Glenn Waldron
Yes, single instance. Glenn Waldron / @glennwaldron On Tue, Mar 20, 2012 at 11:51 AM, Eldar Insafutdinov e.insafutdi...@gmail.com wrote: There's actually one more question I intended to ask: in case of sharing a Geometry object through the API does it actually create only one instance of

Re: [osg-users] geometry indexes?

2012-01-17 Thread Robert Osfield
HI Akilan, On 17 January 2012 05:04, Akilan Thangamani akilan.thangam...@gmail.com wrote: Is there any easy way to find vertices's index for the shapes like Cone, Cube etc., in osg::shape? Otherwise, should it be done thru graph note book only? The osg::Shape subclasses don't have any

[osg-users] geometry indexes?

2012-01-16 Thread Akilan Thangamani
Hi Is there any easy way to find vertices's index for the shapes like Cone, Cube etc., in osg::shape? Otherwise, should it be done thru graph note book only? Thanks -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44869#44869

Re: [osg-users] Geometry nodes with VBO

2011-09-30 Thread Robert Osfield
Hi Ga, First up I would recommend moving away from GLUT as it just complicates things, the basic osgViewer::Viewer is far more flexible, feature rich, scalable and easier to use. Second, the vertex data in the OSG is stored in a osg::Vec3Array which is implemented with a std::vectorVec3 so you

Re: [osg-users] Geometry nodes with VBO

2011-09-29 Thread Ga Scan
Hi, I am new to OSG but experienced in OpenGL I need to implement some OpenGL code with OSG. I am using VBOs to render new sets of 3D points (~1 million / frame) inside every glutDisplayFunc callback. I have studied the examples and found osgviewerGLUT is a good starting point but I cant seem

Re: [osg-users] Geometry nodes with VBO

2011-09-29 Thread Robert Osfield
Hi Ga, The OSG supports VBO's within the osg::Geometry class so could do what you need in very straight forward - far easier than with raw OpenGL. Just do geometry-setUseVertexBufferObjects(true); See osggeometry for more details on osg::Geometry. Robert. On Fri, Sep 23, 2011 at 5:27 PM, Ga

Re: [osg-users] Geometry nodes with VBO

2011-09-29 Thread Ga Scan
Hi, I assume someone will interested in this, enough to read my code and reply with suggestions. I am presenting code that should replace the OpenGL code presented above. Both codes are run insides the glutDisplayFunc callback, display call. I have also added the OSG object initialization code

[osg-users] Geometry nodes with VBO

2011-06-23 Thread Joan Navarro
Hi, I have a scene with a lot of .ive objects. I'm trying to get better frame rates. Now I want to apply the VBO technique to the ive model. For this goal, I traverse the object until I visit the geometry node (geom). At this point I write the following orders: geom-setUseDisplayList (false);

Re: [osg-users] Geometry nodes with VBO

2011-06-23 Thread Robert Osfield
Hi Joan, On Thu, Jun 23, 2011 at 9:33 AM, Joan Navarro joannavar...@gmail.com wrote: I have a scene with a lot of .ive objects. I'm trying to get better frame rates. Now I want to apply the VBO technique to the ive model. For this goal, I traverse the object until I visit the geometry node

Re: [osg-users] Geometry nodes with VBO

2011-06-23 Thread Sergey Polischuk
Hi, Joan By default osg uses display lists, and they are usually at least as fast as fbo when drawing static geometry. If your geometry tristripped you get a lot of short strips, with vbo this issues a lot of drawing gl commands. With display lists driver usually can optimize them to draw

Re: [osg-users] Geometry nodes with VBO

2011-06-23 Thread Joan Navarro
Thanks Robert and hybr for your explanations, now it's more clear. I will use the optimizer options too. Cheers, Joan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=40790#40790 ___ osg-users

[osg-users] Geometry Generated object UV texture?

2011-05-05 Thread Nan WANG
Hi, Anybody knows how to set a UV coordinate on a geometry shader generated object? I tested my U-moving VS FS shader with a osg::Sphere and osg::box. The uv coordinate can be mapping properly in VS and FS When i apply this two Shaders to a Geometry Shader generated objectsthe texture2D

Re: [osg-users] Geometry Generated object UV texture?

2011-05-05 Thread Paul Martz
On 5/5/2011 4:07 AM, Nan WANG wrote: Hi, Anybody knows how to set a UV coordinate on a geometry shader generated object? I tested my U-moving VS FS shader with a osg::Sphere and osg::box. The uv coordinate can be mapping properly in VS and FS When i apply this two Shaders to a Geometry

Re: [osg-users] Geometry Generated object UV texture?

2011-05-05 Thread Nan WANG
Hello boss: Here are some details of my problem: In my Geometry Shader, i have some codes to generate objects in real time (i.e. triangles, these trangles constitute a surface). With VS and FS, i can set the gl_FragColor as i like.. But when applying a texture to the objects which are

Re: [osg-users] Geometry Generated object UV texture?

2011-05-05 Thread Nan WANG
the problem i am thinking is that: when we create an object like osg::box..then osg::ShapeDrawable* unitCubeDrawable then the box contain a right UV coordinate. the objects which are realtime generated do not have BOX UVso if i apply a texture to objsthere should be a problem...

Re: [osg-users] Geometry Generated object UV texture?

2011-05-05 Thread Paul MARTZ
See my previous post. When you use a geometry shader to create new vertices, and the object is textured, then the geometry shader must generate tex coords for each vertex. Paul Martz Skew Matrix Software Http://www.skew-matrix.com On May 5, 2011, at 7:23, Nan WANG nan.c...@gmail.com wrote:

Re: [osg-users] Geometry Generated object UV texture?

2011-05-05 Thread Nan WANG
i am a beginner of OSG Could you provide me an example of that?or some links Cheers, Nan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39037#39037 ___ osg-users mailing list

Re: [osg-users] Geometry Generated object UV texture?

2011-05-05 Thread Sergey Polischuk
Hi, Nan You should generate them with same GS. If you draw GS generated model immediatly you should specify correct outputs\inputs for generated tc's in geometry and fragment shaders. If you stream out and save generated vertices data with transform feedback you should also stream out

Re: [osg-users] Geometry and setUseDisplayList(false)

2010-12-11 Thread Gabriel Nützi
Thank you verymuch! This was helpful! I think, will try it! I almost thought it is probably such an error! Thanks !! GAbriel -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=34732#34732 ___

Re: [osg-users] Geometry and setUseDisplayList(false)

2010-12-10 Thread Stephan Maximilian Huber
Am 10.12.10 16:32, schrieb Gabriel Nützi: Hi everybody I have a quite strange problem, I am a newbie, and probably it is a simple setting, which I do not know: I have subclassed from osg:Geometry and have set up in this class my Mesh which I want to render... the thing works fine,

[osg-users] Geometry::setUseVertexObjects(true) doesn't enable use of ElementBufferObject?

2010-11-23 Thread Fred Smith
Hi, The way I should be using Element Buffer Objects is unclear to me. If I use the following code: Code: osg::Geometry* polyGeom = new osg::Geometry(); polyGeom-setUseVertexBufferObjects(true); osg::ref_ptrosg::DrawElementsUShort de = new

Re: [osg-users] Geometry::setUseVertexObjects(true) doesn't enable use of ElementBufferObject?

2010-11-23 Thread Robert Osfield
Hi Fred, You interpretation of what Geometry::setUseVertexBufferObjects(true) is correct, so what you are see looks to be a bug. Which version of the OSG are your using? A couple of weeks ago I was looking into VBO setup issues relating to the new serializers and tracked down the issues I was

Re: [osg-users] Geometry::setUseVertexObjects(true) doesn't enable use of ElementBufferObject?

2010-11-23 Thread Fred Smith
robertosfield wrote: Hi Fred, You interpretation of what Geometry::setUseVertexBufferObjects(true) is correct, so what you are see looks to be a bug. Which version of the OSG are your using? A couple of weeks ago I was looking into VBO setup issues relating to the new serializers and

Re: [osg-users] Geometry::setUseVertexObjects(true) doesn't enable use of ElementBufferObject?

2010-11-23 Thread Fred Smith
Robert, Out of curiosity, why does the osgparametric sample explicitly set a VBO and an EBO, in addition to calling setUseVertexObjects(true)? Thanks, Fred -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33997#33997

  1   2   >