Re: [osg-users] Fetch png image from the web

2017-12-05 Thread Bruno Oliveira
; Cheers > Raymond > > > Verstuurd vanaf mijn iPad > > > Op 2 dec. 2017 om 19:21 heeft Bruno Oliveira < > bruno.manata.olive...@gmail.com> het volgende geschreven: > > > > Hey, > > are there any helpers on OSG for downloading a

[osg-users] Fetch png image from the web

2017-12-02 Thread Bruno Oliveira
Hey, are there any helpers on OSG for downloading a PNG image from the web and creating a osg::Image object from it? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Re: [osg-users] #include on MSVC results in errors

2017-07-11 Thread Bruno Oliveira
This is how I add the include folders of OSG on CMake include_directories ( ${OPENSCENEGRAPH_INCLUDE_DIRS} ) is this correct? 2017-07-11 12:51 GMT+01:00 Bruno Oliveira : > I agree. However, somehow, using CMake, the include/osgDB folder got > appended to the include path This d

Re: [osg-users] #include on MSVC results in errors

2017-07-11 Thread Bruno Oliveira
osgText. > The normal configuration has something like E:\dev\OpenSceneGraph\include > in the project include path, and requests the use of the osgText\String > with: > #include > > this way there will be no confusion with the system string haeder files. > Regards, Laurens. > >

[osg-users] #include on MSVC results in errors

2017-07-11 Thread Bruno Oliveira
Hello, Windows is not case sentitive, hence, on MSVC 2015, #include is the same as #include For this reason, I am including to get std::string definitions, but MSVC is include from OSG. Is there a way to fix this? I'm sure this has happened to more people.

Re: [osg-users] Wait for Database pager to complete

2017-07-09 Thread Bruno Oliveira
graph they don't get deleted mid load. If you do this properly then > there should be no need to mess around with blocks that would > complicate the code. > > Robert. > > On 7 July 2017 at 14:46, Bruno Oliveira > wrote: > > Hello, > > > > i have a Pag

[osg-users] Wait for Database pager to complete

2017-07-07 Thread Bruno Oliveira
Hello, i have a PagedLOD bases scene. At some point I remove a node, but OSG sometimes is reading a subnode and crashes at ReadFileCallback. I can solve this if there is some mechanism to wait for the current callback to finish reading, like for instance a osgDB::DataBasePager::waitForCurrentThr

[osg-users] Escape Key

2017-07-03 Thread Bruno Oliveira
Hello, I am using an event handler for catching keyboard's escape key. However, my osgGA::GUIEventAdapter::getKey() returns 0x1B, when it should be returning osgGA::GUIEventAdapter::KEY_Escape (which is 0xFF1B). What's wrong here? the Osg's enum, or my code? _

Re: [osg-users] Limit rendering a texture up to a given pixel

2017-06-30 Thread Bruno Oliveira
transparent color for pixels outside the valid > bounds. > > Christian > > > 2017-06-29 11:28 GMT+02:00 Bruno Oliveira >: > >> Hello, >> >> >> I have a big image to be rendered (100k pixels each side), hence I am >> partitioning that image in Image

[osg-users] Limit rendering a texture up to a given pixel

2017-06-29 Thread Bruno Oliveira
Hello, I have a big image to be rendered (100k pixels each side), hence I am partitioning that image in Image Tiles. Each tile has 256 x 256 pixels. Each tile consists of a osg::Geometry quad, with a texture bound to it. I put all those tiles in an osg::Group. I use a fragment shader that is glo

Re: [osg-users] Perform actions when a child node is added

2017-06-26 Thread Bruno Oliveira
Robert, a dangling pointer is a probable cause of my problems. Thanks for the hint, I'll look into it. I thought it could be related to me rewriting the node's InitialBound. Thanks, Bruno 2017-06-26 10:15 GMT+01:00 Robert Osfield : > Hi Bruno, > > On 23 June 2017 at 23

Re: [osg-users] Perform actions when a child node is added

2017-06-23 Thread Bruno Oliveira
d and then doing what extra's you want, > > Robert. > > On 23 June 2017 at 11:31, Bruno Oliveira > wrote: > > Hello, > > > > > > I want to be able to perform some actions inside a node of my own, when > > someone adds a child node to it. > > &g

[osg-users] Perform actions when a child node is added

2017-06-23 Thread Bruno Oliveira
Hello, I want to be able to perform some actions inside a node of my own, when someone adds a child node to it. Is this possible via some callback mechanism or so? -- Also, another question. Using osgDB::Registry::ReadFileCallback, I can only perform actions after a node is read and befor

Re: [osg-users] converting node coordinates

2017-06-22 Thread Bruno Oliveira
u zoom your mouse feel forward it's possible that the new sphere is > outside the camera's view and thus being culled out of the drawing. Check > to make sure the sphere doesn't end up behind the camera. > > On Thu, Jun 22, 2017 at 10:38 AM, Bruno Oliveira < > bruno.m

Re: [osg-users] converting node coordinates

2017-06-22 Thread Bruno Oliveira
I am almost sure I am making some mistake on setting the node's bounding sphere. Is my code correct on that example I gave? 2017-06-22 18:29 GMT+01:00 Bruno Oliveira : > Sorry I'm not sure what you're asking. > > I manipulate my scene with a Mouse Manipulator (Trackba

Re: [osg-users] converting node coordinates

2017-06-22 Thread Bruno Oliveira
s do the new bounds result in the node > getting culled by the camera? > > Thanks, Sam > > > On Jun 22, 2017, at 10:12, Bruno Oliveira com> wrote: > > > > Hello, > > > > I have some osg::Nodes with some initial geometry coordinates. > > > > T

[osg-users] converting node coordinates

2017-06-22 Thread Bruno Oliveira
Hello, I have some osg::Nodes with some initial geometry coordinates. Then, after some rendering, at some point I need to transform those initial coordinates. I do something like this: void MyNodeGeometry::convertCoordinates() { auto* vert = this->getVertexArray(); for (int i = 0; i <

[osg-users] Render objects in geographic coordinates (radians)

2017-06-20 Thread Bruno Oliveira
Hello, how can I render an object in geographic coordinates, i.e., XY are in radians and Z in meters? If I render it directly without performing any projection, my object is rendered as a stright line along the x axis (which makes sense, since the xy coordinates are contained in [-pi, pi] radians

[osg-users] Multiple definitions of MixInVector destructor

2017-06-06 Thread Bruno Oliveira
Hello, anyone ever had this error? ErrorLNK2005"public: virtual __cdecl osg::MixinVector::~MixinVector(void)" (??1?$MixinVector@H@osg@ @UEAA@XZ) already defined in MyStaticLib.lib(SomeObject.obj)MAPP osg.lib(osg130-osg.dll) This happened to me today when compiling code under Window

[osg-users] Render Geographic/Projected coordinate nodes

2017-06-05 Thread Bruno Oliveira
How can I render a node in Geographic Coordinate Systems? I tried rendering in WGS84 and got several problems (bad intersection computation, bad Mouse handler). ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org

[osg-users] Render point cloud in a different coordinate system

2017-06-05 Thread Bruno Oliveira
I have a big point cloud, which has points in meter coordinates. Now I want to transform the coordinates of this cloud for rendering only, without changing my point cloud data. How can I do this? ___ osg-users mailing list osg-users@lists.openscenegraph.o

[osg-users] Why not const pointers in array setters

2017-05-29 Thread Bruno Oliveira
Hello, in array setters, for instance in osg::Geometry::setVertexArray, why is the array argument non-const? How bad is it that I const_cast an array of my into a Geometry? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.open

Re: [osg-users] Get RenderBinDetails

2017-05-29 Thread Bruno Oliveira
urn _binNum; } > > Robert. > > On 24 May 2017 at 10:44, Bruno Oliveira > wrote: > > Hello, > > > > in order to sort my nodes by depth, I use the following code to a node's > > stateset > > > > nodeStateSet->setRenderBinDetails(order, &quo

[osg-users] Get RenderBinDetails

2017-05-24 Thread Bruno Oliveira
Hello, in order to sort my nodes by depth, I use the following code to a node's stateset nodeStateSet->setRenderBinDetails(order, "DepthSortedBin"); where "order" is an int. Now, how do I get that value when I'm iterating over my nodes? ___ osg-users m

Re: [osg-users] Draw instance quads not working

2017-05-23 Thread Bruno Oliveira
ried the osg example osgdrawinstanced? > Writing "not working" is probably too little info for people to help you ;-) > > Cheers, > Raymond > > > > > On 5/22/2017 8:17 PM, Bruno Oliveira wrote: > > Hi, > > > I want to render several simple quads ( a si

[osg-users] Draw instance quads not working

2017-05-22 Thread Bruno Oliveira
Hi, I want to render several simple quads ( a simple rectangle). I pass the quad centers via a 2D texture, and try to render them with the following vertex shader: "#version 120\n" "#extension GL_EXT_draw_instanced : enable\n" "\n" "uniform sampl

[osg-users] Enable Vertex Attribute Arrays

2017-03-20 Thread Bruno Oliveira
Hello, is there anything I need to do in OSG to enable usage of VertexAttributeArrays? Like for instance in OpenGL you need to call glEnableVertexAttribArray() (see https://www.khronos.org/registry/OpenGL-Refpages/es2.0/xhtml/glEnableVertexAttribArray.xml ) I am using OSG 3.4.0 and simply can't

[osg-users] Setting vertex attribute array of float

2017-03-20 Thread Bruno Oliveira
Hello, I have a point cloud and I need to pass some float attribute. I need one flag per vertex, so I am using vertex attribute array. Here's how I do it: *osg::Geometry* geom = (...);osg::ref_ptr vvv(new osg::FloatArray());* *for (int i = 0; i < nPoints; i++) vvv->push_back(0.);* *geom->s

[osg-users] Encapsulate ttf in binary app

2017-02-02 Thread Bruno Oliveira
Hello, for using with osgText, is there a way of using some .tff file (it can be one from the OSG), without having to pack the .ttf file itself with the binary distribution of the app? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://

Re: [osg-users] Heap Corruption

2017-01-10 Thread Bruno Oliveira
If you managed to solve the problem, forget it. Else, take a look at this: http://stackoverflow.com/questions/7705724/shared-memory-in-dlls 2017-01-10 13:26 GMT+00:00 Théo Nassour : > Hi every one, and thanks for you're replies, > > I am sorry Bruno but, i havent understood what you Said. Can yo

Re: [osg-users] Heap Corruption

2017-01-10 Thread Bruno Oliveira
Another possibility is that your code is allocating and deallocating memory in separate module DLLs. However, in Windows, each DLL has separate memory spaces and that cannot be done. You should check if that's the case by any reason (e.g. creating a osg::ref_ptr in a dll of your own and allowing o

Re: [osg-users] Draw vertex as Circle with color given by some Vec4 array

2017-01-05 Thread Bruno Oliveira
Hi all, Tracje: thanks a lot, that's something like this that I was needing. Robert: I've tried that approach, the problem is that I need to define point's sizes in World coordinates, not in pixel! Is this possible with PointSprites in any way? 2017-01-05 10:47 GMT+00:00 Robert Osfield : > HI Br

Re: [osg-users] Draw vertex as Circle with color given by some Vec4 array

2017-01-05 Thread Bruno Oliveira
Hi all, *Tracje*: thanks a lot, that's something like this that I was needing. *Robert*: I've tried that approach, the problem is that I need to define point's sizes in World coordinates, not in pixel! Is this possible with PointSprites in any way? 2017-01-05 20:03 GMT+00:00

Re: [osg-users] Draw Instanced intersections

2017-01-03 Thread Bruno Oliveira
Intersection), and you will find they contain an > "osg::NodePath", which means the whole path of the node(e.g. matrix > transform nodes upon the drawable instance). > > > -- > > > Cheers, > --- > TianZJ > > At 2017-01-03 16:58:16, "Bruno Olive

[osg-users] Draw Instanced intersections

2017-01-03 Thread Bruno Oliveira
Hello, I'm implementing a draw instanced optimized scene. This is for drawing a set of polygons. Previously I was creating a drawable for each polygon, but now I am using draw instancing. With one drawable per polygon I can easily use osg intersectors for computing scene intersections. But how ca

Re: [osg-users] Draw vertex as Circle with color given by some Vec4 array

2017-01-02 Thread Bruno Oliveira
om the > vertex array. > > Do a search through the examples for how to set up your program with > VertexAttributes ... Ping me if you if troubles, I might be able to give > some snippets > > Cheers, > Nick > > On Mon, Jan 2, 2017 at 8:21 PM, Bruno Oliveira <

[osg-users] Draw vertex as Circle with color given by some Vec4 array

2017-01-02 Thread Bruno Oliveira
Hello, I have an array of 3d points that I want to render in a scene. I want to render them as circles, centered on each point coordinates, with a given radius and a color that is given by a color array I have in memory. For now, I am creating a node for each point, that consists of a PrimitiveS

[osg-users] Intersect Point Cloud wth precision

2016-12-22 Thread Bruno Oliveira
Hello, I have a point cloud and need to get the intersection of my mouse with that point cloud. For that I use a PolytopeIntersector. I use this intersector because I found out that a LineSegmentIntersector will not do the trick. I set the polytope width and height to 5.0 and therefore I get lots

[osg-users] Scroll not working properly on MacOS

2016-12-13 Thread Bruno Oliveira
Hello, in MacOS, when using Qt as a frontend manager along with OSG contexts, I realised that scrolling with external mouse is not working properly: if I use the TrackballManipulator, all the mouse does is zooming in. However, if I use the laptop's trackpad, the zoom works fine. I think this may b

Re: [osg-users] PolytopeIntersector with AutoTransform

2016-12-04 Thread Bruno Oliveira
ngs. This should work OK most of the time. If you > have multiple views on the scene this will mean that there are > multiple stats but only the last one will be left in place for the > next frame. > > Robert. > > > > On 3 December 2016 at 17:55, Bruno Oliveira &g

[osg-users] PolytopeIntersector with AutoTransform

2016-12-03 Thread Bruno Oliveira
Hello, in my scene graph I'm using an AutoTransform to add a circle with Radius=10, centered on (0,0,0): float Radius = 10; for (int i = 0; i < nPointsInCircle; i++) vertArray[i] = Vec3d( radius * sin(...), radius* cos(...), 0.)); then I add this to a Drawable + Geode, and add that Geode

[osg-users] Deriving from osg::Geometry

2016-12-01 Thread Bruno Oliveira
Hello, I created a custom class derived from osg::Geometry. Everything is displayed correctly. However, when I use a PolytopeIntersector in my scene graph, I get a seg fault in *osgUtil::PolytopeIntersector::intersect():* * osg::Drawable::getBoundingBox() const* If I call getBoundingBox myself

[osg-users] GUIEventHandler osgGA::GUIEventAdapter::RELEASE

2016-11-28 Thread Bruno Oliveira
Hello, I created a custom osgGA::GUIEventHandler. It handles both mouse click(push) and release. In both cases (click/push and release) I do bool Handler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa) { unsigned int buttonMask = ea.getButtonMask(); } If the event is a m

Re: [osg-users] How to render the image without reducing its size.?

2016-11-22 Thread Bruno Oliveira
You should split your image in tiles! 2016-11-22 14:23 GMT+00:00 Uma Devi Selvaraj : > Hi, > >Thank you all for the reply. > ... > > Thank you! > > Cheers, > Uma > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=69474#69474 > > > > > >

Re: [osg-users] Draw geometry that keeps its size in screen even with user manipulation (scaling, etc)

2016-11-21 Thread Bruno Oliveira
ce between the circles does not change. Do I need to add an autotransform for each circle? 2016-11-21 16:20 GMT+00:00 Trajce Nikolov NICK < trajce.nikolov.n...@gmail.com>: > Hi Bruno, > > maybe you can have a look at osg::AutoTransform > > On Mon, Nov 21,

[osg-users] Draw geometry that keeps its size in screen even with user manipulation (scaling, etc)

2016-11-21 Thread Bruno Oliveira
Hello, I am drawing some basic shapes/geometries (in this case, some rectangles or circles), but need them to have fixed size in screen pixel coordinates, even when the user manipulates the scene. For instance, I want to draw rectangles that are 10-pixel wide, and keep these 10 pixels even when t

Re: [osg-users] Draw open polygon

2016-11-17 Thread Bruno Oliveira
Thank you Robert, that's perfect! 2016-11-17 10:24 GMT+00:00 Robert Osfield : > Hi Bruno, > > On 17 November 2016 at 10:11, Bruno Oliveira > wrote: > > How does one draw an open polygon using whether OSG API's or OpenGL > > primitives? > > I know how t

[osg-users] Migrate shaders to glsl 4.1

2016-11-17 Thread Bruno Oliveira
I've been trying to migrate my shaders to OpenGL 4.1. What is the alternative to the fixed pipeline code, of the vertex shader: gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; gl_Position = ftransform(); I know I have ot create my own out vector, like "out vec4 texcoord", but

[osg-users] Draw open polygon

2016-11-17 Thread Bruno Oliveira
Hello, How does one draw an open polygon using whether OSG API's or OpenGL primitives? I know how to draw, for instance, a filled rectangle, but how do I draw a filled rectangle with a hole inside? My data structures are stored as follows: a vector of the outward polygon's vertices in clockwise o

Re: [osg-users] glsl version 130 not supported (and related problems)

2016-11-14 Thread Bruno Oliveira
using the Qt API, These errsod o not appear, but when I try to render a point cloud in a PagedLOD node, only white points start to appear and after some LOD's are loaded the app crashes. 2016-11-13 15:21 GMT+00:00 Robert Osfield : > On 12 November 2016 at 22:24, Bruno Oliveira > wrote:

Re: [osg-users] glsl version 130 not supported (and related problems)

2016-11-12 Thread Bruno Oliveira
gt; On 25 October 2016 at 23:53, Bruno Oliveira > wrote: > > I'm sorry but that did not work for me. I indeed created a new clone of > the > > OSG's master, recompiled OSG along with my app and I get a huge amount of > > 'invalid operation' errors when trying

[osg-users] OSG RenderBin reverse order

2016-11-07 Thread Bruno Oliveira
Hello, I'm using RenderBins to display overlapping textures that are contained in separate geodes. All my geodes are at z = 0.f, so using a standard depth test is not good for me. I need to use the RenderBin order, but I need to reverse the order (i.e, if I give a binNum of 0 to a node, I want tha

[osg-users] Scene displaced from (0, 0, 0)

2016-11-03 Thread Bruno Oliveira
Hello, I have a 3d scene that I manipulate with a TrackballManipulator, and setup a scene in which all nodes are centred in (5, 1). Now when I try to do use the home() function, I can't see my nodes. But if I center my scene around (0, 0, 0), my nodes appear. Should I use something else t

Re: [osg-users] glsl version 130 not supported (and related problems)

2016-10-25 Thread Bruno Oliveira
I'm sorry but that did not work for me. I indeed created a new clone of the OSG's master, recompiled OSG along with my app and I get a huge amount of 'invalid operation' errors when trying to draw a simple scene that would otherwise work... 2016-10-24 13:36 GMT+01:00 Bruno Oli

Re: [osg-users] glsl version 130 not supported (and related problems)

2016-10-24 Thread Bruno Oliveira
Thank you Robert for the extensive answer. I will test it today and provide feedback ASAP. Unfortunately OSX support is a requirement for my software. Thank you Tony for the link. I think you're right. It's probably some marketing strategy. 2016-10-24 9:10 GMT+01:00 Tony Vasile : > This may also

[osg-users] glsl version 130 not supported (and related problems)

2016-10-22 Thread Bruno Oliveira
Hello, I am using a fragment shader that requires #version 130 I use OSG 3.5.5 and Qt 5.7 on MacOS 10.12 This results in a shader compilation error, 'version 130 not supported' I tried compiling OSG with GL3 enabled, but the error persists. Then I tried to activate a Core Profile globally in Qt

Re: [osg-users] Creating Texture2DArray

2016-10-21 Thread Bruno Oliveira
I'm starting to think that this is some OSG bug / inconsistency. If I give up on Texture2DArray and upload a SINGLE Texture2D, if I use GL_R8UI as internalFormat and GL_RED_INTEGER as pixelFormat, everythning works perfectly. 2016-10-21 14:54 GMT+01:00 Bruno Oliveira : > Thanks. Howev

Re: [osg-users] Creating Texture2DArray

2016-10-21 Thread Bruno Oliveira
; On Fri, Oct 21, 2016 at 9:36 AM, Bruno Oliveira < > bruno.manata.olive...@gmail.com> wrote: > >> Thanks for the answer. >> >> Using GL_LUMINANCE8UI yields undefined symbol. The closest symbols I have >> defined is GL_LUMINANCE8UI_EXT. >> >>

Re: [osg-users] Creating Texture2DArray

2016-10-21 Thread Bruno Oliveira
;> I mean that GL_LUMINANCE is a valid pixel format, and GL_LUMINANCE8 >> is an internal format. GL_LUMINANCE8 is not a valid pixel format and >> will probably give you a invalid enumerant error. >> >> >> >> Glenn Waldron >> >> O

Re: [osg-users] Creating Texture2DArray

2016-10-21 Thread Bruno Oliveira
CE8 is an > internal format. GL_LUMINANCE8 is not a valid pixel format and will > probably give you a invalid enumerant error. > > > > Glenn Waldron > > On Fri, Oct 21, 2016 at 8:03 AM, Bruno Oliveira < > bruno.manata.olive...@gmail.com> wrote: > >> So

Re: [osg-users] Creating Texture2DArray

2016-10-21 Thread Bruno Oliveira
12:25 GMT+01:00 Glenn Waldron : > Bruno, I think you have those reversed. > > On Oct 21, 2016 6:07 AM, "Bruno Oliveira" > wrote: > >> Hello, >> >> thank you for your answer. I am indeed using the same texture sizes and >> formats. >> If I us

Re: [osg-users] Creating Texture2DArray

2016-10-21 Thread Bruno Oliveira
Hello, thank you for your answer. I am indeed using the same texture sizes and formats. If I use GL_LUMINANCE8 as pixelFormat and GL_LUMINANCE as internalFormat, I get a "invalid enumerant" error 2016-10-21 7:56 GMT+01:00 Sebastian Messerschmidt < sebastian.messerschm...@gmx.de>: > > Hi Bruno: >

[osg-users] Creating Texture2DArray

2016-10-20 Thread Bruno Oliveira
Hello, I'm trying to create a Texture2DArray. My textures are uchar images with size (texWidth, 256), single channel. The combination of texture internalFormat and pixelFormat with pixelType is not working. I use GL_R8UI for internalFormat, GL_RED_INTEGER for pixelFormat and GL_UNSIGNED_BYTE for t

[osg-users] Creating HUD with trihedron and trackball sphere

2016-09-18 Thread Bruno Oliveira
Hello, I have a 3D model viewer using a TrackballManipulator for manipulating my view with the mouse. I created a custom HUD that has a simple sphere representing a trackball, but this is extremely painful, and I'm almost sure something like this already exists anywhere. The idea is to have a tr

Re: [osg-users] Can't update my projection matrix amnually

2016-09-15 Thread Bruno Oliveira
016 at 16:57, Bruno Oliveira > wrote: >> Hello, >> >> I just verified and it is indeed related to near and far planes. >> I am zooming my camera, and therefore, somewhere along the OSG update loops, >> the near and far planes will change but I don’t know what the n

Re: [osg-users] Can't update my projection matrix amnually

2016-09-15 Thread Bruno Oliveira
FAR via > > > viewer.getCamera()->setComputeFarMode(osg::CullSetting::DO_NOT_COMPUTE_NEAR_FAR); > > Then see what happens. > > Robert. > > On 15 September 2016 at 16:18, Bruno Oliveira > wrote: >> Hello, >> >> >> I am trying to set my

[osg-users] Can't update my projection matrix amnually

2016-09-15 Thread Bruno Oliveira
Hello, I am trying to set my view and projection camera matrix. I do this inside a custom camera manipulator code I am building. I set the camera view matrix as camera->setViewMatrix(getInverseMatrix()); After this, since I am using a perspective projection matrix, I know I need to update my p

[osg-users] Perspective Projection updateCamera does not work anymore

2016-09-15 Thread Bruno Oliveira
Hello, I have a scene and I am using a Perspective Projection. I was using a Ortho projection before. Now, I am creating a new camera manipulator, in which I need to update the camera zoom, and update the camera in that precise moment, in order to check my scene for intersections of a ray from

Re: [osg-users] PagedLOD range for 2D image tiles

2016-09-14 Thread Bruno Oliveira
Sorry, my mistake. No FOV in Ortho2D projection, obviously! I tried that setRange(id, 0.5, 2) and it did not work, no tile is ever rendered.. Notice that my tiles are added to the scene graph as geodes, with size = tileSize / scale, hence, a tile is always 256 pixels, but the geode size is set to

Re: [osg-users] PagedLOD range for 2D image tiles

2016-09-14 Thread Bruno Oliveira
Thank you for the answers. So, Let me draw a specific scenario: an image pyramid, starting at scale 0.125, going all the way up to 0.25, 0.5, 1.0. I am also using an Ortho2D projection (field of view 30 degrees). The tiles are fixed size, and I know their size in pixels. Can I use PIXEL_SIZE_ON_SC

[osg-users] PagedLOD range for 2D image tiles

2016-09-13 Thread Bruno Oliveira
Hello, I have a pagedLOD engine setup, for displaying big images (1x1 pixels) I subdivided these images in an pyramid with several scales (starting, for instance, at 0.125 of the image size and going up to 1.0 of the image size) Everything is displaying correctly, except that I don't und

[osg-users] Invalid Operation after applying attribute Viewport

2016-09-12 Thread Bruno Oliveira
Hello, I am getting the following error in an OSG viewer, with a osgViewer::GraphisWindowEmbedded into a QOpenGLWidget: detected OpenGL error 'invalid operation' after applying attribute Viewport 0x7f93fbe97170 I get this error every time I call QOpenGLWidget::update(). This happens only under

Re: [osg-users] Trigger some function when PagedLOD finishes openening a node

2016-09-12 Thread Bruno Oliveira
frame to be done (including for the > incremental compilation.) You could have a look at how this is > implemented if you want to do something similar, or just use it > directly. > > Robert. > > On 10 September 2016 at 09:56, Bruno Oliveira > wrote: > > Hello,

[osg-users] Trigger some function when PagedLOD finishes openening a node

2016-09-10 Thread Bruno Oliveira
Hello, I am using a PagedLOD engine, but I need to call some function I have every time the PagedLOD finished reading a Node and it is ready for rendering. This function I want to call is intended to trigger a draw/refresh action in my viewer, but I think this could be any function at all. How

[osg-users] Allocating osg::image from my own data buffer

2016-08-22 Thread Bruno Oliveira
Hello, the following code block is creating an image from a buffer I own. This does not allocate a new buffer, but assumes my buffer will not be deallocated. How do I create a new, independent osg::Image copying data from my buffer to an internal array? osg::Image img = osg::image(); img->setImag

[osg-users] undeclared identifier for Glenum's in OSX

2016-07-28 Thread Bruno Oliveira
Hello, with OSG 3.4.0 from git, under OSX El Capitan, I am getting the following undeclared OpenGL identifiers (GLEnums actually). This does not happen under Linux Ubuntu nor Windows: error: use of undeclared identifier 'GL_RGBA8UI' return GL_RGBA8UI;

Re: [osg-users] Implement tile-based, large scale 2d map rendering

2016-07-28 Thread Bruno Oliveira
> Cheers > Sebastian > > > > 2016-07-05 23:33 GMT+02:00 Jason Beverage : > >> Check out http://www.osgearth.org, it likely does everything you're >> trying to do. >> >> Jason >> >> On Tue, Jul 5, 2016, 5:18 AM Bruno Oliveira < &g

Re: [osg-users] how to render 16bit depth image

2016-07-20 Thread Bruno Oliveira
That did the trick. Thank you :) 2016-07-20 11:56 GMT+01:00 Sebastian Messerschmidt < sebastian.messerschm...@gmx.de>: > Hi Bruno, > > I intend to render a 16 bit per channel, 4 channel image, i.e., each pixel > is 4 x unsigned 16bit (uint16_t) RGBA, leading to 64bit per pixel. > > This clarified

Re: [osg-users] how to render 16bit depth image

2016-07-20 Thread Bruno Oliveira
I intend to render a 16 bit per channel, 4 channel image, i.e., each pixel is 4 x unsigned 16bit (uint16_t) RGBA, leading to 64bit per pixel. 2016-07-20 8:48 GMT+01:00 Sebastian Messerschmidt < sebastian.messerschm...@gmx.de>: > Hi Bruno, > > Ok so I meant GL_ vars. Could you suggest any code for

Re: [osg-users] how to render 16bit depth image

2016-07-19 Thread Bruno Oliveira
Ok so I meant GL_ vars. Could you suggest any code for substituting that setImage line? Thank you > On 19 Jul 2016, at 09:35, Sebastian Messerschmidt > wrote: > > Hi Bruno, >> Sorry but I didn't quite catch that. >> What do you mean by "but I thing you need to use GL_RGBA_INTEGER_EXT as >> so

Re: [osg-users] how to render 16bit depth image

2016-07-19 Thread Bruno Oliveira
Sorry but I didn't quite catch that. What do you mean by "but I thing you need to use GL_RGBA_INTEGER_EXT as source" Alternatively, how can I replace the macros in that setImage function call? 2016-07-19 8:45 GMT+01:00 Sebastian Messerschmidt < sebastian.messerschm...@gmx.de>: > Hi, > > Your inte

[osg-users] how to render 16bit depth image

2016-07-18 Thread Bruno Oliveira
Hello, I have a 16bit per channel, 4 channel, image. The format is short (uint16_t). Note that this image is scaled to the full 16bit depth [0, 65536] I have this code that works well for a 8bit, 4 channel image: osg::ref_ptr image = new osg::Image(); image->setImage(ImageSize, ImageSize,1, GL

[osg-users] how to clear Vec3Array

2016-07-14 Thread Bruno Oliveira
hello, I am doing the following experiment: osg::ref_ptr array(new osg::Vec3Array); array->resize(3); array->clear(); This does not deallocate the memory. How do I effectively deallocate the memory from the std::vector encapsulated in the osg::Vec3Array?

[osg-users] PagedLOD just keeps increasing number of LOD nodes

2016-07-12 Thread Bruno Oliveira
Hello, I have a scene with a point cloud, ordered in an octree. I have each node in a separate file, so I built a PagedLOD engine based renderer. My octree is of depth 2, with approximately 3 million points. I found out that this engine is consuming more memory than I expected. Hence I added a S

[osg-users] Inherithance from osg::referenced

2016-07-11 Thread Bruno Oliveira
Hello, I am creating a class that should inherit from osg::Referenced. Is there any guideline document available? I searched for a while and couldn’t find any. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/

[osg-users] Implement tile-based, large scale 2d map rendering

2016-07-05 Thread Bruno Oliveira
Hello, can someone give me some hints on where to start implementing a tile-based, large scale 2d map renderer? This is similar to, for instance, Google maps, i.e., it only shows the visible tiles, and increases scale as I zoom in. I have a large tiled 2d raster map (e.g. 200k x 200k pixels) sto

Re: [osg-users] reset root color to original colors

2016-05-25 Thread Bruno Oliveira
Thank you very much, those hints did the job. I will try to better explain my question the next time. I intended to disable the shader / program. 2016-05-25 9:10 GMT+01:00 Sebastian Messerschmidt < sebastian.messerschm...@gmx.de>: > Hi Bruno, > > Your question is a bit vague. If you use a shader

[osg-users] reset root color to original colors

2016-05-24 Thread Bruno Oliveira
Hello, I have one single root node in my scene graph. I have a vertex array and a color array. I susually use them in conjunction to see my vertices with the original colors, with ret->setColorArray(m_colors); ret->setColorBinding(osg::Geometry::BIND_PER_VERTEX); Now I am adding

Re: [osg-users] How does PIXEL_SIZE_ON_SCREEN work

2016-05-17 Thread Bruno Oliveira
Thank you both. The problem I'm having is relative to the point clouds density: too dense clouds will result in poor rendering performance if I tune my LOD to render sparser clouds. I can't find a good trade-off for the LOD resolution that fits both cases. I will probably subclass the LOD class. T

Re: [osg-users] How does PIXEL_SIZE_ON_SCREEN work

2016-05-17 Thread Bruno Oliveira
I am rendering point clouds. What I want to do is to guarantee a certain point density is displayed. I know the number of points in each LOD and I know the bounding boxes of those LOD's. Can't I calculate a certain resolution value to pass to the LOD? 2016-05-16 11:54 GMT+01:00 Brun

Re: [osg-users] How does PIXEL_SIZE_ON_SCREEN work

2016-05-16 Thread Bruno Oliveira
loads/2015/04/LOD-Level-of-detail-in-OpenSceneGraph-OSG.pdf > . > It could shed some light on LODding. > > Cheers. > > 2016-05-16 12:03 GMT+02:00 Bruno Oliveira >: > >> Hello, >> >> I am using a LOD but I don't understand how PIXEL_SIZE_ON_SCREEN rang

[osg-users] How does PIXEL_SIZE_ON_SCREEN work

2016-05-16 Thread Bruno Oliveira
Hello, I am using a LOD but I don't understand how PIXEL_SIZE_ON_SCREEN range mode works. I am doing lod->setRangeMode(osg::LOD::RangeMode::PIXEL_SIZE_ON_SCREEN); but what parameters can I use to configure this mode? ___ osg-users mailing list osg-us

Re: [osg-users] Remove all LOD children

2016-05-13 Thread Bruno Oliveira
not leaking > memory with a special tool, as the one I recommended (valgrind for > CPUs, other tools for GPUs). > > System memory tools are completely unreliable for this specific purpose. > > Bruno Oliveira writes: > > > I tried removing the children with m_r

Re: [osg-users] Remove all LOD children

2016-05-13 Thread Bruno Oliveira
t; > Maybe you can place some breakpoints at the destructors on the debugger > and see what is happening. > > Bruno Oliveira writes: > > > Thank you for your answer. However, since I'm using a LOD, I think it > > is not properly removing my data. At least the memory is

Re: [osg-users] Remove all LOD children

2016-05-13 Thread Bruno Oliveira
Thank you for your answer. However, since I'm using a LOD, I think it is not properly removing my data. At least the memory is still allocated. If I manually iterate over all nodes and delete them by myself, some memory is freed, but not all! 2016-05-13 14:58 GMT+01:00 Alberto Luaces : &g

[osg-users] Remove all LOD children

2016-05-13 Thread Bruno Oliveira
Hello, Sorry to bother again. I think this is somwhat a different topic from my previous post. I am using a LOD based node, with several gourps/LODs. At some point I want to completely wipe out my scene. How can I delete all nodes? This is my code. I think it still leaves some nodes floating. v

Re: [osg-users] Clear scene data and underlying memory structures

2016-05-13 Thread Bruno Oliveira
I am using Ubuntu's System monitor. How can I measure it more accurately? 2016-05-13 13:08 GMT+01:00 Alberto Luaces : > Bruno Oliveira writes: > > > Hello, > > > > thank you for your answaer. However, that does not have any effect :( > > One thing you are n

Re: [osg-users] Clear scene data and underlying memory structures

2016-05-13 Thread Bruno Oliveira
Hello, thank you for your answaer. However, that does not have any effect :( 2016-05-13 11:13 GMT+01:00 Jannik Heller : > Hi, > > There may be some memory allocations left in the graphics driver. OSG does > all the OpenGL work from a background thread, so the memory used by OpenGL > can not be r

[osg-users] Clear scene data and underlying memory structures

2016-05-13 Thread Bruno Oliveira
Hello, I have spent a great deal of time trying to figure out OSG's memory management. I have a scene graph with several children (actually a LOD based on an octree). However, when I need to reset my scene (I just want to wipe ALL nodes from de scene and also wipe the memory), I use // Clear

Re: [osg-users] LOD capabilities

2016-04-26 Thread Bruno Oliveira
Robert, the tool I'm creating is designed to handle clouds from 100 million points to 1 billion, hence the out of core rendering. By "with the already existing code", I mean code from OSG. Thank you 2016-04-26 9:40 GMT+01:00 Robert Osfield : > Hi Bruno, > > On 26 Ap

  1   2   >