[osg-users] LineSegmentIntersector and alpha-blended polygons

2009-10-30 Thread Matthew Hielsberg
Hi,

Does anyone know how to access the rgba texture values at the point of 
intersection in a polygon found using osgUtil::IntersectionVisitor and  
osgUtil::LineSegmentIntersector?  Ideally I would pass a threshold to the 
IntersectionVisitor so that it automatically skips intersecting polygons whose 
alpha values at the intersection point fall below the threshold.  Since this 
functionality does not seem to exist, I am wondering if there is another means 
available to find this information.  I am hoping that I do not have to write a 
new IntersectionVisitor.

Thank you!

Cheers,
Matthew

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





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


Re: [osg-users] How to take out and manipulate an object from an obj model

2009-10-30 Thread Robert Osfield
Hi Dat,

Finding specific children in a loaded scene graph is very common thing
to do, and one usually just write a custom NodeVisitor to do it.  Have
a look at the osgplanets and osgsimiulation examples for an example of
 FindNamedNodeVisitor - use this as a template and modify to
specialize it to your needs.

Robert.

On Thu, Oct 29, 2009 at 7:53 PM, Nguyen Tien Dat tienda...@gmail.com wrote:
 Dear all,
 I have an obj model of a supermarket that contains thousand of
 objects. I load the model into the scene graph as:
 osg::Node* loadedModel = osgDB::readNodeFile(supermarket_new.obj);
 Now I would like to take an object from the whole scene (a coke
 bottle, for example) and manipulate it. I would imagine that if I can
 scan though all the children of the node, and find one (by name for
 example), then I can take the node and change the transform matrix to
 manipulate it. But I don't know how.
 So my question is:
 - Is this possible to do what I want in OSG?
 - If the answer is yes, could you tell me how?
 Thanks,
 Dat
 ___
 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] GL3 / GLES2 symbols

2009-10-30 Thread Robert Osfield
Hi Paul,

On Thu, Oct 29, 2009 at 9:22 PM, Paul Martz pma...@skew-matrix.com wrote:
 Hi Robert -- I'm building against the GL3 header now, and many symbols are
 used in OSG that are deprecated in GL3, such as some of the TexGen symbols.
 So I checked to see what you do for the GLES2 case, and I found the
 following in the TexGen header:

 #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE)
    #define GL_OBJECT_LINEAR    0x2401
    #define GL_EYE_LINEAR       0x2400
    #define GL_SPHERE_MAP       0x2402
    #define GL_TEXTURE_GEN_S    0x0C60
    #define GL_TEXTURE_GEN_T    0x0C61
    #define GL_TEXTURE_GEN_R    0x0C62
    #define GL_TEXTURE_GEN_Q    0x0C63
 #endif

 If I understand correctly, these are currently non-functional. You've just
 added the definitions so that you can compile and link, and you'll add
 TexGen later (presumably with the ShaderGen utility). Is that correct?

Yes you've read my intention correctly.  My approach with the OpenGL
ES port has been to try and keen the public API of the OSG the same
across all OpenGL targets - so the libs will be as close to binary
compatible as we can get it.

One consequence of this approach is that while the public interface is
the same the implementation behind the scenes can be different, often
an non op, but while this will screw up the runtime behavior so
potentially cause bugs in your app if you just assume you can use
everything as before, it will at least mean that you can load the full
range of scene graphs and then search and replace elements that you
know aren't supported on your target of interest.  In effect I've
pushed the issue of support for non op elements on to application
developer to handle, but as the same time given them a basic tool for
going about fixing it.

 Should I do the same for GL3?

I believe that is the right thing to do.  Even though texgen for now
will be a non op under GL3, at least the osg::TexGen class will be
loaded and we can they detect this and use tools like ShaderGen to
convert to shader equivalents.

Further down the line I am thinking about whether we can do some
runtime work to map elements like TexGen to uniforms or runtime
modification of texture coordinates (for GLES1.x), this possibility
extends to the rest of the osg::StateAttribute that are non ops as
well.  All these StateAttribute are useful ways to control elements of
the rendering so not having them available in some way in GL3 and
GLES2 would be a handicap to OSG users.  However, solving these
problems is something I'm more than happy to leave until after the
basic GLES and GL3 ports.

Cheers,
Robert.

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


Re: [osg-users] Change to Optimizer OptimizationOptions

2009-10-30 Thread Ulrich Hertlein

On 29/10/09 10:55 PM, Paul Martz wrote:

Hi Robert -- The code submission by Wojciech and I for MSFBO has opened
a small can of worms on declaring bits and bitmasks. I hope you can
weigh in and put an end to the debate.

Originally, my submission followed the Optimizer's OptimizationOptions
pattern of declaring bit values in an enum, but declaring the bitmask
variable as an unsigned int.

In Wojciech's modified submission, he changed the bitmask variable to a
signed int, with the reasoning that enum values are also signed ints,
and this eliminates the need for a typecast to get rid of compiler
warnings.

This caused me to weigh in with the workaround of declaring the bit
values as static const unsigned int, and keeping the bitmask unsigned.
But this goes against the OSG precedent set with the Optimizer.


Just to add more confusion (and yet-another-solution):

StateAttribute defines 'enum Values { OFF, ON, PROTECT, OVERRIDE }' but also defines 
'typedef unsigned int GLModeValues'.


StateSet::setAttributeAndModes accepts an argument of GLModeValues which is supposed to 
contain bitwise-ored StateAttribute::Values.


As I remember there was never any controversy about doing it this way, although this isn't 
necessarily what you would like it to be (but C++ enums are broken in that respect).


Cheers,
/ulrich

PS: AFAIK StateSet/StateAttribute predate Optimizer ;-)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] [osgOcean] Error used osgOcean1.0 in MFC vc2005sp1

2009-10-30 Thread Tian Ma
Hi,
 
 I'am a new osgOcean user in China, My name is Tian Ma.

First,I established an empty osg+MFC project. NO ERROR!

   Then, I add oceanScene example files to the project, and delete 
the main() function
in the application.cpp file. Then errors emerge:

  c:\...\osgocean\oceanScene(213) : error C2059 : syntax error : ;
  c:\...\osgocean\oceanScene(223) : error C2059 : syntax error : ;

  In order to find the problems, I delete all the oceanScene example 
files, 
and just add code #include oceanScene head file to stdafx.h. But the 
same errors.

   Have you guys used osgOcean in MFC project? What may caused the problem?


Thank you!

Cheers,
mt

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





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


Re: [osg-users] [osgPPU] I have an OSG app to which I would like to add a second render pass...

2009-10-30 Thread Art Tevs
Hi Wyatt,

The main idea of osgPPU is to use input textures to process them. This can be 
used for rendering  as also for GPGPU. 

Take a look into HDR and Video examples. In the first one the input color 
buffer of the camera is used to apply HDR tone mapping and glow effect and then 
render it on the screen. In the second example input texture is used to be 
processed and then used as a texture on some quad. So as you can see, one can 
use osgPPU not only for outputing results to the screen but also to process a 
texture in between and then use it in usual rendering.

regards,
art



WyattEarp wrote:
 Hi,
 
 
 I have an OSG app to which I would like to add a second render pass.  I 
 render to a fbo hdr texture and I want to use a 2nd pass to process this 
 texture, then write out to another hdr texture, then display.  Is this the 
 sort of thing that osgPPU is meant for?  My app isn't a GPGPU app it is a 
 visual render app.
 
 Thank you!
 
 Cheers,
 Wyatt


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





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


Re: [osg-users] [osgOcean] Error used osgOcean1.0 in MFC vc2005sp1

2009-10-30 Thread Kim Bale
Hi Tian,

Try using the version in the trunk, there was a header conflict with
windows.h in 1.0 that has since been resolved.

Cheers.

Kim.



2009/10/30 Tian Ma tianxiao...@foxmail.com:
 Hi,

  I'am a new osgOcean user in China, My name is Tian Ma.

 First,I established an empty osg+MFC project. NO ERROR!

   Then, I add oceanScene example files to the project, and delete
 the main() function
 in the application.cpp file. Then errors emerge:

  c:\...\osgocean\oceanScene(213) : error C2059 : syntax error : ;
  c:\...\osgocean\oceanScene(223) : error C2059 : syntax error : ;

  In order to find the problems, I delete all the oceanScene example
 files,
 and just add code #include oceanScene head file to stdafx.h. But the
 same errors.

   Have you guys used osgOcean in MFC project? What may caused the problem?


 Thank you!

 Cheers,
 mt

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





 ___
 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] recent update-texture issue

2009-10-30 Thread Maurizio Lodo
some more info: the texture is generated with:


Code:
osg::TextureCubeMap* generateTexture()
{
// 2D image texture
osg::TextureCubeMap* texture = new osg::TextureCubeMap;
// load  images
osg::Image* frontTextureImage = 
osgDB::readImageFile(./texture/frontLarge.png);
osg::Image* backTextureImage = 
osgDB::readImageFile(./texture/backLarge.png);
osg::Image* leftTextureImage = 
osgDB::readImageFile(./texture/leftLarge.png);
osg::Image* rightTextureImage = 
osgDB::readImageFile(./texture/rightLarge.png);
osg::Image* topTextureImage = 
osgDB::readImageFile(./texture/topLarge.png);
osg::Image* bottomTextureImage = 
osgDB::readImageFile(./texture/bottomLarge.png);

// Assign the texture to the imagesread from file:
texture-setImage(osg::TextureCubeMap::POSITIVE_X,leftTextureImage);

texture-setImage(osg::TextureCubeMap::NEGATIVE_X,rightTextureImage);//swapped 
left and right to be consistent with OSG's throats orientation
texture-setImage(osg::TextureCubeMap::POSITIVE_Y,backTextureImage);
texture-setImage(osg::TextureCubeMap::NEGATIVE_Y,frontTextureImage);
texture-setImage(osg::TextureCubeMap::POSITIVE_Z,topTextureImage);
texture-setImage(osg::TextureCubeMap::NEGATIVE_Z,bottomTextureImage);

return texture;
}


 and in the main I have:

Code:
   
osg::TexGen *tg = new osg::TexGen;
tg-setMode(osg::TexGen::OBJECT_LINEAR);

// Create a StateSet with default settings:
osg::StateSet* stateOne = new osg::StateSet();


stateOne-setTextureAttributeAndModes(0,generateTexture(),osg::StateAttribute::ON);
stateOne-setTextureAttributeAndModes(0, tg, osg::StateAttribute::OVERRIDE 
| osg::StateAttribute::ON);



Can anyone suggest why would this stop working properly after the update? 
Cheers,
Maurizio.


PS the frontLarge.png does not display correctly in the forum preview.

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





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


Re: [osg-users] LineSegmentIntersector and alpha-blended polygons

2009-10-30 Thread J.P. Delport

Hi,

look at the intersection code in osgmovie. I think it gets the texture 
coords of intersection.


jp

Matthew Hielsberg wrote:

Hi,

Does anyone know how to access the rgba texture values at the point of 
intersection in a polygon found using osgUtil::IntersectionVisitor and  
osgUtil::LineSegmentIntersector?  Ideally I would pass a threshold to the 
IntersectionVisitor so that it automatically skips intersecting polygons whose 
alpha values at the intersection point fall below the threshold.  Since this 
functionality does not seem to exist, I am wondering if there is another means 
available to find this information.  I am hoping that I do not have to write a 
new IntersectionVisitor.

Thank you!

Cheers,
Matthew

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





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


--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


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


Re: [osg-users] LineSegmentIntersector and alpha-blended polygons

2009-10-30 Thread Jean-Sébastien Guay

Hello Matthew,


Does anyone know how to access the rgba texture values at the point of 
intersection in a polygon found using osgUtil::IntersectionVisitor and  
osgUtil::LineSegmentIntersector?  Ideally I would pass a threshold to the 
IntersectionVisitor so that it automatically skips intersecting polygons whose 
alpha values at the intersection point fall below the threshold.  Since this 
functionality does not seem to exist, I am wondering if there is another means 
available to find this information.  I am hoping that I do not have to write a 
new IntersectionVisitor.


I don't think you need to write a new intersector, just filter the 
intersections it returns with your criteria. I've never done what you 
want to do, but in theory, given what information 
osgUtil::LineSegmentIntersector::Intersection gives you, you should be 
able to compute the texture coordinates of the hit point (i.e. the hit 
point in texture space) and then sample the texture.


The general idea is:

You have the localIntersectionPoint, which is the intersection point in 
object space, you have the pointer to the drawable, and you have the 
primitiveIndex. Get the primitive's vertex positions and texture 
coordinates (there will be 3, 4 or more of each depending on if it's a 
triangle, a quad or a polygon - you can always choose to handle only 
triangles). Find where the intersection point lines within the primitive 
(which will be a linear combination of the 3, 4 or more vertices' 
coordinates), and then do a linear combination of the texture 
coordinates by the same ratios to find the texture coordinates at the 
intersection point.


Then find the texture that's applied to the drawable by starting in the 
drawable's stateset and if there's no texture, checking the parent(s) 
until you find one. Given that, you can sample the texture at those 
coordinates (perhaps filtering 2x2 or something) and you'll have what 
you need to make a decision to use that intersection or not. If not, 
then move on to the next one.


I wonder if there's any built-in functionality in OSG to do what I 
described above. I don't recall any, but I may have just never seen it. 
Or perhaps there's some code that does that somewhere in the examples. I 
hope in any case that someone can reply with more concrete information, 
as what I describe above is pretty general and you'll have to figure out 
the math yourself.


Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] GLSL tricks about texturing.

2009-10-30 Thread Ümit Uzun
Hi All,

May be my former question not much understandable. I want to try express my
problem again.
I have a 3D model which is created by Blender. As you guess, model has to
many texture on it. After I export my model in standard model type(3ds or
what else), I want to make per pixel shading on my model.

My question do I have to define all my texture in fragment shader as
uniform sampler2D xxx and bind this uniform in my related osg::Program one
by one to shade my model per pixel lightening? How can I reach related
pixel's texture value in fragment shader if I doesn't use sampler2D? For
example, now I can access to related pixel's texture value by;

uniform sampler2D diffuseTexture;
vec4 texture = texture2D(diffuseTexture,gl_TexCoord[0].st);


But if I doesn't define my sampler2D to related texture how can I access?

Thanks in advance.
Regards.

Ümit Uzun


2009/10/30 Ümit Uzun umituzu...@gmail.com

 Hi Folks,

 I am using PerPixel lighting on my some model which has created with
 Blender. My model has lots of textures on it. And my question is, do I have
 to send all textures in uniform variable to shader? That makes all think to
 complex, doesn't that? I have try to send only one texture to shader and saw
 that it can texture all of texture on my model instead of only send one.

 Then I realize that declared uniform sampler2 sampleTexture definition
 doesn't hold the related texture file. It only hold texture unit, I mean 0,1
 or 7. My question is what is the standart shadering operation when we have
 canned model? Should we send texture's to shader or what else? And sending
 texture is meaningless, because if we have ive or another texture integrated
 model what should we do this time? We haven't related texture separately?
 This time what should we send?

 Thanks in advance.
 Regards.

 Ümit Uzun

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


Re: [osg-users] GLSL tricks about texturing.

2009-10-30 Thread Jean-Sébastien Guay

Hi Ümit,

I am using PerPixel lighting on my some model which has created with 
Blender. My model has lots of textures on it. 


Do you mean that it has lots of textures to be applied to the same 
primitives (i.e. it needs lots of texture units) or just that it uses 
lots of texture *files* but only one (or a few) per primitive?


If the first case, then you need to figure out how many texture units 
your target video cards can handle (generally even older cards can 
handle 8 or 16) and make sure your shader is set up correctly to render 
the textures from your model in the same way as the model... For example 
sometimes unit 0 is the diffuse color texture, unit 1 might be a normal 
map, unit 2 a specular (gloss) map, unit 3 a lightmap, etc. You can set 
up a convention like that and then code your shader to take that into 
account.


And my question is, do I 
have to send all textures in uniform variable to shader? 


When you load the model, the state will have been set up so that your 
textures are applied for the appropriate node on the appropriate texture 
unit (depending on what the Blender exporter supports of course). All 
you need to do is set up a uniform sampler2D with a name and the value 
corresponding to the texture unit you want to use, and then in the 
shader, you use that sampler to do the texture lookup, i.e.


sampler2D samplerName;

void main(void)
{
  // ...
  vec4 textureColor = texture2D(samplerName, gl_TexCoord[0].st);
  // ...
}

That makes all 
think to complex, doesn't that? I have try to send only one texture to 
shader and saw that it can texture all of texture on my model instead of 
only send one.


I don't understand what you're trying to say here.

Then I realize that declared uniform sampler2 sampleTexture definition 
doesn't hold the related texture file. It only hold texture unit, I mean 
0,1 or 7.


See above, you don't need the texture itself in the shader, since the 
OpenGL state will have been set so that texture unit n holds the 
texture. Your sampler uniform and declaration in the shader associate a 
name to that unit number n, and then you use that name in your shader.


My question is what is the standart shadering operation when 
we have canned model? Should we send texture's to shader or what else? 


That's already done, the loader will set up the state so that the 
texture is in the appropriate node's stateset. All you need to do is add 
a uniform. For example, if your base color texture is always in unit 0 
(that's generally the case) then you can do


  osg::Uniform* sampler = new osg::Uniform(osg::Uniform::SAMPLER_2D, 
baseTexture);

  sampler-set(0);
  modelRoot-getOrCreateStateSet()-addUniform(sampler);

And sending texture is meaningless, because if we have ive or another 
texture integrated model what should we do this time? We haven't related 
texture separately? This time what should we send?


Once again, the actual state is set up by the loader, so you don't need 
to send anything. Just set up the uniforms.


Uniforms are inherited from root to children like any state, so if you 
always use texture unit 0 for the base texture for example, you can just 
set a single uniform on the root as above, and set the shader on the 
root as well (or have one shader for your whole scene, or however you 
want to manage it). If you need more control (such as setting a uniform 
on given nodes to control their appearance) then you can make a visitor 
that will go set uniforms on the right children of your model.


Hope that clears things up,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] GLSL tricks about texturing.

2009-10-30 Thread Jean-Sébastien Guay

Hi Ümit,

How can I reach 
related pixel's texture value in fragment shader if I doesn't use 
sampler2D? 


I don't understand why you would *not* use sampler2D? You always need a 
sampler to sample the texture in a shader.



But if I doesn't define my sampler2D to related texture how can I access?


You just need to create a uniform and set it correctly. Then you'll have 
a sampler. See my other message.


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG and QT problem

2009-10-30 Thread Maxim Gammer
Thank you for your answer.

I've tried everything you said, but the problem remains...

I went on with experiments and discovered that replacing

 osgViewer::Viewer-setDone(
true);
with

 osgViewer::Viewer  - setSceneData(0);
 osgViewer::Viewer  -frame();
 osgViewer::Viewer-setDone(true);

solves all discussed issues.

I'm not sure though that the call of setSceneData(0) is a correct
solution...

More over, textures on objects are good now, but textures on osgText
still have the same problems. On Widget destruction (in QT) and it's
recreation there are filled sqares insted of text (osgText)...

I wonder what else could be done?

Maxim Gammer


2009/10/29 Eric ZAREMBA eric.zare...@ersa-france.com

  Hi,



 I experiment this. I used an already displayed scene in another viewer. (I
 think you do not reload your nodes).

 So, they are a marker in the osg::Texture which indicates to unref the
 image after apply.

 I thinks it a save memory trick.

 But in our case, the image does not exist anymore when the scene is set to
 the second view.

 So, I wrote a visitor which look into each node of my graph and check the
 stateset.

 I apply it just after loading before insert it in my scene.



 So, my code:

 // osg::StateSet* stateset = …

 osg::StateAttribute* attribute = NULL;

 while( (attribute = stateset-getTextureAttribute(i,
 osg::StateAttribute::TEXTURE)) )

 {

   ++i;

   osg::Texture* tex = dynamic_castosg::Texture*(attribute);

   if( tex )

 tex-setUnRefImageDataAfterApply( false );

 }



 And all should work fine.



 Eric Z.


  --

 *De :* osg-users-boun...@lists.openscenegraph.org [mailto:
 osg-users-boun...@lists.openscenegraph.org] *De la part de* Maxim Gammer
 *Envoyé :* jeudi 29 octobre 2009 12:41
 *À :* OpenSceneGraph Users
 *Objet :* [osg-users] OSG and QT problem



 Hello,

 There is one problem while using OSGViewer in QT:
 first run of Widget goes just fine (1.jpg). After I close it and then
 create it again there is an incorrect picture (2.jpg).
 There is a suspicious chancks in debug info (1.txt and 2.txt):
  returning cached instanced of - tells us that an object wasn't
 deleted. I closed widget though.

 At the first run there are following strings in debug, but they dissapear
 at second run:

 --
 RegisterWindowingSystemInterfa

 ceProxy()
 X11WindowingSystemInterface()
 GraphicsContext::setWindowingSystemInterface() 0x1b26f200x7f39a7ccc890
 ---

 The following strings appear at the moment when I delete OSGViewer:

 
 Warning: deleting still referenced object 0x6b8d378 of type
 'PN3osg10ReferencedE'
  the final reference count was 2, memory corruption possible.
 


 OSG 2.8.2.
 QT 4.5.0

 Where to dig for a solution? Thanx in advance.



 --
 Maxim Gammer

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




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


Re: [osg-users] OSG and QT problem

2009-10-30 Thread Jean-Sébastien Guay

Hi Maxim,


More over, textures on objects are good now, but textures on osgText
still have the same problems. On Widget destruction (in QT) and it's
recreation there are filled sqares insted of text (osgText)...


I've seen this before on osgText, and the solution for me was to 
explicitly call releaseGLObjects() on the nodes that contain osgText 
objects. You can also try to call it on your scene root. This ensures 
that no stale OpenGL objects relating to the old graphics context exist, 
and will force the OSG objects to create new OpenGL objects for the new 
context on the first frame.


Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgOcean] Error used osgOcean1.0 in MFC vc2005sp1

2009-10-30 Thread Tian Ma

Kim Bale wrote:
 Hi Tian,
 
 Try using the version in the trunk, there was a header conflict with
 windows.h in 1.0 that has since been resolved.
 
 Cheers.
 
 Kim.
 
 
 
 2009/10/30 Tian Ma :
 
  Hi,
  
   I'am a new osgOcean user in China, My name is Tian Ma.
  
  First,I established an empty osg+MFC project. NO ERROR!
  
    Then, I add oceanScene example files to the project, and delete
  the main() function
  in the application.cpp file. Then errors emerge:
  
   c:\...\osgocean\oceanScene(213) : error C2059 : syntax error : ;
   c:\...\osgocean\oceanScene(223) : error C2059 : syntax error : ;
  
   In order to find the problems, I delete all the oceanScene example
  files,
  and just add code #include oceanScene head file to stdafx.h. But the
  same errors.
  
    Have you guys used osgOcean in MFC project? What may caused the problem?
  
  
  Thank you!
  
  THX a lot!
  
 I have solve the porblems, by note off two lines of code in error.
  
 I found that: the two lines of error code in oceanscean.h  had not 
  been used in anywhere, so I just delete them.
  
  
  Cheers,
  mt
  
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=18916#18916
  
  
  
  
  
  ___
  osg-users mailing list
  
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
 ___
 osg-users mailing list
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
  --
 Post generated by Mail2Forum


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





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


Re: [osg-users] GLSL tricks about texturing.

2009-10-30 Thread Ümit Uzun
Hi JS,

Thanks so much for your detailed explanations. I get your thinking. I have
known same think but I didn't sure very well.
My last question is, I have declared;
uniform sampler2D diffuseTexture;
in my fragment shader, although I didn't bind it to osg::Uniform in my main
application, I can sample my texture from my shader in Unit 0. Do you think
it is weird or not? You have said that; I only need to bind my uniform
sampler2d variable in my application to set to related stateset. I didn't
set to stateset too, but I get the unit 0 texture value from shader and can
see my model textured.

Thanks again.
Regards,

Ümit Uzun


2009/10/30 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com

 Hi Ümit,


  How can I reach related pixel's texture value in fragment shader if I
 doesn't use sampler2D?


 I don't understand why you would *not* use sampler2D? You always need a
 sampler to sample the texture in a shader.


  But if I doesn't define my sampler2D to related texture how can I access?


 You just need to create a uniform and set it correctly. Then you'll have a
 sampler. See my other message.


 J-S
 --
 __
 Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
 ___
 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] OSG and QT problem

2009-10-30 Thread Maxim Gammer
Thank you! )

2009/10/30 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com

 Hi Maxim,


  More over, textures on objects are good now, but textures on osgText
 still have the same problems. On Widget destruction (in QT) and it's
 recreation there are filled sqares insted of text (osgText)...


 I've seen this before on osgText, and the solution for me was to explicitly
 call releaseGLObjects() on the nodes that contain osgText objects. You can
 also try to call it on your scene root. This ensures that no stale OpenGL
 objects relating to the old graphics context exist, and will force the OSG
 objects to create new OpenGL objects for the new context on the first frame.

 Hope this helps,

 J-S
 --
 __
 Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/

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




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


Re: [osg-users] [osgOcean] Error used osgOcean1.0 in MFC vc2005sp1

2009-10-30 Thread Tian Ma
Thank you!

THX a lot!

   I have solve the porblems, by note off two lines of code in error.

   I found that: the two lines of error code in oceanscean.h  had not been 
used in anywhere, so I just delete them.


Cheers,
mt


tianxiao888 wrote:
 
 Kim Bale wrote:
  Hi Tian,
  
  Try using the version in the trunk, there was a header conflict with
  windows.h in 1.0 that has since been resolved.
  
  Cheers.
  
  Kim.
  
  
  
  2009/10/30 Tian Ma :
  
   Hi,
   
    I'am a new osgOcean user in China, My name is Tian Ma.
   
   First,I established an empty osg+MFC project. NO ERROR!
   
     Then, I add oceanScene example files to the project, and delete
   the main() function
   in the application.cpp file. Then errors emerge:
   
    c:\...\osgocean\oceanScene(213) : error C2059 : syntax error : ;
    c:\...\osgocean\oceanScene(223) : error C2059 : syntax error : ;
   
    In order to find the problems, I delete all the oceanScene example
   files,
   and just add code #include oceanScene head file to stdafx.h. But the
   same errors.
   
     Have you guys used osgOcean in MFC project? What may caused the problem?
   
   
   
   
   --
   Read this topic online here:
   http://forum.openscenegraph.org/viewtopic.php?p=18916#18916
   
   
   
   
   
   ___
   osg-users mailing list
   
   http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
   
   
  ___
  osg-users mailing list
  
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
   --
  Post generated by Mail2Forum
 


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





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


Re: [osg-users] GLSL tricks about texturing.

2009-10-30 Thread Jean-Sébastien Guay

Hi Ümit,


My last question is, I have declared;
uniform sampler2D diffuseTexture;
in my fragment shader, although I didn't bind it to osg::Uniform in my 
main application, I can sample my texture from my shader in Unit 0. Do 
you think it is weird or not?


You are relying on the value being set to 0 when it's undefined, which 
is not reliable. You should set it correctly. But as I said, you can set 
it once on the root node of your scene if that's sufficient for you. No 
need to set a uniform with the same name and the same value on every 
stateset of every model!


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPPU] I have an OSG app to which I would like to add a second render pass...

2009-10-30 Thread Wyatt Earp
I download the latest code from SVN, ran CMake to generate the proj
files, and tried to build it.

I am getting the following error (repeatedly):

OSG-2.8\include\osg/Export(17) : fatal error C1083: Cannot open
include file: 'osg/Config': No such file or directory

Maybe I didn't set the parameters in the CMake config process correctly.

Wyatt

On Fri, Oct 30, 2009 at 4:59 AM, Art Tevs arti_t...@yahoo.de wrote:
 Hi Wyatt,

 The main idea of osgPPU is to use input textures to process them. This can be 
 used for rendering  as also for GPGPU.

 Take a look into HDR and Video examples. In the first one the input color 
 buffer of the camera is used to apply HDR tone mapping and glow effect and 
 then render it on the screen. In the second example input texture is used to 
 be processed and then used as a texture on some quad. So as you can see, one 
 can use osgPPU not only for outputing results to the screen but also to 
 process a texture in between and then use it in usual rendering.

 regards,
 art



 WyattEarp wrote:
 Hi,


 I have an OSG app to which I would like to add a second render pass.  I 
 render to a fbo hdr texture and I want to use a 2nd pass to process this 
 texture, then write out to another hdr texture, then display.  Is this the 
 sort of thing that osgPPU is meant for?  My app isn't a GPGPU app it is a 
 visual render app.

 Thank you!

 Cheers,
 Wyatt


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





 ___
 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] GL3 / GLES2 symbols

2009-10-30 Thread Paul Martz
Hi Robert -- With my recent posting to osg-submissions, both osg and 
osgDB compile cleanly against the GL3 header.


What are your intentions with SceneView? With osgUtil in general?

Paul Martz
Skew Matrix Software LLC
_http://www.skew-matrix.com_ http://www.skew-matrix.com/
+1 303 859 9466

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


Re: [osg-users] GLSL tricks about texturing.

2009-10-30 Thread Ümit Uzun
Hi JS,

I will declare osg::Uniform on root node's stateset as you said.

Thanks so much.
Regards.

Ümit Uzun


2009/10/30 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com

 Hi Ümit,


  My last question is, I have declared;
 uniform sampler2D diffuseTexture;
 in my fragment shader, although I didn't bind it to osg::Uniform in my
 main application, I can sample my texture from my shader in Unit 0. Do you
 think it is weird or not?


 You are relying on the value being set to 0 when it's undefined, which is
 not reliable. You should set it correctly. But as I said, you can set it
 once on the root node of your scene if that's sufficient for you. No need to
 set a uniform with the same name and the same value on every stateset of
 every model!


 J-S
 --
 __
 Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
 ___
 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] [osgOcean] Is it possible to combine the effect of osgOcean to the terrain model which is build by VPB?

2009-10-30 Thread Adrian Egli OpenSceneGraph (3D)
Hi all

is there any example around the world, how we could integrate osgOcean into
Terrains ?

/adrian

2009/10/29 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com

 Hi Lv,


  I have build some terrain model by VPB(VirtualPlanetBuilder) which
 including some area of ocean.Is it possible to combine the effect of
 osgOcean to the terrain model which is build by VPB?


 VPB terrain, as long as it's not built in geocentric mode (i.e. as long as
 it's flat terrain), can be added as a child of the OceanScene just like any
 other terrain. VPB's LOD will work independently of osgOcean's LOD, but that
 shouldn't be a problem.

 If your terrain is round-earth, then as Kim said osgOcean will not work
 with it in its current form. I don't know precisely what's needed to adapt
 it. I guess we'd need to get some kind of curvature information from the
 terrain model, and make the ocean follow this curvature?

 If your terrain is flat, see the oceanExample in the osgOcean sources, it
 adds a terrain loaded from an .osg or .ive file (islands.ive I think) and
 adds it to the scene. You can do the same thing with your terrain.

 Hope this helps,


 J-S
 --
 __
 Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




-- 

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


Re: [osg-users] [osgPPU] I have an OSG app to which I would like to add a second render pass...

2009-10-30 Thread Art Tevs
The error is that osg installation could not be found. Check that you have osg 
also installed. The svn version of osgppu does only work with the current svn 
version of osg. If you have older osg version installed, then get the according 
osgppu version either from the svn tags repository or directly from osgppu 
webpage (projects.tevs.eu/osgppu).

Check also that CMake was able to find your osg installation. If you can see 
cmake variables like OSGxxx_LIBRARY_RELEASE set to NOT FOUND, then CMake was 
not able to find the installation. Then you have to set OSG_DIR variable to the 
path, where osg is installed in order to let cmake find it.

cheers,
art



WyattEarp wrote:
 I download the latest code from SVN, ran CMake to generate the proj
 files, and tried to build it.
 
 I am getting the following error (repeatedly):
 
 OSG-2.8\include\osg/Export(17) : fatal error C1083: Cannot open
 include file: 'osg/Config': No such file or directory
 
 Maybe I didn't set the parameters in the CMake config process correctly.
 
 Wyatt
 
 On Fri, Oct 30, 2009 at 4:59 AM, Art Tevs  wrote:
 
  Hi Wyatt,
  
  The main idea of osgPPU is to use input textures to process them. This can 
  be used for rendering  as also for GPGPU.
  
  Take a look into HDR and Video examples. In the first one the input color 
  buffer of the camera is used to apply HDR tone mapping and glow effect and 
  then render it on the screen. In the second example input texture is used 
  to be processed and then used as a texture on some quad. So as you can see, 
  one can use osgPPU not only for outputing results to the screen but also to 
  process a texture in between and then use it in usual rendering.
  
  regards,
  art
  
  
  
  WyattEarp wrote:
  
   Hi,
   
   
   I have an OSG app to which I would like to add a second render pass.  I 
   render to a fbo hdr texture and I want to use a 2nd pass to process this 
   texture, then write out to another hdr texture, then display.  Is this 
   the sort of thing that osgPPU is meant for?  My app isn't a GPGPU app it 
   is a visual render app.
   
   Thank you!
   
   Cheers,
   Wyatt
   
  
  
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=18917#18917
  
  
  
  
  
  ___
  osg-users mailing list
  
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
 ___
 osg-users mailing list
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
  --
 Post generated by Mail2Forum


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





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


Re: [osg-users] GL3 / GLES2 symbols

2009-10-30 Thread Robert Osfield
Hi Paul,

On Fri, Oct 30, 2009 at 3:54 PM, Paul Martz pma...@skew-matrix.com wrote:
 Supporting OSG's fixed function interface in precooked shaders will be
 complex. This is one reason why OpenGL designers deprecated the fixed
 function interface: too complex to support in drivers on programmable
 hardware.

The individual shaders and uniforms probably won't be so awkward, it's
the main() vertex and fragment shaders that glue them all together
that will be the part that will be the stumbling block.

My thought for the next stage would be to add support for osg_Light
etc. uniforms without worry any shaders, this will at least be one
step above not providing any support at all.

 Even more complex would be making it easy for developers to integrate their
 own shaders with the fixed-function-over-shaders later, so that their own
 shaders could simply call a function to compute per vertex lighting values,
 for example.

I think we should just bite away at this issue bit by bit.  The first
is to get the basics compiling without any cleverness w.r.t fixed
function pipeline, then as we get more experience and understanding of
the issue start introducing better support.  I believe we do need to
start providing reasonable equivalents for the fixed function pipeline
as otherwise we'll be just pushing far more complexity down on to the
application developers - they already have enough on their plate
without expecting them to recreate the whole fixed function pipeline
as well.

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


Re: [osg-users] [osgOcean] Is it possible to combine the effect of osgOcean to the terrain model which is build by VPB?

2009-10-30 Thread Jean-Sébastien Guay

Hi Adrian,

is there any example around the world, how we could integrate osgOcean 
into Terrains ?


The oceanExample that ships with osgOcean loads a terrain... So yes, 
there is an example. I'm not sure what else you want.


There was a discussion before and we stated that osgOcean does not 
support doing lakes and rivers... I guess unless you design your terrain 
so that the water level of all your lakes, rivers and oceans is exactly 
the same.


What exactly do you want to achieve?

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] GL3 / GLES2 symbols

2009-10-30 Thread Robert Osfield
On Fri, Oct 30, 2009 at 3:49 PM, Paul Martz pma...@skew-matrix.com wrote:
 Hi Robert -- With my recent posting to osg-submissions, both osg and osgDB
 compile cleanly against the GL3 header.

Thanks.  I'm now entering the final phase of the GLES port so should
soon get a breather to go do a submissions purge.

 What are your intentions with SceneView? With osgUtil in general?

Eventually SceneView will be made redundant by adding more
functionality into osgViewer, but for now I'm trying to minimize the
amount of code changes the GLES + GL3 ports will require over the
basic GL1+2 support.  This applies to the whole osgUtil and the rest
of the OSG for that matter.

FYI, I've now got the OSG running against a GLES 1.1 emulator and a
GLES 2.0 emulator.  Under GLES 1.1 I'm able to run most examples and
get something reasonable on screen most of the time. Under GLES 2.0
I'm just getting the OSG's sky blue background, nothing else.  I don't
know how close I am to getting something up on GLES 2.0, it could be a
one line tweak, or another weeks work...  However, once I do get GLES
2.0 up and working we can expect GLES 3.x to not be too far off either
;-)

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


Re: [osg-users] [osgPPU] I have an OSG app to which I would like to add a second render pass...

2009-10-30 Thread Wyatt Earp
Thanks,

I am using OSG 2.8.0 and the osgPPU from SVN.  Is that a problem?

Also... I clicked configure on the CMake panel, then proceeded to
point all of the OSGxxx_LIBRARY_RELEASE type vars to the correct
location/files.  I thought I set OSG_DIR to the root of my osg tree,
but I'll check.  I downloaded the zipped up OSG 2.8.0 and built it,
rather than using an installer.

W


On Fri, Oct 30, 2009 at 11:16 AM, Art Tevs arti_t...@yahoo.de wrote:
 The error is that osg installation could not be found. Check that you have 
 osg also installed. The svn version of osgppu does only work with the current 
 svn version of osg. If you have older osg version installed, then get the 
 according osgppu version either from the svn tags repository or directly from 
 osgppu webpage (projects.tevs.eu/osgppu).

 Check also that CMake was able to find your osg installation. If you can see 
 cmake variables like OSGxxx_LIBRARY_RELEASE set to NOT FOUND, then CMake was 
 not able to find the installation. Then you have to set OSG_DIR variable to 
 the path, where osg is installed in order to let cmake find it.

 cheers,
 art



 WyattEarp wrote:
 I download the latest code from SVN, ran CMake to generate the proj
 files, and tried to build it.

 I am getting the following error (repeatedly):

 OSG-2.8\include\osg/Export(17) : fatal error C1083: Cannot open
 include file: 'osg/Config': No such file or directory

 Maybe I didn't set the parameters in the CMake config process correctly.

 Wyatt

 On Fri, Oct 30, 2009 at 4:59 AM, Art Tevs  wrote:

  Hi Wyatt,
 
  The main idea of osgPPU is to use input textures to process them. This can 
  be used for rendering  as also for GPGPU.
 
  Take a look into HDR and Video examples. In the first one the input color 
  buffer of the camera is used to apply HDR tone mapping and glow effect and 
  then render it on the screen. In the second example input texture is used 
  to be processed and then used as a texture on some quad. So as you can 
  see, one can use osgPPU not only for outputing results to the screen but 
  also to process a texture in between and then use it in usual rendering.
 
  regards,
  art
 
 
 
  WyattEarp wrote:
 
   Hi,
  
  
   I have an OSG app to which I would like to add a second render pass.  I 
   render to a fbo hdr texture and I want to use a 2nd pass to process this 
   texture, then write out to another hdr texture, then display.  Is this 
   the sort of thing that osgPPU is meant for?  My app isn't a GPGPU app it 
   is a visual render app.
  
   Thank you!
  
   Cheers,
   Wyatt
  
 
 
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=18917#18917
 
 
 
 
 
  ___
  osg-users mailing list
 
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 
 ___
 osg-users mailing list

 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

  --
 Post generated by Mail2Forum


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





 ___
 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] Multiple Displays and vsync

2009-10-30 Thread Volker
Hi all,

this more a hardware/driver question than osg:

When multiple displays (all of them TFTs, same refresh rate 60Hz) are 
connected to one ore more graphic-boards on the same machine, are the vsyncs 
of these displays
 - always synchronized?
 - never synchronized?
 - a driver option?


In particular: on recent nvidia boards


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


Re: [osg-users] [osgPPU] I have an OSG app to which I would like to add a second render pass...

2009-10-30 Thread Art Tevs
Hi,


WyattEarp wrote:
 
 I am using OSG 2.8.0 and the osgPPU from SVN.  Is that a problem?
 

yes, it will be a problem. osgPPU from SVN needs some functionality of the very 
current osg. So, for you (osg v2.8.0) you better download osgPPU from the 
download section on the project webpage 
(http://projects.tevs.eu/osgppu/downloads/15)


 
 Also... I clicked configure on the CMake panel, then proceeded to
 point all of the OSGxxx_LIBRARY_RELEASE type vars to the correct
 location/files.  I thought I set OSG_DIR to the root of my osg tree,
 but I'll check.  I downloaded the zipped up OSG 2.8.0 and built it,
 rather than using an installer.
 

Yes OSG_DIR can be the root of your source tree as also installation path. The 
thing is that when you built osg it will place a Config file in your build 
directory. This will be copied to install directory when you install osg. If 
you do not install osg, then copy this Config file directly to other include 
files in your osg source tree.

art

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





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


[osg-users] TangentSpaceGenerator usage...

2009-10-30 Thread alessandro terenzi
I'm trying to use the TangentSpaceGenerator in order to apply a bump mapping
shader, but I cannot manage it to work properly. Having looked also at the
osgFX::BumpMapping effect, I used the visitor defined in BumpMapping in
order to find all the geodes and apply TangentSpaceGenerator on them, but if
I save the model to disk just before and after the generation has been
applied, I notice that in the .osg the arrays supposed to contain normals,
tangents and binormals are empty...here is the only part that is different
among the two .osg:

  VertexAttribBinding 1 PER_VERTEX
  VertexAttribNormalize 1 FALSE
  VertexAttribArray 1 Vec4Array 0
  {
  }
  VertexAttribBinding 6 PER_VERTEX
  VertexAttribNormalize 6 FALSE
  VertexAttribArray 6 Vec4Array 0
  {
  }
  VertexAttribBinding 7 PER_VERTEX
  VertexAttribNormalize 7 FALSE
  VertexAttribArray 7 Vec4Array 0
  {
  }

6 is supposed to be the TU of the tangent, 7 is for binormal attributes and
1 for the normal map textures. The model have textures coordinates set for
TU 0 that is associated to the diffuse map.

Maybe I'm missing some steps to setup properly everything...

Thanks in advance. Kind regards.
Alessandro
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] TangentSpaceGenerator usage...

2009-10-30 Thread Ümit Uzun
Hi Alessandro,

Try my bumpmapping sample from
http://www.fileden.com/files/2007/9/10/1423182/BumpMapping.rar

Hope this helps.

Ümit Uzun


2009/10/30 alessandro terenzi a.tere...@gmail.com

 I'm trying to use the TangentSpaceGenerator in order to apply a bump
 mapping shader, but I cannot manage it to work properly. Having looked also
 at the osgFX::BumpMapping effect, I used the visitor defined in BumpMapping
 in order to find all the geodes and apply TangentSpaceGenerator on them, but
 if I save the model to disk just before and after the generation has been
 applied, I notice that in the .osg the arrays supposed to contain normals,
 tangents and binormals are empty...here is the only part that is different
 among the two .osg:

   VertexAttribBinding 1 PER_VERTEX
   VertexAttribNormalize 1 FALSE
   VertexAttribArray 1 Vec4Array 0
   {
   }
   VertexAttribBinding 6 PER_VERTEX
   VertexAttribNormalize 6 FALSE
   VertexAttribArray 6 Vec4Array 0
   {
   }
   VertexAttribBinding 7 PER_VERTEX
   VertexAttribNormalize 7 FALSE
   VertexAttribArray 7 Vec4Array 0
   {
   }

 6 is supposed to be the TU of the tangent, 7 is for binormal attributes and
 1 for the normal map textures. The model have textures coordinates set for
 TU 0 that is associated to the diffuse map.

 Maybe I'm missing some steps to setup properly everything...

 Thanks in advance. Kind regards.
 Alessandro

 ___
 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] TangentSpaceGenerator usage...

2009-10-30 Thread alessandro terenzi
Thank you I'll have a look at it.

Anyway I think I managed to solve the problem, I think that the problem was
that I had texture coordinates set only for TU 0 while the
TangentSpaceGenerator requires coordinates for the normal map TU which I had
not.

Regards.
Alessandro

On Fri, Oct 30, 2009 at 6:23 PM, Ümit Uzun umituzu...@gmail.com wrote:

 Hi Alessandro,

 Try my bumpmapping sample from
 http://www.fileden.com/files/2007/9/10/1423182/BumpMapping.rar

 Hope this helps.

 Ümit Uzun


 2009/10/30 alessandro terenzi a.tere...@gmail.com

 I'm trying to use the TangentSpaceGenerator in order to apply a bump
 mapping shader, but I cannot manage it to work properly. Having looked also
 at the osgFX::BumpMapping effect, I used the visitor defined in BumpMapping
 in order to find all the geodes and apply TangentSpaceGenerator on them, but
 if I save the model to disk just before and after the generation has been
 applied, I notice that in the .osg the arrays supposed to contain normals,
 tangents and binormals are empty...here is the only part that is different
 among the two .osg:

   VertexAttribBinding 1 PER_VERTEX
   VertexAttribNormalize 1 FALSE
   VertexAttribArray 1 Vec4Array 0
   {
   }
   VertexAttribBinding 6 PER_VERTEX
   VertexAttribNormalize 6 FALSE
   VertexAttribArray 6 Vec4Array 0
   {
   }
   VertexAttribBinding 7 PER_VERTEX
   VertexAttribNormalize 7 FALSE
   VertexAttribArray 7 Vec4Array 0
   {
   }

 6 is supposed to be the TU of the tangent, 7 is for binormal attributes
 and 1 for the normal map textures. The model have textures coordinates set
 for TU 0 that is associated to the diffuse map.

 Maybe I'm missing some steps to setup properly everything...

 Thanks in advance. Kind regards.
 Alessandro

 ___
 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] GL3 / GLES2 symbols

2009-10-30 Thread Paul Martz

Robert Osfield wrote:

What are your intentions with SceneView? With osgUtil in general?


Eventually SceneView will be made redundant by adding more
functionality into osgViewer, but for now I'm trying to minimize the
amount of code changes the GLES + GL3 ports will require over the
basic GL1+2 support.  This applies to the whole osgUtil and the rest
of the OSG for that matter.


That's all fine.

What I really meant to say/ask was: Currently, SceneView doesn't compile 
for GL3 because of use of glMatrixMode, GL_PROJECTION, etc. So I looked 
to see how you handled this for GLES2, and I could not see that you were 
doing anything that would allow this code to compile on GLES2.


Can you point me to your GLES2 mods that make this code compile, or 
otherwise advise me on how to proceed with this class? Thanks.

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


Re: [osg-users] GL3 / GLES2 symbols

2009-10-30 Thread Robert Osfield
On Fri, Oct 30, 2009 at 5:32 PM, Paul Martz pma...@skew-matrix.com wrote:
 That's all fine.

 What I really meant to say/ask was: Currently, SceneView doesn't compile for
 GL3 because of use of glMatrixMode, GL_PROJECTION, etc. So I looked to see
 how you handled this for GLES2, and I could not see that you were doing
 anything that would allow this code to compile on GLES2.

Oh just disable the matrix paths by setting the
OSG_GL_MATRICES_AVAILABLE to OFF.

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


Re: [osg-users] Mac OS X Snow Leopard

2009-10-30 Thread Anderson, Ross - 1006 - MITLL
I use the OSG within a custom GUI, so I can't speak to using  
osgViewer, but the rest of the frameworks build fine for me on Snow  
Leopard. I use 10.5 as the SDK, so I'm not using any SL-specific APIs.


I have been using trunk in order to get the 64-bit Cocoa  
configurations within the Xcode project.


---
Ross Anderson
r...@ll.mit.edu
Group 106 - Active Optical Systems
MIT Lincoln Laboratory
(781) 981-3344


On Oct 30, 2009, at 12:55 PM, Paul Martz wrote:


Hi all -- I saw some submissions for building OSG on Snow Leopard. Are
these folded into trunk? Are there any Snow Leopard users who can  
report

on how things are going?

Is there any interest in folding these changes into the 2.8 branch and
doing a 2.8.3 release -- basically 2.8.2 plus support for Snow  
Leopard?

Does anyone have cycles to take this on?
--
Paul Martz
Skew Matrix Software LLC
_http://www.skew-matrix.com_ http://www.skew-matrix.com/
+1 303 859 9466

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




smime.p7s
Description: S/MIME cryptographic signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] [build] rotating a geometry?

2009-10-30 Thread Thomas Maier
Hi,

i build an L-shape-plate with a geode and a geometry, but it could also consist 
out of two plane-boxes, one box 90 degress folded up to the other. I get it to 
move around in the scene with setPosition() member function, but i wanna 
control the geometry, so that it e.g. rotates? How can i do that?

Thank you!

Cheers,
Thomas

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





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


Re: [osg-users] GL3 / GLES2 symbols

2009-10-30 Thread Paul Martz



Robert Osfield wrote:

On Fri, Oct 30, 2009 at 5:32 PM, Paul Martz pma...@skew-matrix.com wrote:

What I really meant to say/ask was: Currently, SceneView doesn't compile for
GL3 because of use of glMatrixMode, GL_PROJECTION, etc. So I looked to see
how you handled this for GLES2, and I could not see that you were doing
anything that would allow this code to compile on GLES2.


Oh just disable the matrix paths by setting the
OSG_GL_MATRICES_AVAILABLE to OFF.


Interesting. How did I screw _that_ up? If I figure out how that got 
flipped the wrong way, I'll let you know. I was sure that was all disabled.


Paul Martz
Skew Matrix Software LLC
_http://www.skew-matrix.com_ http://www.skew-matrix.com/
+1 303 859 9466


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


Re: [osg-users] [build] rotating a geometry?

2009-10-30 Thread Thomas Maier
Hi,

i can rotate an geometry when i  use
osg::PositionAttitudeTransform* rectangleTwoXForm =
new osg::PositionAttitudeTransform();

and add the geometry with
rectangleTwoXForm-addChild(rectangleGeode);

then i can rotate the rectangleTwoXForm with e.g.
rectangleTwoXForm-setAttitude(osg::Quat(osg::DegreesToRadians(-90.0), 
osg::Vec3(0,1,0) ) );


But i cannot do this (rotation) with the original geometry? theres no 
setAttitude() member func? 

i saw Quat class member func makeRotate, but i use Vec3 not e.g. Vec3d. i must 
check the difference of both. perhaps someone got a good example?


Thank you!

Cheers,
Thomas

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





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


Re: [osg-users] [osgPPU] I have an OSG app to which I would like to add a second render pass...

2009-10-30 Thread Wyatt Earp
what is the difference between OSG_INCLUDE_DIR and OSG_GEN_INCLUDE_DIR?

W

On Fri, Oct 30, 2009 at 12:08 PM, Art Tevs arti_t...@yahoo.de wrote:
 Hi,


 WyattEarp wrote:

 I am using OSG 2.8.0 and the osgPPU from SVN.  Is that a problem?


 yes, it will be a problem. osgPPU from SVN needs some functionality of the 
 very current osg. So, for you (osg v2.8.0) you better download osgPPU from 
 the download section on the project webpage 
 (http://projects.tevs.eu/osgppu/downloads/15)



 Also... I clicked configure on the CMake panel, then proceeded to
 point all of the OSGxxx_LIBRARY_RELEASE type vars to the correct
 location/files.  I thought I set OSG_DIR to the root of my osg tree,
 but I'll check.  I downloaded the zipped up OSG 2.8.0 and built it,
 rather than using an installer.


 Yes OSG_DIR can be the root of your source tree as also installation path. 
 The thing is that when you built osg it will place a Config file in your 
 build directory. This will be copied to install directory when you install 
 osg. If you do not install osg, then copy this Config file directly to other 
 include files in your osg source tree.

 art

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





 ___
 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] GL3 / GLES2 symbols

2009-10-30 Thread Robert Osfield
Hi Paul,

On Fri, Oct 30, 2009 at 6:17 PM, Paul Martz pma...@skew-matrix.com wrote:
 Oh just disable the matrix paths by setting the
 OSG_GL_MATRICES_AVAILABLE to OFF.

 Interesting. How did I screw _that_ up? If I figure out how that got flipped
 the wrong way, I'll let you know. I was sure that was all disabled.

I now realise that not all glMatrix code is protected by the
OSG_GL_MATRICES_AVAILABLE, and there are some code paths in SceneView
that enclose glMatrix code without other code that isn't possible to
support under GLES1 and GLES2 so I've just commented out the code
using the #if !define(OSG_GLES1_AVAILABLE) 
!defined(OSG_GLES2_AVAILABLE).  For these block you'll may well want
to do the same for GL3.

The types of code paths that are disabled in SceneView tend to be the
stencil based stereo effects.  I would like to see these rewritten at
a high level using the scene graph to do the work rather than low
level OpenGL calls, this way we'd be able to avoid tying the code to
specific GL targets.   In the case of stereo code it really should be
manage by slave cameras in osgViewer, so it possibly an opportunity
for us to start doing this for GLES x.x and GL3.x support for these
effects we're having to disable in SceneView.

For the time being just disable the compilation of this problem code
paths and chalk it down to something we'll need to re-implement later.

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


Re: [osg-users] [osgPPU] I have an OSG app to which I would like to add a second render pass...

2009-10-30 Thread Wyatt Earp
Everything, osgPPU, plugin and examples builds.  What is the
cudakernel project that Cmake generated?  Note of the files will open
in VS.

W


On Fri, Oct 30, 2009 at 12:08 PM, Art Tevs arti_t...@yahoo.de wrote:
 Hi,


 WyattEarp wrote:

 I am using OSG 2.8.0 and the osgPPU from SVN.  Is that a problem?


 yes, it will be a problem. osgPPU from SVN needs some functionality of the 
 very current osg. So, for you (osg v2.8.0) you better download osgPPU from 
 the download section on the project webpage 
 (http://projects.tevs.eu/osgppu/downloads/15)



 Also... I clicked configure on the CMake panel, then proceeded to
 point all of the OSGxxx_LIBRARY_RELEASE type vars to the correct
 location/files.  I thought I set OSG_DIR to the root of my osg tree,
 but I'll check.  I downloaded the zipped up OSG 2.8.0 and built it,
 rather than using an installer.


 Yes OSG_DIR can be the root of your source tree as also installation path. 
 The thing is that when you built osg it will place a Config file in your 
 build directory. This will be copied to install directory when you install 
 osg. If you do not install osg, then copy this Config file directly to other 
 include files in your osg source tree.

 art

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





 ___
 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] TerrainManipulator Questions

2009-10-30 Thread Allen Saucier
Hi,
 is osgkeyboardmouse a program?  Or a class?  osg::KeyboardMouse?


Here's my latest solution but still requires a hack at the moment:


bool CSceneMatrixManipulator::intersect(const osg::Vec3d start, 
  const osg::Vec3d end, osg::Vec3d intersection) const
{
  std::coutMy Intersect\n;
osg::ref_ptrosgUtil::LineSegmentIntersector lsi = new 
osgUtil::LineSegmentIntersector(start,end);

osgUtil::IntersectionVisitor iv(lsi.get());
iv.setTraversalMask(_intersectTraversalMask);

_node-accept(iv);
if (lsi-containsIntersections())
{
//  intersection = 
lsi-getIntersections().begin()-getWorldIntersectPoint(); // ori 102909 gas

  // ADDED to make terrainManipulator go-down-to the terrain; gas 102909
  //
  std::multiset  
osgUtil::LineSegmentIntersector::LineSegmentIntersector::Intersection::iterator
 itr=lsi-getIntersections().begin();
  
  std::cout # Intersects:= lsi-getIntersections().size()  
std::endl;
  
  // When used w/ a SKY DOME/Sphere taht acts as a sky dome, need to skip
  //  that vertex point and goto the terrain beneath it, which should be 
the 
  //  next intersection point/vertex. gas 102909
  //
  bool b_found=false;
  for (; itr!=lsi-getIntersections().end(); itr++)
  {
osg::NodePath np=itr-nodePath;
std::cout  nodePath size:= np.size()  std::endl;
for (osg::NodePath::iterator itrNp=np.begin(); itrNp!=np.end(); itrNp++)
{
  std::cout \tnode name:= (*itrNp)-getName()
  node addr := *itrNp  std::endl;
  if ( (m_sTerrainNodeName!=)  ((*itrNp)-getName() == 
m_sTerrainNodeName)) 
b_found=true;
  // HACK for now gas 103009
  if ((*itrNp)-getName() == theTerrainNode99191)
  {
b_found = true;
if (*itrNp == m_ognTerrainNode)
  std::cout  addresses match\n;
break;
  }// if foudn nmae
} // for ui

if (b_found) break;
  } // for itr
  
//  osg::NodePath np=itr-nodePath;
//  osg::NodePath::iterator itrNp=np.begin();
//  std::cout  nodePath size:= np.size()  std::endl;
//  for (unsigned ui=0; uinp.size(); ui++, itrNp++)
//std::cout node name1:= (*itrNp)-getName()
//node addr := *itrNp  std::endl;
//
//  itr++;
//  osg::NodePath np2=itr-nodePath;
//  osg::NodePath::iterator itrNp2=np2.begin();
//  std::cout  nodePath size:= np2.size()  std::endl;
//  for (unsigned ui=0; uinp2.size(); ui++, itrNp2++)
//std::cout node name2:= (*itrNp2)-getName()node addr 
:= *itrNp2  std::endl;
//
//  itr++;
//  osg::NodePath np3=itr-nodePath;
//  osg::NodePath::iterator itrNp3=np3.begin();
//  std::cout  nodePath size:= np3.size()  std::endl;
//  for (unsigned ui=0; uinp3.size(); ui++, itrNp3++)
//std::cout node name3:= (*itrNp3)-getName()node addr 
:= *itrNp3  std::endl;
  
  // Get rd intersection point which should be the terrain!
  //
  if (itr!=lsi-getIntersections().end()  b_found)
  {
std::cout got 3rd intersect point\n;
intersection = itr-getWorldIntersectPoint();
  }
  else
intersection = 
lsi-getIntersections().begin()-getWorldIntersectPoint();
  //
  // ADDED to make terrainManipulator go-down-to the terrain; gas 102909

  return true;
}
return false;
} // intersect




... 

Thank you!

Cheers,
Allen

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





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


Re: [osg-users] GL3 / GLES2 symbols

2009-10-30 Thread Paul Martz
Alright, we're now on the same page. I see the GLES2 check in SceneView, 
not sure how I missed it before. Thanks.


Changes for GL3 (and RenderStage.cpp also) posted to osg-submissions.

Paul Martz
Skew Matrix Software LLC
_http://www.skew-matrix.com_ http://www.skew-matrix.com/
+1 303 859 9466

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


Re: [osg-users] GL3 / GLES2 symbols

2009-10-30 Thread Paul Martz

Robert Osfield wrote:

Even more complex would be making it easy for developers to integrate their
own shaders with the fixed-function-over-shaders later, so that their own
shaders could simply call a function to compute per vertex lighting values,
for example.


I think we should just bite away at this issue bit by bit.


I guess this really falls into the new feature category, as it's not 
possible with OSG today on GL1/2 to mix FFP with app shaders. Therefore 
not a requirement for OSG FFP-emulator shaders to mix with app shaders. 
But definitely something to work towards.


 I think we should just bite away at this issue bit by bit.  The first
 is to get the basics compiling without any cleverness w.r.t fixed
 function pipeline, then as we get more experience and understanding of
 the issue start introducing better support.  I believe we do need to
 start providing reasonable equivalents for the fixed function pipeline
 as otherwise we'll be just pushing far more complexity down on to the
 application developers - they already have enough on their plate
 without expecting them to recreate the whole fixed function pipeline
 as well.

I think there are always going to be some developers that just want OSG 
to do everything for them, without having to think too much about it, 
and they will make heavy use of OSG FFP-emulator shaders. But there are 
also developers that want full control, more direct access to the 
hardware, with OSG used primarily for structure. Their numbers will grow 
as the paradigm shift away form an FFP mentality continues. As long as 
OSG can serve both groups' needs in an elegant manner that does not 
inhibit performance, the community will be happy.

   -Paul

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


[osg-users] Opening a GL3 context on MS Windows

2009-10-30 Thread Paul Martz

Hi Robert and all --

MS Windows, being the way it is, makes it not very straightforward to 
open an OpenGL3 context. I want to lay out my plans and solicit feedback.


GL3 requires a new entry point to create a GL3 context. As Microsoft has 
certainly not bothered to update their SDK to GL3, the only way to get 
access to the new context creation interface is to query for the 
extension and then call wglGetProcAddress. But of course this requires a 
current context first, so that the underlying device driver (which 
ultimately supports the new GL3 interface) is loaded and can be queried. 
So it's a chicken and egg problem.


When I ported FreeGLUT to GL3 on Windows 7 months ago, I did just as I 
described above: I created a regular GL1 context, made it current to an 
invisible window, and then queried for the GL3 context extension. Once I 
created the new context, I deleted the old one, along with the invisible 
Window, then carried on as usual with the rest of setup.


I'm inclined to implement this same mechanism in OSG unless someone has 
a better idea. Input welcome.


Thanks,
--
Paul Martz
Skew Matrix Software LLC
_http://www.skew-matrix.com_ http://www.skew-matrix.com/
+1 303 859 9466

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


Re: [osg-users] Opening a GL3 context on MS Windows

2009-10-30 Thread Wojciech Lewandowski

Hi Paul,

GL3 requires a new entry point to create a GL3 context. As Microsoft has 
certainly not bothered to update their SDK to GL3, the only way to get 
access to the new context creation interface is to query for the extension 
and then call wglGetProcAddress. But of course this requires a current 
context first, so that the underlying device driver (which ultimately 
supports the new GL3 interface) is loaded and can be queried. So it's a 
chicken and egg problem.


When I ported FreeGLUT to GL3 on Windows 7 months ago, I did just as I 
described above: I created a regular GL1 context, made it current to an 
invisible window, and then queried for the GL3 context extension. Once I 
created the new context, I deleted the old one, along with the invisible 
Window, then carried on as usual with the rest of setup.


I'm inclined to implement this same mechanism in OSG unless someone has a 
better idea. Input welcome.


Currently Windows GL context is created in similar way.  Have a look at 
GraphicsWindowWin32::setPixelFormat and 
Win32WindowingSystem::getSampleOpenGLContext. I believe you may use second 
method instead of first part of your plan.


Cheers,
Wojtek


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


Re: [osg-users] Opening a GL3 context on MS Windows

2009-10-30 Thread Chris 'Xenon' Hanson
Paul Martz wrote:
 GL3 requires a new entry point to create a GL3 context. 

  I have pinged an advanced GL expert I know on this question.

-- 
Chris 'Xenon' Hanson, omo sanza lettere  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
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


Re: [osg-users] Opening a GL3 context on MS Windows

2009-10-30 Thread Jolley, Thomas P
Hi Paul,

I think you have the right idea. 

 -Original Message-

 
 I'm inclined to implement this same mechanism in OSG unless 
 someone has a better idea. Input welcome.
 
 Thanks,
 --
 Paul Martz
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Opening a GL3 context on MS Windows

2009-10-30 Thread Paul Martz
Thanks Chris -- Someone who I thought knew OpenGL pretty well told me I 
was crazy to do it this way, but when pressed for an alternative, he was 
not forthcoming. Good to hear from Thomas and Wojciech that I'm on the 
right track.


Paul Martz
Skew Matrix Software LLC
_http://www.skew-matrix.com_ http://www.skew-matrix.com/
+1 303 859 9466



Chris 'Xenon' Hanson wrote:

Paul Martz wrote:
GL3 requires a new entry point to create a GL3 context. 


  I have pinged an advanced GL expert I know on this question.


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


Re: [osg-users] Opening a GL3 context on MS Windows

2009-10-30 Thread Jason Daly

Paul Martz wrote:
Thanks Chris -- Someone who I thought knew OpenGL pretty well told me I 
was crazy to do it this way, but when pressed for an alternative, he was 
not forthcoming. Good to hear from Thomas and Wojciech that I'm on the 
right track.
  


Hi, Paul,

I don't know of any other way to do this.  In our code, we call 
wglGetCurrentDC() to grab the current context of the calling thread.  If 
that fails, I believe all you can do is open a temporary window.



--J

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


Re: [osg-users] How do I simulate motion?

2009-10-30 Thread Ash Pat
Hi,

Thanks for the suggestions. I think the idea in both the responses was to get 
enough frames so that it doesn't complete in a fraction of a second. So I tried 
it but it still doesn't seem to work. I even inserted a wait time of a few 
seconds between the frames but it didn't help.

However, here are a couple of observations that seem odd. May be the scene is 
not picking up the transformation changes I made?

- When I have my 8 step (which is 8 frames) code, the node at the initial 
position is still there along with its position at the final step.
-  When I have the infinite loop of new positions (as suggested by others), the 
node doesn't move at all.

Is there a way to mark the scene graph dirty? I'm hoping that it would then 
force it to regen everything thus picking up the new position.

Thanks!

Regards,
Ash.

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





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