Re: [osg-users] More lights in scene!

2016-10-24 Thread Terry Welsh
Neat. I did the same thing for a game I wrote, but I used custom
shader-based lights instead of OpenGL lights, and I used 4 lights
instead of 8. The most interesting takeaway was that applying  shaders
for 0, 1, 2, 3, or 4 lights (5 different shaders) was very slow due to
shader swapping. The fastest combination I found was to only compile
shaders for 0 or 4 lights, and if I only needed to apply 1, 2, or 3
lights I could set some of their color uniforms to black.
--
Terry Welsh
http://www.reallyslick.com


>
> Hi,
>
> Check out my solution - no shaders needed: 
> http://forum.openscenegraph.org/viewtopic.php?t=15339
>
> Cheers,
> Jannik
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69123#69123
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osg stops rendering after deleting the final View/MultiView, even if I create a new one to replace it

2016-10-24 Thread Daniel Martin
Hi,

I've noticed that it seems like OSG stops rendering when I delete the last 
View/MultiView in my application. This makes sense, and I would expect that to 
happen!

However, if I create an new View/Multiview at some point after deleting the 
only available one, OSG still does not render. I was told this was a known bug 
with OSG, and was wondering if there have been any workarounds other than not 
deleting the last View/Multiview. 

Thank you!

Cheers,
Daniel

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





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


Re: [osg-users] More lights in scene!

2016-10-24 Thread Trajce Nikolov NICK
Nickolai,

here is good link I have started with, with code samples

http://www.ozone3d.net/tutorials/glsl_lighting_phong.php

On Mon, Oct 24, 2016 at 5:37 PM, Robert Osfield 
wrote:

> On 24 October 2016 at 16:20, Nickolai Medvedev 
> wrote:
> > I need colour of the surface geometry of objects in the scene.
>
> gl_Color with GL2, or osg_Color if you have enabled the vertex to
> vertex attrib aliasing.  This aliasing is on by default for GLcore or
> GLES2 profiles.
>
> Go look at the shaders in the OpenSceneGraph-Data/shader examples.
>
> Robert.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



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


Re: [osg-users] OSG with Qt on Android fails to render anything

2016-10-24 Thread michael kapelko
Hi. I'm actually here to ask for Android assistance.
Can you please describe your build environment?
1. Did you build with Android Studio?
2. Did you build static or shared OSG libs?
3. Did you build dependencies (libpng and others) yourself?

Thanks.

2016-10-24 16:32 GMT+07:00 Andrea Bracci :

> Hi reedev,
>
> many thanks for your sudden reply.
>
> I am able to run osgviewerQt on Windows without problems and without any
> patches to the GraphicsWindowQt.cpp code.
>
> However I have tried your solution on Android but it didn't solve the
> problem: I still see the blue screen inside a Qt window, without any object
> rendered on it.
>
> Thank you anyway!
>
> Andrea
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69136#69136
>
>
>
>
>
> ___
> 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] More lights in scene!

2016-10-24 Thread Robert Osfield
On 24 October 2016 at 16:20, Nickolai Medvedev  wrote:
> I need colour of the surface geometry of objects in the scene.

gl_Color with GL2, or osg_Color if you have enabled the vertex to
vertex attrib aliasing.  This aliasing is on by default for GLcore or
GLES2 profiles.

Go look at the shaders in the OpenSceneGraph-Data/shader examples.

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


Re: [osg-users] More lights in scene!

2016-10-24 Thread Nickolai Medvedev
I need colour of the surface geometry of objects in the scene.
I experiment with shaders and trying to create light sources with their help.
And, Robert, thank you for your patience.

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





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


[osg-users] passing uniforms to compute shader

2016-10-24 Thread Mary-Ann Zorra
Hi everyone, 

I am trying to write a functional compute shader, but the uniforms dont't want 
to work. 
I have a compute and a usual shader program currently. The compute shader has 
to write a texture, which can be read by the usual shader. This part works 
fine. But I would like to pass some (custom) uniforms (lights, amount of the 
light sources, projection/view matrix etc.). I use the same method by the two 
shaders, , but the data seems to arrive only by the usual shader program. 
I thought something could be wrong with the compute shader, but the texture 
data is there, so the communication is working. Should I pass the uniforms in 
an other way, when I have to send data to a compute shader? I can't figure it 
out, where is the mistake... 

Thanks a lot  :)
Mary-Ann

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





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


Re: [osg-users] More lights in scene!

2016-10-24 Thread Robert Osfield
HI Nickolai,

On 24 October 2016 at 11:37, Nickolai Medvedev  wrote:
> If we need diffuse lighting, we need get color of the scene, send him into 
> shader as uniform, then, for example, if we need point light, add color with 
> radius.
>
> So, question is: how to get our scene color? Need create light shader for 
> each light?

I really don't know what exactly you mean.  Are you already using
shaders for lighting?  Using old OpenGL fixed function for lighting?

What you mean by colour of the scene?  The colour of the light source?
 The colour of the surface geometry of objects in the scene?

I really can't provide answers to open ended questions.

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


Re: [osg-users] 32bit DEPTH for RTT

2016-10-24 Thread Trajce Nikolov NICK
Got a help offline from a friend on this ... So glad there are so cool
people on this list ...

Thanks all!

Nick

On Fri, Oct 21, 2016 at 3:54 PM, Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Hi readers to this thread ;-),
>
> I am close to resolve this but the math involved is a bit tricky for me to
> understand it right. And suddenly I can not send screenshots or videos
> publicly - maybe on private email to those willing to help.
>
> The story now is this:
>
> The environment is ECEF terrain, and I have light source. I am rendering
> to texture from this light source position/direction into a depth texture.
> The light matrix is computed now in view space, and is used against the
> view vertex in pixel shader, where the shadow projection is done. It gives
> non-flickering results, which is very good however the texture coords are
> wrong, and the missing part for me is the coorect texture coords
> computation from lightmatrix and vertex in view space.
>
> Any help is very appreciated !!!
>
> And thanks
>
> Nick
>
> On Thu, Oct 20, 2016 at 7:13 PM, Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com> wrote:
>
>> almost there .. the flickering is gone, just the shadow texture lookup
>> coordinates are messed up when used view space matrix and vertex.
>>
>> This is the code for constructing the final matrix:
>>
>>  osg::Matrixf lmvpm =
>> lightMatrixInViewSpace * osg::Matrixf(camera->getProjectionMatrix()) *
>> osg::Matrixf::translate(1, 1, 1) * osg::Matrixf::scale(0.5, 0.5,
>> 0.5);
>>
>> and the GLSL:
>>
>> vec4 projShadow = light.lmvpMatrix  * vVertexView;
>>
>> vec4 uvzw;
>> uvzw.xyw = projShadow.xyz;
>> uvzw.z = light.occlusionLayer-1;
>> float factor = texture( lightOcclusionTextureArray, uvzw );
>>
>> fDiffuseColor *= factor;
>>
>> if you spot anything ...
>>
>> Thanks so much Glenn!
>>
>>
>> On Thu, Oct 20, 2016 at 6:52 PM, Glenn Waldron 
>> wrote:
>>
>>> Up vector doesn't really matter, so just pick one like:
>>>
>>> side = cross(view_vec, (0,0,1));
>>> up = cross(side, view_vec);
>>>
>>>
>>>
>>> Glenn Waldron
>>>
>>> On Thu, Oct 20, 2016 at 12:00 PM, Trajce Nikolov NICK <
>>> trajce.nikolov.n...@gmail.com> wrote:
>>>
 Just last question .. What the 'up' vector would be now for making the
 light matrix in view space?

 On Thu, Oct 20, 2016 at 5:39 PM, Trajce Nikolov NICK <
 trajce.nikolov.n...@gmail.com> wrote:

> Glenn,
>
> this worked ... :-) ... Thanks for the hint ...
>
> On Thu, Oct 20, 2016 at 5:02 PM, Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com> wrote:
>
>> wops ..
>>
>> mx.makeLookAt(lightPosInViewSpace,lightPosInViewSpace+lightD
>> irInViewSpace,up)
>>
>> On Thu, Oct 20, 2016 at 5:00 PM, Trajce Nikolov NICK <
>> trajce.nikolov.n...@gmail.com> wrote:
>>
>>> Thanks Glenn,
>>>
>>> actually I was expecting this. I have the math to get the light
>>> direction in view space, just the construction of the light matrix in 
>>> view
>>> space hurts my head a bit ( I missed that part of the class :-) )
>>>
>>> vec3 lightDirInViewSpace;
>>> vec3 lightPosInViewSpace;
>>> mx.makeLookAt(lightPosInViewSpace,lightPosInViewSpace+lightP
>>> osInViewSpace,up)
>>>
>>> Something like this?
>>>
>>> On Thu, Oct 20, 2016 at 4:04 PM, Glenn Waldron 
>>> wrote:
>>>
 There's your precision loss, you can't do that with ECEF
 coordinates or they will be truncated.

 Better idea: build your light matrix in view space on the CPU
 (instead of world space), and then use it on the view-space vertex in 
 the
 shader. (You'll have to update it every time the camera moves, of 
 course.)


 Glenn Waldron

 On Thu, Oct 20, 2016 at 10:00 AM, Trajce Nikolov NICK <
 trajce.nikolov.n...@gmail.com> wrote:

> Hi Glenn,
>
> vec3 vVertex = vec3(gl_ModelViewMatrix * VertexMODEL);
> worldSpaceVertex = osg_ViewMatrixInverse * vec4( vVertex, 1.0 );
>
> Part of VP
>
> On Thu, Oct 20, 2016 at 3:52 PM, Glenn Waldron  > wrote:
>
>> Nick, how did you calculate "worldSpaceVertex"?
>>
>> Glenn Waldron
>>
>> On Thu, Oct 20, 2016 at 9:13 AM, Trajce Nikolov NICK <
>> trajce.nikolov.n...@gmail.com> wrote:
>>
>>> hehe .. ok :-) .. Maybe you give me a hint.
>>>
>>> I have F+ lighting (written by a friend of mine) and I have
>>> extended it so local lights cast shadows (a bit of complex code -
>>> relatively actually, but for me it is ;-) ). Works well for flat 
>>> terrains
>>> with reasonable sizes. I am trying to make it work with ECEF 
>>> terrain 

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

2016-10-24 Thread Bruno Oliveira
Thank you Robert for the extensive answer. I will test it today and provide
feedback ASAP. Unfortunately OSX support is a requirement for my software.

Thank you Tony for the link. I think you're right. It's probably some
marketing strategy.

2016-10-24 9:10 GMT+01:00 Tony Vasile :

> This may also help: http://stackoverflow.com/
> questions/19865463/opengl-4-1-under-mavericks . It seems the Apple have
> truly crippled their OpenGL support  or they want everyone to write
> Objective C under XCode.
>
> 
> Tony V
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69131#69131
>
>
>
>
>
> ___
> 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] Converting 3d Models to OSG type

2016-10-24 Thread Uma Devi Selvaraj
Hi,

  Thanks Sebastain :)

... 

Thank you!

Cheers,
Uma

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





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


Re: [osg-users] More lights in scene!

2016-10-24 Thread Nickolai Medvedev
Hi, Robert.

If we need diffuse lighting, we need get color of the scene, send him into 
shader as uniform, then, for example, if we need point light, add color with 
radius.


So, question is: how to get our scene color? Need create light shader for each 
light?

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





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


Re: [osg-users] Converting 3d Models to OSG type

2016-10-24 Thread Sebastian Messerschmidt

Hi Uma,



Hi all,

 I tried simple program to do conversion from 3d model to osg type. I 
tried to call osgconv using system() method. Here is my code.

Generalized one:
char *src = "D:/3D_Models/3D Model.obj";
char *dest = "D:/converted_Models/3D Model.osg";

Simply don't use char* here...


std::cout << "converting " << std::endl;

system("osgconv src dest");

Syntactically correct ;-)



std::cout << "Completed Conversion  :)" << std::endl;

Have i done any mistake in my code. Because I am getting message saying that no plug in to read 
"src" and "dest".
Yepp, that's literally what you called with the above. "osgconv src dst" 
is the string you put to the commandline.





If I do like this,

system("osgconv D:/3D_Models/3D_Model.obj   
D:/converted_Models/3D_Model.osg");

I am able to convert.

How will I change my code to generalize the conversion (like first method) so 
that i can get input and output from user ?.

If you really need to do it the crude way:
std::string src ("D:/3D_Models/3D Model.obj");
std::string dest("D:/converted_Models/3D Model.osg");

system(std::string("osgconv " + src + dst).c_str());


Cheers
Sebastian





...

Thank you!

Cheers,
Uma

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





___
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 with Qt on Android fails to render anything

2016-10-24 Thread Andrea Bracci
Hi reedev,

many thanks for your sudden reply.

I am able to run osgviewerQt on Windows without problems and without any 
patches to the GraphicsWindowQt.cpp code.

However I have tried your solution on Android but it didn't solve the problem: 
I still see the blue screen inside a Qt window, without any object rendered on 
it.

Thank you anyway!

Andrea

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





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


Re: [osg-users] OSG with Qt on Android fails to render anything

2016-10-24 Thread Raymond de Vries

Hi Andrea,

One question/test: have you been able to run osgviewerQt on Windows for 
instance? Usually, I need to patch src/osgQt/GraphicsWindowQt.cpp in 2 
locations in order to prevent illegal values for scaled_width and/or 
scaled_height:


void GLWidget::resizeEvent( QResizeEvent* event )
{
const QSize& size = event->size();

int scaled_width = static_cast(size.width()*_devicePixelRatio);
int scaled_height = static_cast(size.height()*_devicePixelRatio);

if (scaled_width <= 0 || scaled_height <= 0)
return;

_gw->resized( x(), y(), scaled_width,  scaled_height);
_gw->getEventQueue()->windowResize( x(), y(), scaled_width, 
scaled_height );

_gw->requestRedraw();
}

void GLWidget::moveEvent( QMoveEvent* event )
{
const QPoint& pos = event->pos();
int scaled_width = static_cast(width()*_devicePixelRatio);
int scaled_height = static_cast(height()*_devicePixelRatio);

if (scaled_width <= 0 || scaled_height <= 0)
return;

_gw->resized( pos.x(), pos.y(), scaled_width,  scaled_height );
_gw->getEventQueue()->windowResize( pos.x(), pos.y(), 
scaled_width,  scaled_height );

}

Without these checks nothing is rendered. Maybe this is the case for 
Android too?


hth,
Raymond



On 10/24/2016 11:11 AM, Andrea Bracci wrote:

Hi,

I'm trying to run a simple application using OSG + Qt on Android.

I have successfully built OSG Release 3.4.0 for Android (armeabi-v7a) and it 
successfully runs on Android as expected (I have run the example 
osgAndroidExampleGLES2 and it runs flawlessly). I have also successfully built 
osgQt for my Qt version 5.7.0, as well as the osgViewerQt example for Android 
armeabi-v7a.

However if I run osgviewerQt on my Android device (version 5.0.2, API 21) it 
fails to render anything, in a way similar to what I found at the following 
link:

http://lists.qt-project.org/pipermail/interest/2015-July/017869.html

In order to simplify the application I allocate a single QWidget (instead of 
the four ones contained in the original osgviewerQt example) loading a single 
osg::Node* from a file cessna.osg. I have verified that the cessna.osg file is 
successfully loaded through a qDebug() logging message on the value of the 
loaded pointer. On my Android device I see the OSG-default blue screen without 
any object.

As an additional information: I have successfully built and executed the Qt 
examples with OpenGLES on my Android device.

I have done an extensive web search but I didn't find the solution to my 
problem, nor anyone that successfully ran OSG + Qt on Android.

Can anyone tell me where am I wrong, or what steps shall I follow to make my 
OSG+Qt application to work on Android?

Thank you in advance for your kind replies!

Cheers,
Andrea

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





___
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 with Qt on Android fails to render anything

2016-10-24 Thread Andrea Bracci
Hi,

I'm trying to run a simple application using OSG + Qt on Android.

I have successfully built OSG Release 3.4.0 for Android (armeabi-v7a) and it 
successfully runs on Android as expected (I have run the example 
osgAndroidExampleGLES2 and it runs flawlessly). I have also successfully built 
osgQt for my Qt version 5.7.0, as well as the osgViewerQt example for Android 
armeabi-v7a.

However if I run osgviewerQt on my Android device (version 5.0.2, API 21) it 
fails to render anything, in a way similar to what I found at the following 
link:

http://lists.qt-project.org/pipermail/interest/2015-July/017869.html

In order to simplify the application I allocate a single QWidget (instead of 
the four ones contained in the original osgviewerQt example) loading a single 
osg::Node* from a file cessna.osg. I have verified that the cessna.osg file is 
successfully loaded through a qDebug() logging message on the value of the 
loaded pointer. On my Android device I see the OSG-default blue screen without 
any object.

As an additional information: I have successfully built and executed the Qt 
examples with OpenGLES on my Android device.

I have done an extensive web search but I didn't find the solution to my 
problem, nor anyone that successfully ran OSG + Qt on Android.

Can anyone tell me where am I wrong, or what steps shall I follow to make my 
OSG+Qt application to work on Android?

Thank you in advance for your kind replies!

Cheers,
Andrea

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





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


Re: [osg-users] [ANN] New 3rdParty precompiled package for Windows released

2016-10-24 Thread Torben Dannhauer
Robert,

don't worry, enjoy your week :)

Torben

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





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


[osg-users] Converting 3d Models to OSG type

2016-10-24 Thread Uma Devi Selvaraj
Hi all,

 I tried simple program to do conversion from 3d model to osg type. I 
tried to call osgconv using system() method. Here is my code.

Generalized one:
char *src = "D:/3D_Models/3D Model.obj";
char *dest = "D:/converted_Models/3D Model.osg";
  
std::cout << "converting " << std::endl;

system("osgconv src dest");

std::cout << "Completed Conversion  :)" << std::endl;

Have i done any mistake in my code. Because I am getting message saying that no 
plug in to read "src" and "dest".

If I do like this,

system("osgconv D:/3D_Models/3D_Model.obj   
D:/converted_Models/3D_Model.osg");   
 
I am able to convert. 

How will I change my code to generalize the conversion (like first method) so 
that i can get input and output from user ?.




... 

Thank you!

Cheers,
Uma

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





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


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

2016-10-24 Thread Tony Vasile
This may also help: 
http://stackoverflow.com/questions/19865463/opengl-4-1-under-mavericks . It 
seems the Apple have truly crippled their OpenGL support  or they want everyone 
to write Objective C under XCode.


Tony V

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





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


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

2016-10-24 Thread Robert Osfield
Hi Bruno,

Apple have made life difficult for OpenGL developers in the way they
have tackled modern OpenGL support so it tends to be awkward and
behind the curve on latest features.  It's the Apple way to mess
developers around though, unfortunately you just have accept the rough
with the smooth under OSX if you want to support it.  Personally I
wouldn't recommend OSX for OpenGL these days, so if you have choice
then Windows or Linux will likely lead to an easier life.

On the OSX front if you want to use the latest GL features you are
forced to use OpenGL core profile and dump all the backwards
compatibility support the other platforms provide.  So have to build
the OSG with the just the core profile enabled and fixed function
disabled, you'll also need to use the latest OSG dev work (master is
probably best) as it includes the VAO support you'll need.  The OSG
CMake system has an OPENGL_PROFILE var that you can set to GL3 or
GLCORE via:

   cmake OPENGL_PROFILE=GLCORE

If you are have already built the OSG then you'll want to remove the
previous CMakeCache.txt to make sure the CMake runs all setup afresh.

Once the OSG has been set up then you'll need to enable Vertex Array
Object usage by setting the osg::DisplaySetting::setVertexBufferHint()
with VERTEX_ARRAY_OBJECT prior to setting up the viewer i.e.

osg::DisplaySettings::instance()->setVertexBufferHint(osg::DisplaySettings::VERTEX_ARRAY_OBJECT);

osgViewer:Viewer viewer(..).
...


Or set the default value via the OSG_VERTEX_BUFFER_HINT to VERTEX_ARRAY_OBJECT.

Once the VAO work is more widely tested and debugged setting the VAO
hint on by default should be possible, but for now it's still a manual
step.

I realise this is a bit of pain, but that's down to the games that
Apple plays, provides sub par support and in a manner of it's choosing
not the type of solution that best fits the needs of developers.

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


Re: [osg-users] [ANN] New 3rdParty precompiled package for Windows released

2016-10-24 Thread Robert Osfield
Hi Torben,

Thanks for your efforts on the binary front.  One small post doesn't
quite do justice how much effort it is trying to tame all these 3rd
party projects.

On 22 October 2016 at 17:30, Torben Dannhauer  wrote:
> The corresponding adjustments in the OpenSceneGraph CMake files are submitted 
> and hopefully soon merged.

I'm just doing some OSG work that requires my full quota of brain
cells, once I've it figured out and got some experimental code checked
into an OSG branch I'll return to checking in things to master.  Might
take me a day or two, but for sure I'll get the CMake changes checked
in this week.

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


Re: [osg-users] converting any 3d models to osg,osgb or osgt

2016-10-24 Thread Uma Devi Selvaraj
Hi Trajce,


   Thanks for the reply :).

... 

Thank you!

Cheers,
Uma

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





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


Re: [osg-users] converting any 3d models to osg,osgb or osgt

2016-10-24 Thread Trajce Nikolov NICK
Hi Uma,

have a look at the osgconv code  it is very thin applet. What you do is
simply:

osg::Node* model = osgDB::readNodeFile("filename.ext");
osgDB::ReaderWriter::WriteResult result =
osgDB::Registry::instance()->writeNode(model,"fileNameOut.osgb");
or
osgDB::writeNodeFile(model,"fileNameOut.osgb");

On Mon, Oct 24, 2016 at 7:27 AM, Uma Devi Selvaraj 
wrote:

> Hi all,
>
>I need to convert 3d Models(.3ds,.ply,.obj,.. ) to osg or osgb or
> osgt using code. I know that by running "osgconv input output" command in
> console will do conversion. Is there any option using osgconv in c++ code.
> If so how to use osgconv in code ..??
>
> ...
>
> Thank you!
>
> Cheers,
> Uma
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69125#69125
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



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