Re: [osg-users] [build] CMake can not find include files

2018-06-03 Thread sam
If you're generating the cmake file through the cmake application then it
should be generated in your build folder. If you are using cmake on the
command line then you will need to pass cmake -G "Visual Studio XX" to the
command line, where XX is your Visual Studio version.

On Sun, Jun 3, 2018 at 4:19 PM Peter Klose  wrote:

> Hi,
> it seems my fault was to look into the "src" directory for the sources.
> With the cmakelists.txt file in the base directory openscenegraph cmake
> worked succesfully.
> Now it is only to find out how to find the project file for VC++ which
> might load the project into the IDE?
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=73934#73934
>
>
>
>
>
> ___
> 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] [build] CMake can not find include files

2018-06-03 Thread Peter Klose
Hi,
it seems my fault was to look into the "src" directory for the sources.
With the cmakelists.txt file in the base directory openscenegraph cmake worked 
succesfully.
Now it is only to find out how to find the project file for VC++ which might 
load the project into the IDE?

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





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


Re: [osg-users] [build] CMake can not find include files

2018-06-03 Thread Peter Klose
Hi Sam,
i do not have any binaries so i don't see any way to set a path to it?
I am trying to build binaries and my hope was the delivered cmakelists.txt 
would be the key for this. As Robert pointed out the cmakelists.txt file in the 
src/osg directory should do the job but it spits the weird error that a cmake 
command is unknown to cmake. Weird.



sam wrote:
> Hi Peter,
> 
> 
> Not sure how you're attempting to compile OSG but I'd recommend you'd do the 
> following:
> 
> 
> 
> 
> ​
> From here I would hit Configure and then Generate. Open up the ALL_BUILD 
> project and right-click OpenThreads and hit build. This will ensure all the 
> dependencies are in place.
> 
> 
> 
> 
> 
> 
> 
> On Sun, Jun 3, 2018 at 9:49 AM Robert Osfield < ()> wrote:
> 
> 
> > HI Peter,
> > 
> > It's the OpenSceneGraph/CMakeLists.txt that it the one you should open
> > in CMakeSetup.  All the CMakeLists.txt below this will rely upon all
> > the setting/includes that it sets up.
> > 
> > Robert.
> > 
> > 
> > 
> 
> 
>  --
> Post generated by Mail2Forum


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





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


Re: [osg-users] [build] CMake can not find include files

2018-06-03 Thread Peter Klose


robertosfield wrote:
> HI Peter,
> 
> It's the OpenSceneGraph/CMakeLists.txt that it the one you should open
> in CMakeSetup.  All the CMakeLists.txt below this will rely upon all
> the setting/includes that it sets up.
> 
> Robert.
> 
> 
> 


Hi Robert,

this is exactly the one i am referreing to and it is the one that spits out the 
error because of its last line saying :

SETUP_LIBRARY(${LIB_NAME}) 

How can a Cmake command be the cause for an error like this?
unknown cmake command

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





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


Re: [osg-users] [build] CMake can not find include files

2018-06-03 Thread sam
Hi Peter,

Not sure how you're attempting to compile OSG but I'd recommend you'd do
the following:

[image: osg1.png]
​
>From here I would hit Configure and then Generate. Open up the ALL_BUILD
project and right-click OpenThreads and hit build. This will ensure all the
dependencies are in place.



On Sun, Jun 3, 2018 at 9:49 AM Robert Osfield 
wrote:

> HI Peter,
>
> It's the OpenSceneGraph/CMakeLists.txt that it the one you should open
> in CMakeSetup.  All the CMakeLists.txt below this will rely upon all
> the setting/includes that it sets up.
>
> Robert.
>
>
> On 3 June 2018 at 13:30, Peter Klose  wrote:
> >
> > robertosfield wrote:
> >> Hi Peter,
> >>
> >> You shouldn't need to compile OpenThreads independently, just point
> >> CMakeSetup at OpenSceneGraph/CMakeLists.txt and OpenThreads will be
> >> built alongside the rest of the OSG.
> >>
> >> Robert.
> >>
> >>  --
> >> Post generated by Mail2Forum
> >
> >
> > Hi Robert,
> > i have changed the source path in Cmake to the "osg" subdirectory as you
> suggested, but now comes another error unknown cmake command
> > "SETUP_LIBRARY"
> >
> > The C compiler identification is MSVC 18.0.21005.1
> > The CXX compiler identification is MSVC 18.0.21005.1
> > Check for working C compiler: C:/Program Files/Microsoft Visual Studio
> 12.0/VC/bin/cl.exe
> > Check for working C compiler: C:/Program Files/Microsoft Visual Studio
> 12.0/VC/bin/cl.exe -- works
> > Detecting C compiler ABI info
> > Detecting C compiler ABI info - done
> > Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio
> 12.0/VC/bin/cl.exe
> > Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio
> 12.0/VC/bin/cl.exe -- works
> > Detecting CXX compiler ABI info
> > Detecting CXX compiler ABI info - done
> > Detecting CXX compile features
> > Detecting CXX compile features - done
> > CMake Error at CMakeLists.txt:460 (SETUP_LIBRARY):
> >   Unknown CMake command "SETUP_LIBRARY".
> >
> >
> > CMake Warning (dev) in CMakeLists.txt:
> >   No cmake_minimum_required command is present.  A line of code such as
> >
> > cmake_minimum_required(VERSION 3.11)
> >
> >   should be added at the top of the file.  The version specified may be
> lower
> >   if you wish to support older CMake versions for this project.  For more
> >   information run "cmake --help-policy CMP".
> > This warning is for project developers.  Use -Wno-dev to suppress it.
> >
> > Configuring incomplete, errors occurred!
> > See also
> "C:/0_Arbeiten/OpenSceneGraph/BuildMSV2013/CMakeFiles/CMakeOutput.log".
> >
> > --
> > Read this topic online here:
> > http://forum.openscenegraph.org/viewtopic.php?p=73926#73926
> >
> >
> >
> >
> >
> > ___
> > 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] TriangleStrip mesh is not smooth...

2018-06-03 Thread Mike Raider
Hi,

Thank you Robert...

Here is how I create the mesh:

float column_x_loc = -(LAND_WIDTH * LAND_TRIANGLE_WIDTH)/2; 
float column_z_loc =  -(LAND_DEPTH * LAND_TRIANGLE_DEPTH)/2
float column_y_loc = DETAIL_TERRAIN_FLOOR;

for (int c = 0;c < LAND_WIDTH;c++)
{
 for (int r = 0; r < LAND_DEPTH;r++)   
{
(*terrain)[thisIndex][0] = column_x_loc;
(*terrain)[thisIndex][1] = column_z_loc;
(*terrain)[thisIndex][2] = column_y_loc;


(*terrain_colors)[thisIndex][0] = 46.0f/256.0f;
(*terrain_colors)[thisIndex][1] = 76.0f/256.0f;
(*terrain_colors)[thisIndex][2] =  
100.0f/256.0f; 
(*terrain_colors)[thisIndex][3] = 0.3f;

column_z_loc += LAND_TRIANGLE_DEPTH;
thisIndex++;
}
}

On an update I move all of the rows back one and replace the 1 row with new 
data.
I use a transparent_weight value to have older data disappear as it is updated.

float transparent_weight = 1.0;   
float transparent_adjustment = 0.02;
for (int r = 0; r < LAND_DEPTH - 1; r++)
{
transparent_weight = 0.1;
for (int c = 1;c < 50; c++)
{
col_index = (c * LAND_WIDTH);
(*terrain)[col_index + r][2] = 
(*terrain)[col_index + r + LAND_WIDTH][2];
(*terrain_colors)[col_index  + r][0] = 
(*terrain_colors)[col_index  + r + LAND_WIDTH][0];
 (*terrain_colors)[col_index  + r][1] = 
(*terrain_colors)[col_index  + r + LAND_WIDTH][1];
 (*terrain_colors)[col_index  + r][2] = 
(*terrain_colors)[col_index  + r + LAND_WIDTH][2];
 (*terrain_colors)[col_index  + r][3] = 
transparent_weight;//(*terrain_colors)[col_index  + r + LAND_WIDTH][3];
 transparent_weight += 
transparent_adjustment;
}

}

The data at the first row is always smooth.  I get missing triangles only in 
the middle or rear of the terrain.

Any suggestions are welcome.  I have the program working the way I want if I 
can get this mesh problem solved.


Thank you again!

Cheers,
Mike

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





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


Re: [osg-users] TriangleStrip mesh is not smooth...

2018-06-03 Thread Robert Osfield
Hi Mike,

You don't provide any details about how you've created the mesh,
whether you've loaded it from some loader, you've use some util from
the OSG or other 3rd party tool or done it by hand yourself.  Given we
know nothing about how you've created the mesh there isn't much can do
to help advice how to resolve the issues.

Robert.



On 3 June 2018 at 17:30, Mike Raider  wrote:
> Hi,
>
> I have a TriangleStrip mesh that I use for a simple data collection app to 
> show data changes in real time.
>
> Most of the time the mesh looks very clean and smooth.  However, sometimes 
> the triangles look like spikes and not smooth.  I do not understand why the 
> mesh is broken by the spikes.  Can you suggest a solution?  Also my mesh is 
> only 500 x 500 triangle, is there a better way to implement a mesh this size?
>
>
> ...
>
> Thank you!
>
> Cheers,
> Mike[/img]
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=73927#73927
>
>
>
>
> ___
> 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] [build] CMake can not find include files

2018-06-03 Thread Robert Osfield
HI Peter,

It's the OpenSceneGraph/CMakeLists.txt that it the one you should open
in CMakeSetup.  All the CMakeLists.txt below this will rely upon all
the setting/includes that it sets up.

Robert.


On 3 June 2018 at 13:30, Peter Klose  wrote:
>
> robertosfield wrote:
>> Hi Peter,
>>
>> You shouldn't need to compile OpenThreads independently, just point
>> CMakeSetup at OpenSceneGraph/CMakeLists.txt and OpenThreads will be
>> built alongside the rest of the OSG.
>>
>> Robert.
>>
>>  --
>> Post generated by Mail2Forum
>
>
> Hi Robert,
> i have changed the source path in Cmake to the "osg" subdirectory as you 
> suggested, but now comes another error unknown cmake command
> "SETUP_LIBRARY"
>
> The C compiler identification is MSVC 18.0.21005.1
> The CXX compiler identification is MSVC 18.0.21005.1
> Check for working C compiler: C:/Program Files/Microsoft Visual Studio 
> 12.0/VC/bin/cl.exe
> Check for working C compiler: C:/Program Files/Microsoft Visual Studio 
> 12.0/VC/bin/cl.exe -- works
> Detecting C compiler ABI info
> Detecting C compiler ABI info - done
> Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio 
> 12.0/VC/bin/cl.exe
> Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio 
> 12.0/VC/bin/cl.exe -- works
> Detecting CXX compiler ABI info
> Detecting CXX compiler ABI info - done
> Detecting CXX compile features
> Detecting CXX compile features - done
> CMake Error at CMakeLists.txt:460 (SETUP_LIBRARY):
>   Unknown CMake command "SETUP_LIBRARY".
>
>
> CMake Warning (dev) in CMakeLists.txt:
>   No cmake_minimum_required command is present.  A line of code such as
>
> cmake_minimum_required(VERSION 3.11)
>
>   should be added at the top of the file.  The version specified may be lower
>   if you wish to support older CMake versions for this project.  For more
>   information run "cmake --help-policy CMP".
> This warning is for project developers.  Use -Wno-dev to suppress it.
>
> Configuring incomplete, errors occurred!
> See also 
> "C:/0_Arbeiten/OpenSceneGraph/BuildMSV2013/CMakeFiles/CMakeOutput.log".
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=73926#73926
>
>
>
>
>
> ___
> 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] TriangleStrip mesh is not smooth...

2018-06-03 Thread Mike Raider
Hi,

I have a TriangleStrip mesh that I use for a simple data collection app to show 
data changes in real time.

Most of the time the mesh looks very clean and smooth.  However, sometimes the 
triangles look like spikes and not smooth.  I do not understand why the mesh is 
broken by the spikes.  Can you suggest a solution?  Also my mesh is only 500 x 
500 triangle, is there a better way to implement a mesh this size? 


... 

Thank you!

Cheers,
Mike[/img]

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



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


Re: [osg-users] [build] CMake can not find include files

2018-06-03 Thread Peter Klose


robertosfield wrote:
> Hi Peter,
> 
> You shouldn't need to compile OpenThreads independently, just point
> CMakeSetup at OpenSceneGraph/CMakeLists.txt and OpenThreads will be
> built alongside the rest of the OSG.
> 
> Robert.
> 
>  --
> Post generated by Mail2Forum


Hi Robert,
i have changed the source path in Cmake to the "osg" subdirectory as you 
suggested, but now comes another error unknown cmake command
"SETUP_LIBRARY"

The C compiler identification is MSVC 18.0.21005.1
The CXX compiler identification is MSVC 18.0.21005.1
Check for working C compiler: C:/Program Files/Microsoft Visual Studio 
12.0/VC/bin/cl.exe
Check for working C compiler: C:/Program Files/Microsoft Visual Studio 
12.0/VC/bin/cl.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio 
12.0/VC/bin/cl.exe
Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio 
12.0/VC/bin/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
CMake Error at CMakeLists.txt:460 (SETUP_LIBRARY):
  Unknown CMake command "SETUP_LIBRARY".


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

cmake_minimum_required(VERSION 3.11)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP".
This warning is for project developers.  Use -Wno-dev to suppress it.

Configuring incomplete, errors occurred!
See also "C:/0_Arbeiten/OpenSceneGraph/BuildMSV2013/CMakeFiles/CMakeOutput.log".

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





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


Re: [osg-users] VBO Bug with 3.6.1 and Normal Arrays

2018-06-03 Thread Robert Osfield
On 3 June 2018 at 11:11, Robert Osfield  wrote:
> Hi Dan,
>
> On 1 June 2018 at 16:01, Daniel Emminizer, Code 5773
>  wrote:
>> Attached is a demo of the problem that generates a console warning.  More 
>> complex scenes can cause crashes.  The red triangle has the problem, but the 
>> green one does not.
>
> I have built the example, and to help with test have changed the
> #ifdef blocks to ones that check arguments.read("--ro") for the
> RealizerOperation usage and "--reset" for the
> resetVertexAttributeAlias.   Attached is the modified file.

I have tried the test program against the OpenSceneGraph-3.4 branch
and it behaves the same for all command line options.  This doesn't
tell us much other than that there is regression between 3.4 and 3.6.
I haven't tried master yet.

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


Re: [osg-users] [build] CMake can not find include files

2018-06-03 Thread Robert Osfield
Hi Peter,

You shouldn't need to compile OpenThreads independently, just point
CMakeSetup at OpenSceneGraph/CMakeLists.txt and OpenThreads will be
built alongside the rest of the OSG.

Robert.

On 3 June 2018 at 11:51, Peter Klose  wrote:
> Hi,
>
> i am trying to build OSG with MS Visual Studio 2013 on Windows7.
> I have downloaded the latest release from git, same with CMake, but it seems 
> that there are some files missing?
> Any helb would be appreciated.
>
> Thank you!
>
> Cheers,
> Peter
>
> the cmake-messages:
> --
> The C compiler identification is MSVC 18.0.21005.1
> The CXX compiler identification is MSVC 18.0.21005.1
> Check for working C compiler: C:/Program Files/Microsoft Visual Studio 
> 12.0/VC/bin/cl.exe
> Check for working C compiler: C:/Program Files/Microsoft Visual Studio 
> 12.0/VC/bin/cl.exe -- works
> Detecting C compiler ABI info
> Detecting C compiler ABI info - done
> Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio 
> 12.0/VC/bin/cl.exe
> Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio 
> 12.0/VC/bin/cl.exe -- works
> Detecting CXX compiler ABI info
> Detecting CXX compiler ABI info - done
> Detecting CXX compile features
> Detecting CXX compile features - done
> CMake Error at OpenThreads/CMakeLists.txt:13 (INCLUDE):
>   INCLUDE could not find load file:
>
> CheckAtomicOps
>
>
> CMake Error: File 
> C:/0_Arbeiten/OpenSceneGraph/src/PlatformSpecifics/Windows/OpenThreadsVersionInfo.rc.in
>  does not exist.
> CMake Error at OpenThreads/CMakeLists.txt:42 (CONFIGURE_FILE):
>   CONFIGURE_FILE Problem configuring file
>
>
> Looking for pthread.h
> Looking for pthread.h - not found
> Found Threads: TRUE
> CMake Error: File 
> C:/0_Arbeiten/OpenSceneGraph/src/packaging/pkgconfig/openthreads.pc.in does 
> not exist.
> CMake Error at OpenThreads/CMakeLists.txt:111 (CONFIGURE_FILE):
>   CONFIGURE_FILE Problem configuring file
>
>
> CMake Error at osg/CMakeLists.txt:460 (SETUP_LIBRARY):
>   Unknown CMake command "SETUP_LIBRARY".
>
>
> CMake Warning (dev) in CMakeLists.txt:
>   No cmake_minimum_required command is present.  A line of code such as
>
> cmake_minimum_required(VERSION 3.11)
>
>   should be added at the top of the file.  The version specified may be lower
>   if you wish to support older CMake versions for this project.  For more
>   information run "cmake --help-policy CMP".
> This warning is for project developers.  Use -Wno-dev to suppress it.
>
> Configuring incomplete, errors occurred!
> See also 
> "C:/0_Arbeiten/OpenSceneGraph/BuildMSV2013/CMakeFiles/CMakeOutput.log".
> See also 
> "C:/0_Arbeiten/OpenSceneGraph/BuildMSV2013/CMakeFiles/CMakeError.log".
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=73923#73923
>
>
>
>
>
> ___
> 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] [build] CMake can not find include files

2018-06-03 Thread Peter Klose
Hi,

i am trying to build OSG with MS Visual Studio 2013 on Windows7.
I have downloaded the latest release from git, same with CMake, but it seems 
that there are some files missing?
Any helb would be appreciated.

Thank you!

Cheers,
Peter

the cmake-messages:
--
The C compiler identification is MSVC 18.0.21005.1
The CXX compiler identification is MSVC 18.0.21005.1
Check for working C compiler: C:/Program Files/Microsoft Visual Studio 
12.0/VC/bin/cl.exe
Check for working C compiler: C:/Program Files/Microsoft Visual Studio 
12.0/VC/bin/cl.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio 
12.0/VC/bin/cl.exe
Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio 
12.0/VC/bin/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
CMake Error at OpenThreads/CMakeLists.txt:13 (INCLUDE):
  INCLUDE could not find load file:

CheckAtomicOps


CMake Error: File 
C:/0_Arbeiten/OpenSceneGraph/src/PlatformSpecifics/Windows/OpenThreadsVersionInfo.rc.in
 does not exist.
CMake Error at OpenThreads/CMakeLists.txt:42 (CONFIGURE_FILE):
  CONFIGURE_FILE Problem configuring file


Looking for pthread.h
Looking for pthread.h - not found
Found Threads: TRUE  
CMake Error: File 
C:/0_Arbeiten/OpenSceneGraph/src/packaging/pkgconfig/openthreads.pc.in does not 
exist.
CMake Error at OpenThreads/CMakeLists.txt:111 (CONFIGURE_FILE):
  CONFIGURE_FILE Problem configuring file


CMake Error at osg/CMakeLists.txt:460 (SETUP_LIBRARY):
  Unknown CMake command "SETUP_LIBRARY".


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

cmake_minimum_required(VERSION 3.11)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP".
This warning is for project developers.  Use -Wno-dev to suppress it.

Configuring incomplete, errors occurred!
See also "C:/0_Arbeiten/OpenSceneGraph/BuildMSV2013/CMakeFiles/CMakeOutput.log".
See also "C:/0_Arbeiten/OpenSceneGraph/BuildMSV2013/CMakeFiles/CMakeError.log".

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





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


Re: [osg-users] VBO Bug with 3.6.1 and Normal Arrays

2018-06-03 Thread Robert Osfield
Hi Dan,

On 1 June 2018 at 16:01, Daniel Emminizer, Code 5773
 wrote:
> Attached is a demo of the problem that generates a console warning.  More 
> complex scenes can cause crashes.  The red triangle has the problem, but the 
> green one does not.

I have built the example, and to help with test have changed the
#ifdef blocks to ones that check arguments.read("--ro") for the
RealizerOperation usage and "--reset" for the
resetVertexAttributeAlias.   Attached is the modified file.

If you run the test with --ro and have it use the custom
RealizerOperation I see a completely red cessna.  If I used --ro and
--reset I see multi-colour (blue, red etc) one, if I run without any
options I see the multi-colour one.

I don't see any command line warnings though.  I'm testing under
Kubuntu with OSG-3.6 branch, my drive info is:

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 760/PCIe/SSE2
OpenGL core profile version string: 4.5.0 NVIDIA 384.111
OpenGL core profile shading language version string: 4.50 NVIDIA

I don't yet have any idea what is going wrong, it's obviously very odd
that the custom RealizeOperation is having an effect when it does
nothing itself.

Before I start diving deeper I'd like to know what others are seeing
with these different combinations and if any errors are being printed
in the console, if so what are they.  Also let us know the OSG version
and driver/OS details.

Robert.
#include 
#include 
#include 
#include 

osg::Node* createTriangle(float x, bool earlyBinding, const osg::Vec4f& color)
{
osg::Geode* geode = new osg::Geode;
osg::Geometry* geom = new osg::Geometry;
geom->setUseVertexArrayObject(true);
geom->setUseVertexBufferObjects(true);

osg::Vec3Array* vertices = new osg::Vec3Array();
vertices->push_back(osg::Vec3(x - 100, 0, -100));
vertices->push_back(osg::Vec3(x, 0, 100));
vertices->push_back(osg::Vec3(x, 0, -100));

osg::Vec3Array* normals = new osg::Vec3Array;
normals->push_back(osg::Vec3(0, -1, 0));
normals->push_back(osg::Vec3(0, -1, 0));
normals->push_back(osg::Vec3(0, -1, 0));
if (earlyBinding)
normals->setBinding(osg::Array::BIND_PER_VERTEX);

osg::Vec4Array* colors = new osg::Vec4Array(osg::Array::BIND_OVERALL);
colors->push_back(color);

geom->addPrimitiveSet(new osg::DrawArrays(GL_TRIANGLES, 0, 3));
geom->setVertexArray(vertices);
geom->setNormalArray(normals);
geom->setColorArray(colors);
geode->addDrawable(geom);

// Warning gets generated due to this line not causing (eventually) a VBO creation
if (!earlyBinding)
normals->setBinding(osg::Array::BIND_PER_VERTEX);
return geode;
}

osg::Node* createScene()
{
osg::Group* group = new osg::Group;

// Reddish: Generates warning
group->addChild(createTriangle(-100, false, osg::Vec4f(1, 0.5, 0.5, 1)));

// Greenish: No warnings
group->addChild(createTriangle(100, true, osg::Vec4f(0.5,1,0.5,1)));

return group;
}

int main(int argc, char** argv)
{
osg::ArgumentParser arguments(, argv);

// construct the viewer.
osgViewer::Viewer viewer(arguments);
viewer.setSceneData(createScene());
viewer.setUpViewInWindow(100, 100, 800, 600);
viewer.addEventHandler(new osgViewer::StatsHandler());

return viewer.run();
}
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org