Re: [osg-users] GLSL shader problem: texture2D() multiplying with textureCube()

2011-08-02 Thread Sergey Polischuk
Hi, Joe

Seems like you mess up sampler uniforms setup. You unit declared as unsigned 
int, and osg uses different gl functions to set uniform with int and unsigned 
values (which is right thing), and samplers uniforms must be set with signed 
int version. So just cast it to int when use uniform-set(sampler) or redeclare 
as signed integers.

Cheers,
Sergey.

01.08.2011, 20:09, Joe Abreu pure...@hotmail.com:
 Jason Daly wrote:

  What hardware are you running on?  It's almost as if you don't have
  enough texture units (i.e.: more than one) to handle the operation...

 I'm running a NVidia GeForce GTX 460 on my i7 machine, I've done plenty of 
 other shader stuff  before with multiple textures, for some reason in this 
 example I'm running it just isn't working. It's the first time trying to link 
 to OSG 3.0.0, but I've tried linking back to the previous version of open 
 scene graph I was using (2.8.3) and it still doesn't work.

 Joe

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=41767#41767

 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OSG 3.0.1 on MacOSX 10.7 release issues

2011-08-02 Thread Marco Fiocco
Hi, I'm trying to compile OSG 3.0.1 on MacOSX Lion (10.7).
I got errors at compile time due to changes in some framework API.
But I haven't got any error if I define

CMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.6.sdk


If I compile using Makefiles and also define

CMAKE_BUILD_TYPE=Debug

CMAKE_OSX_ARCHITECTURES=x86_64

OSG_WINDOWING_SYSTEM=Cocoa


when I run osgviewerd with a model, works perfectly.


If I compile in release by changing

CMAKE_BUILD_TYPE=Release


when I run osgviewer nothing happens, seems running in background but the
rendering window does not appear!


Any hints?

Thx

Marco
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] GLSL shader problem: texture2D() multiplying with textureCube()

2011-08-02 Thread Joe Abreu

hybr wrote:
 Seems like you mess up sampler uniforms setup. You unit declared as unsigned 
 int, and osg uses different gl functions to set uniform with int and unsigned 
 values (which is right thing), and samplers uniforms must be set with signed 
 int version. So just cast it to int when use uniform-set(sampler) or 
 redeclare as signed integers.
 
You sir, are a legend. Thanks!

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41780#41780





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Difference between textures and images

2011-08-02 Thread Martin Großer
Hello,

there are a class image and a class texture (texture2D) in OpenSceneGraph. I 
would like to know what is the generell difference between an image and a 
texture? Why don't you only provide a texture class? Is the reason the texture 
is on the graphics card memory and the image on the cpu memory?

Cheers

Martin
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] NodeCallback

2011-08-02 Thread Martin Haffner
Hi,

Guys, you are great! Thanks to both of you for your good explanations!  :D 

Another little question: I guess a Camera::DrawCallback is a callback that gets 
added to a osg::Camera and that gets called (operator()) every time the camera 
renders the scene?

Thank you!

Cheers,
Martin

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41782#41782





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Difference between textures and images

2011-08-02 Thread Sergey Polischuk
Hi, Martin

Texture classes is just handle to opengl textures, they store filtering modes, 
texture coords wrap settings etc. They dont have buffer with actual texture 
data - thats what image for. You can load osg::Image data to opengl texture 
with use of osg::Texture, but image still hold data ownership and texture 
itself dont have this data.

Cheers,
Sergey.

02.08.2011, 14:23, Martin Großer grosser.mar...@gmx.de:
 Hello,

 there are a class image and a class texture (texture2D) in OpenSceneGraph. I 
 would like to know what is the generell difference between an image and a 
 texture? Why don't you only provide a texture class? Is the reason the 
 texture is on the graphics card memory and the image on the cpu memory?

 Cheers

 Martin

 --
 Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
 belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Tessellation

2011-08-02 Thread Glenn Waldron
Michael,

Perhaps you could use the osgUtil::DelauneyTriangulator to triangulate your
point mesh. This will create a convex mesh. You can try to use the
Constraints to define the boundaries, and then remove the exterior triangles
afterwards. Just an idea.

Glenn Waldron / Pelican Mapping / @glennwaldron


On Tue, Aug 2, 2011 at 3:55 AM, Michael Shikin xavier...@yandex.ru wrote:

 So, nobody knows how to solve my problem?  :(
 There're points designating borders of concave poly, and there're points
 inside this poly. How can I build correct concave surface with this data?

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=41777#41777




 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Tessellation

2011-08-02 Thread Sergey Kurdakov
Hi Michael,

you might want to use

http://tetgen.berlios.de/

it has examples - the triangulation will take just one call (it allows to
define contstrains in natural way ), or

http://gts.sourceforge.net/

or as it was advised use osgUtil::DelauneyTriangulator ( thouht I personally
never tried it ).

Regards
Sergey
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OSG Format : some explanations

2011-08-02 Thread Thomas Canipel
Hi all,

Just getting into a new convert for an exporter :

What I need : 
vertexPosition
vertexTextureCoords
vertexNormals
indices

I was able to find the vertexPosition easily, as for the texture coords and the 
normal ( taking for example the cow.osg) but I got an issue trying to deduce 
the indices.

Well the silution is probably on this part :

Code:

 DrawArrayLengths TRIANGLE_STRIP 0 984
{
  3,3,3,3 ...




I am not really aware of the information specify here ... can someone explain 
what is the information stored in that array ?



Thank you!

Cheers,
Thomas[/code]

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41786#41786





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG Format : some explanations

2011-08-02 Thread Torben Dannhauer
Hi Thomas,

Do you want ot parse the textfile? I think it would be more robust if you link 
against the OSG libraries and use the native acess functions instead parsing 
the plain file format yourself.

Cheers,
Torben

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41787#41787





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG Format : some explanations

2011-08-02 Thread Thomas Canipel
Actually, the main thing is just to understand the way the .osg format is 
holding the informations.

I dont know yet what I will have to export so as the main information to show 
something (doesnt matter of the tech) are the positions,the coord,the normals 
and the indices I tried to understand what was in the .osg file.


Cheers,
Thomas

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41788#41788





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OSG 2.8.3 3.0.1 view dependent shadow clipping plane

2011-08-02 Thread Cyril Bondue
Hello fellow coders :)

I'm asking for you help one more time. I have a problem with shadows, it seems 
like I have a view dependent shadow clipping plane.
I have an osgShadow::ShadowedScene with a city and a light following the player 
in it. The problem is that, when we move the camera, the shadows get clipped, 
as you can see in the attached screens, when the camera is high every buildings 
have a shadow, but when the camera gets to a human position then the clipping 
occurs :/ neither the models nor the light moved.
I have tried many different shadow technics but it happened for all of them, 
right now i use a osgShadow::MinimalShadowMap, i tried to change the 
minLightMargin with no success. I tried to change some parameters on the light 
or on the camera with no success either :( that's why i come here to ask for 
help!
I added the red line on the screens, to show the clipping plane position.
This happens with OSG 2.8.3 and OSG 3.0.1

Thank you!

Cheers,
Cyril

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41789#41789




Attachments: 
http://forum.openscenegraph.org//files/shadow_clippingplane_109.jpg


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG Format : some explanations

2011-08-02 Thread Robert Osfield
Hi Thomas,

On Tue, Aug 2, 2011 at 1:38 PM, Thomas Canipel thomas.cani...@gmail.com wrote:
 Actually, the main thing is just to understand the way the .osg format is 
 holding the informations.

I would recommend targetting to the new .osgx or .osgt formats
supported by OpenSceneGraph-3.0 as these formats are support by a
general purpose proporty serialization, the property serialization
defines the ordering.  You can also generate a schema from the format,
although I'll have to defer to the author of the new serializers for
an explanation of this side to the new formats.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG 2.8.3 3.0.1 view dependent shadow clipping plane

2011-08-02 Thread Robert Osfield
Hi Cyril,

I'm afraid I don't have an immeditate solutions for you but if you can
wait a few weeks I should hopefully have an improved view depedent
shadow technique implemented.

Robert.

On Tue, Aug 2, 2011 at 1:45 PM, Cyril Bondue c.bon...@cbbknet.com wrote:
 Hello fellow coders :)

 I'm asking for you help one more time. I have a problem with shadows, it 
 seems like I have a view dependent shadow clipping plane.
 I have an osgShadow::ShadowedScene with a city and a light following the 
 player in it. The problem is that, when we move the camera, the shadows get 
 clipped, as you can see in the attached screens, when the camera is high 
 every buildings have a shadow, but when the camera gets to a human position 
 then the clipping occurs :/ neither the models nor the light moved.
 I have tried many different shadow technics but it happened for all of them, 
 right now i use a osgShadow::MinimalShadowMap, i tried to change the 
 minLightMargin with no success. I tried to change some parameters on the 
 light or on the camera with no success either :( that's why i come here to 
 ask for help!
 I added the red line on the screens, to show the clipping plane position.
 This happens with OSG 2.8.3 and OSG 3.0.1

 Thank you!

 Cheers,
 Cyril

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=41789#41789




 Attachments:
 http://forum.openscenegraph.org//files/shadow_clippingplane_109.jpg


 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Question about TerrainManipulator

2011-08-02 Thread caijun2002108
Hello everyone!

I'm trying to write a Manipulator like TerrainManipulator.And My Manipulator is 
written by TerrainManipulator.When I read the codes in TerrainManipulator,I 
felt confused by some codes,such as:

   CoordinateFrame coordinateFrame = 
getCoordinateFrame(_center);
   _previousUp = getUpVector(coordinateFrame);

   osg::Matrixd rotation_matrix;
   rotation_matrix.makeRotate(_rotation);

   osg::Vec3d lookVector = -getUpVector(rotation_matrix);
   osg::Vec3d upVector = getFrontVector(rotation_matrix);

   CoordinateFrame coordinateFrame = 
getCoordinateFrame(_center);
   osg::Vec3d localUp = getUpVector(coordinateFrame);

I don't know the meaning of getCoordinateFrame.

Can anyone tell me the meaning? Thank you very much!






___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG 2.8.3 3.0.1 view dependent shadow clipping plane

2011-08-02 Thread Sebastian Messerschmidt

Hi Cyril,

have you tried setting the MinLightMargin of the shadowmap to a high value?
I didn't look to closely, but i recall having such problems when using 
the standard settings.
Also the LightSpacePerspective shadow mapping works very well for me, so 
maybe try this one for the bigger outdoor scenes.


cheers
Sebastian

Hello fellow coders :)

I'm asking for you help one more time. I have a problem with shadows, it seems like I 
have a view dependent shadow clipping plane.
I have an osgShadow::ShadowedScene with a city and a light following the player in it. 
The problem is that, when we move the camera, the shadows get clipped, as you can see in 
the attached screens, when the camera is high every buildings have a shadow, but when the 
camera gets to a human position then the clipping occurs :/ neither the 
models nor the light moved.
I have tried many different shadow technics but it happened for all of them, 
right now i use a osgShadow::MinimalShadowMap, i tried to change the 
minLightMargin with no success. I tried to change some parameters on the light 
or on the camera with no success either :( that's why i come here to ask for 
help!
I added the red line on the screens, to show the clipping plane position.
This happens with OSG 2.8.3 and OSG 3.0.1

Thank you!

Cheers,
Cyril

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41789#41789




Attachments:
http://forum.openscenegraph.org//files/shadow_clippingplane_109.jpg


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] GLSL shader problem: texture2D() multiplying with textureCube()

2011-08-02 Thread Jason Daly

On 08/02/2011 05:35 AM, Joe Abreu wrote:

hybr wrote:

Seems like you mess up sampler uniforms setup. You unit declared as unsigned int, 
and osg uses different gl functions to set uniform with int and unsigned values 
(which is right thing), and samplers uniforms must be set with signed int version. 
So just cast it to int when use uniform-set(sampler) or redeclare as signed 
integers.


You sir, are a legend. Thanks!



Wow, that's subtle.  Good eyes, Sergey!

--J

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] NodeCallback

2011-08-02 Thread Jason Daly

On 08/02/2011 07:44 AM, Martin Haffner wrote:

Hi,

Guys, you are great! Thanks to both of you for your good explanations!  :D

Another little question: I guess a Camera::DrawCallback is a callback that gets 
added to a osg::Camera and that gets called (operator()) every time the camera 
renders the scene?


Correct.  Also, note that there are four different places to attach 
Camera::DrawCallbacks (Initial, PreDraw, PostDraw, and Final).  Which 
one you use will depend on what you're doing in the callback.


For example, a FinalDrawCallback is a good place to capture the image of 
what the camera just drew.  This is what the osgscreencapture example 
demonstrates.


--J

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] GLSL shader problem: texture2D() multiplying with textureCube()

2011-08-02 Thread Sergey Polischuk
Once i spend several hours resolving same problem, now i know :D

02.08.2011, 20:10, Jason Daly jd...@ist.ucf.edu:
 On 08/02/2011 05:35 AM, Joe Abreu wrote:

  hybr wrote:
  Seems like you mess up sampler uniforms setup. You unit declared as 
 unsigned int, and osg uses different gl functions to set uniform with int 
 and unsigned values (which is right thing), and samplers uniforms must be 
 set with signed int version. So just cast it to int when use 
 uniform-set(sampler) or redeclare as signed integers.
  You sir, are a legend. Thanks!

 Wow, that's subtle.  Good eyes, Sergey!

 --J

 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Can't get osgText to display text using osgViewer::GraphicsWindow

2011-08-02 Thread Pau Estalella
Hi,

I'm trying to add text labels, and I haven't been able to get osgText to 
display what I want.  The rest of the scene shows correctly, it's only that 
text does not appear. I can display the bounding box and the alignment mark, 
not the text. A reduced version of my code is attached. 
I am using Qt 4.7.3, and the OSG from subversion r.12737, on a Linux machine.
Of the many things I may be doing wrong, which one is responsible for this 
behavior?
Thank you!

Cheers,
Pau

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41795#41795




Attachments: 
http://forum.openscenegraph.org//files/main_182.cpp
http://forum.openscenegraph.org//files/gosgview_181.h
http://forum.openscenegraph.org//files/gosgview_140.cpp


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] [build] Missing CURL_DEBUG_LIBRARY for Windows

2011-08-02 Thread Thomas Lerman
OSG-3.0.0: In CMAKE, it only has  CURL_LIBRARY (no DEBUG version). To get debug 
to work without crashing (heap corruption) in Windows (I am using VS2008), I 
had to go to the solution file and manually caused the debug version of 
osgdb_curl to use the debug version of curllib. I am not sure if I need to 
change any other places or if other libraries will have the same problem (such 
as zlib1).

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41770#41770





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] intersection with quad mesh: only 3 vertices returned

2011-08-02 Thread Torben Dannhauer
Hi,

I have a mesh of quads. If i intersect them, it hits the face and returns me 
the results (osgUtil::LineSegmentIntersector::Intersection result)

As I tried to access the indices I realized that it only returns 3 vertices.
( result.indexList.size() == 3 ) 
Is this a bug or do I miss something?
I would like to acces the 4 vertices of the quad to manipulate the vertex I 
intersect next to.

Thank you!

Cheers,
Torben

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41801#41801





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] intersection with quad mesh: only 3 vertices returned

2011-08-02 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Torben,

My guess is that the quads are geometrically represented by two
triangles with a shared edge. I believe the intersector is returning a
ray/triangle intersection so one (that is hit) of the two triangles that
make up the quad is being returned.

This probably doesn't solve your problem but it may explain why you're
getting only 3 vertexes on return...

-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Torben
Dannhauer
Sent: Tuesday, August 02, 2011 12:39 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] intersection with quad mesh: only 3 vertices
returned

Hi,

I have a mesh of quads. If i intersect them, it hits the face and
returns me the results (osgUtil::LineSegmentIntersector::Intersection
result)

As I tried to access the indices I realized that it only returns 3
vertices.
( result.indexList.size() == 3 ) 
Is this a bug or do I miss something?
I would like to acces the 4 vertices of the quad to manipulate the
vertex I intersect next to.

Thank you!

Cheers,
Torben

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41801#41801





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] intersection with quad mesh: only 3 vertices returned

2011-08-02 Thread Torben Dannhauer
Hi S2LR,

I thought QUAD is a OpenGL primitive. Your statement make sence to me. But then 
OSG hides the substitution by 2 triangles quite good, also in the wiremode of 
osgViewer the quads are displayed.

I thought (even when not to often used as triangles) that quads are natively 
supported and would work with intersections.

Cheers,
Torben

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41804#41804





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgb vs. ive ProxyNode database path

2011-08-02 Thread Pecoraro, Alexander N
I noticed that in the osgb format the database path of the ProxyNode is no 
longer determined at runtime. This is different than the ive format, which if 
you don't set the database path it will determine the database path by using 
the osgDB::Options' database path list. This was nice because it enalbed you to 
use a relative path in the file that contains the ProxyNode. Now that I've 
switched to the osgb format when I create a ProxyNode with a filename of 
./NameOfFile.osgb or just NameOfFile.osgb it won't load the file even 
though it is in the same directory as the file that contains the ProxyNode.

Is this behavior a bug or on purpose? If it is on purpose then I would say it 
seems a little inconsistent because the PagedLOD node in the osgb format still 
uses the Option's database path list to set the database path, so you can still 
have relative paths in the PagedLOD nodes, just not in the ProxyNodes.

Thanks.

Alex
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Custom Drawables

2011-08-02 Thread Jeremy Moles
Hello all! I am writing a custom Drawable that uses some new OpenGL
extension functions. I have an Extensions class (essentially copied from
the one defined in PixelBufferObject) that does the standard binding of
extension name string to function pointer.

However, these are members of the Extensions singleton, and to use them
in my drawImplementation, I am fetching the instance of Extensions and
using them thusly:

Extenions* ext = getExstensions();

ext-glCustomFunction(...)

My question is: is it good design to continue to use the paradigm, or
should export the functions into them global namespace and use them that
way instead? Furthermore, what is the advised way to handle cases where
the custom extension at hand isn't supported by your driver? I've been
simply OSG_WARN'ing in my drawImplementation and then immediately
returning.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] intersection with quad mesh: only 3 verticesreturned

2011-08-02 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
It is true that QUAD is an OpenGL primitive but the GL driver
tessellates it into two triangles underneath the hood.

As for how OSG handles quads relative to intersections, it is my
understanding that the intersector works with line/triangle
intersections. If you're trying to intersect a quad, however, it would
seem that if either of the two triangles is hit, 4 vertexes would/should
be returned. I haven't looked at the code to really know for sure.

-Shayne

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Torben
Dannhauer
Sent: Tuesday, August 02, 2011 1:14 PM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] intersection with quad mesh: only 3
verticesreturned

Hi S2LR,

I thought QUAD is a OpenGL primitive. Your statement make sence to me.
But then OSG hides the substitution by 2 triangles quite good, also in
the wiremode of osgViewer the quads are displayed.

I thought (even when not to often used as triangles) that quads are
natively supported and would work with intersections.

Cheers,
Torben

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41804#41804





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] using ClipNode to cut a model in two, then cap the open side

2011-08-02 Thread Alessandro Terenzi
I'm trying the Javier's CappingEffect example and it seems to work fine...but 
only when I look at the scene from one side...if I move the camera to the 
opposite side I still see the cappings that are drawn over my geometry (they 
should be hidden instead)...please refer to the attachments to see what I mean.

In order to use the CappingEffect I modified osgviewer in this way:


Code:
osg::ClipNode* clipnode = new osg::ClipNode;
osg::ClipPlane* clipplane = new osg::ClipPlane(); 
clipplane-setClipPlane(0, 1, 0, 1); 

clipnode-addClipPlane(clipplane);
clipnode-addChild(loadedModel.get());

CappingEffect* capping_effect = new CappingEffect;
capping_effect-addChild(clipnode);

scene-addChild(capping_effect);
viewer.setSceneData(scene);




How can I solve the issue?
Thanks.
Alessandro

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41807#41807




Attachments: 
http://forum.openscenegraph.org//files/capping_2_434.png
http://forum.openscenegraph.org//files/capping_1_109.png


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Reading in geotiff for Texture

2011-08-02 Thread Cary, Karl A.
I need to be able to read in a geotiff and use it as an osg::Texture. I
made sure I had libgdal built and installed and then rebuilt OSG against
it. I am then making a call to osgDB::readImageFile(pathToGeotiff). But
it always returns NULL. What am I missing here? Shouldn't I be able to
do this?

 

Karl

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] intersection with quad mesh: only 3 verticesreturned

2011-08-02 Thread Chris 'Xenon' Hanson
On 8/2/2011 2:49 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote:
 It is true that QUAD is an OpenGL primitive but the GL driver
 tessellates it into two triangles underneath the hood.
 As for how OSG handles quads relative to intersections, it is my
 understanding that the intersector works with line/triangle
 intersections. If you're trying to intersect a quad, however, it would
 seem that if either of the two triangles is hit, 4 vertexes would/should
 be returned. I haven't looked at the code to really know for sure.

  OSG's intersection code decomposes QUADs into triangles. Your result should be
interpreted as triangles, created in pairs from the original QUADs.

 -Shayne

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com 
http://www.alphapixel.com/
  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. 
Contracting.
There is no Truth. There is only Perception. To Perceive is to Exist. - 
Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org