Re: [osg-users] SVN Access Fails

2015-04-12 Thread Sergey Kurdakov
Hi Dave,

take a look at these downloads

http://www.osgvisual.org/projects/osgvisual/wiki/Downloads

Regards
Sergey

On Sun, Apr 12, 2015 at 8:00 PM, Dave Sargrad davidsarg...@hotmail.com
wrote:

 Hmm...

 So I've downloaded the 3rd party dependencies and have placed them in to
 my OSG root directory: C:\osg\OpenSceneGraph-3.2.2-rc2


 Hence they are in the following location:
 C:\osg\OpenSceneGraph-3.2.2-rc2\3rdParty_x86_x64

 I have rerun cmake (both configure and generate):

 I would expect to see the following plugin enabled in the solution:
 C:\osg\OpenSceneGraph-3.2.2-rc2\src\osgPlugins\freetype

 However I dont.

 I also tried pointing the following CMAKE attribute to the newly installed
 freetype dependecy:
 FREETYPE_INCLUDE_DIR_freetype2 -
 C:\osg\OpenSceneGraph-3.2.2-rc2\3rdParty_x86_x64\x64\include


 I have also verified that the following CMAKE attribute is enabled:
 USE_3RDPARTY_BIN

 Any other pointers relative to getting this plugin built?

 Thank you!

 Cheers,
 Dave

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





 ___
 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] Master compilation error with MinGW / C++11

2015-04-11 Thread Sergey Kurdakov
Hi Philippe,

the error was recently discussed in osg-submissions mailing list
http://forum.openscenegraph.org/viewtopic.php?t=14750postdays=0postorder=ascstart=15
see posts by Wojtek
 and as far as I remember there was a fix,
so check code
if not - try to apply  fixes and also submit them again.

Regards
Sergey

On Fri, Apr 10, 2015 at 7:53 PM, philippe renon philippe_re...@yahoo.fr
wrote:

 Hi,

 I recently pulled master and I am seeing the error below.
 Seems like c++ 11 is now mandatory. Is that voluntary?

 Philippe.

 [ 89%] Building CXX object
 src/osgPlugins/osgjs/CMakeFiles/osgdb_osgjs.dir/Animation.obj
 In file included from
 d:/Projects/OpenPilotTools/qt-5.4.1/Tools/mingw491_32/i686-w64-mingw32/include/c++/cstdint:35:0,

  from
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:34,
  from
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\Animation.cpp:12:
 d:/Projects/OpenPilotTools/qt-5.4.1/Tools/mingw491_32/i686-w64-mingw32/include/c++/bits/c++0x_warning.h:32:2:
 error: #er
 ror This file requires compiler and library support for the ISO C++ 2011
 standard. This support is currently experimental, and must be enabled with
 the -std=c++11 or -std=gnu++11 compiler options.
  #error This file requires compiler and library support for the \
   ^
 In file included from
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\Animation.cpp:12:0:
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:94:67:
 error: 'uint8_t' was not declared in this sc
 ope
  void encodeArrayAsVarintBuffer(osg::Array const*,
 std::vectoruint8_t) const;
^
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:94:74:
 error: template argument 1 is invalid
  void encodeArrayAsVarintBuffer(osg::Array const*,
 std::vectoruint8_t) const;

 ^
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:94:74:
 error: template argument 2 is invalid
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:96:39:
 error: 'uint8_t' was not declared in this sc
 ope
  void dumpVarintVector(std::vectoruint8_t, T const*, bool) const;
^
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:96:46:
 error: template argument 1 is invalid
  void dumpVarintVector(std::vectoruint8_t, T const*, bool) const;
   ^
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:96:46:
 error: template argument 2 is invalid
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:98:38:
 error: 'uint8_t' was not declared in this sc
 ope
  void dumpVarintValue(std::vectoruint8_t, T const*, bool) const;
   ^
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:98:45:
 error: template argument 1 is invalid
  void dumpVarintValue(std::vectoruint8_t, T const*, bool) const;
  ^
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:98:45:
 error: template argument 2 is invalid
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:99:17:
 error: 'uint8_t' was not declared in this sc
 ope
  std::vectoruint8_t varintEncoding(unsigned int value) const;
  ^
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:99:24:
 error: template argument 1 is invalid
  std::vectoruint8_t varintEncoding(unsigned int value) const;
 ^
 D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:99:24:
 error: template argument 2 is invalid
 src\osgPlugins\osgjs\CMakeFiles\osgdb_osgjs.dir\build.make:57: recipe for
 target 'src/osgPlugins/osgjs/CMakeFiles/osgdb_
 osgjs.dir/Animation.obj' failed
 make[3]: ***
 [src/osgPlugins/osgjs/CMakeFiles/osgdb_osgjs.dir/Animation.obj] Error 1


 ___
 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] a question on extension functions convention

2015-04-10 Thread Sergey Kurdakov
Hi Robert,

after I wrote previous email I dug more into current emscripten way to
convert gl calls.

It looks like it is now possible to build working code with current osg
naming scheme for extensions ( unfortunately emscripten documentation on
these issues is  scarce, so I missed this possibility it in my previous
porting attempts).

Now I will make another round to convert osg with new approach and see if
it actually works for osg.

Thus disregard my first request.
Thanks for your time.

Regards
Sergey

On Fri, Apr 10, 2015 at 6:25 PM, Sergey Kurdakov sergey.fo...@gmail.com
wrote:

 Hi Robert,

 you might notice, that I try to make a port of osg to emscripten

 Overall osg 'for  the web'  works, but I found several issues with
 emscripten which require me to keep
 quite a different copy of osg

 The main issue are  extensions.

 The problem arises from how emscripten translates OpenGL to WebGL calls.

 it takes

 gl* functions in C code and directly substitutes them  with webgl gl*
 functions.

 Now it is clear what the problem is : that emscripten compiler does not
 understand extension functions which are set in the way

 setGLExtensionFuncPtr(_gl*

 let's take an example:

 void Texture2DArray::Extensions::glTexSubImage3D( GLenum target, GLint
 level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei
 height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels)
 const
 {
 if (_glTexSubImage3D)
 {
 _glTexSubImage3D( target, level, xoffset, yoffset, zoffset, width,
 height, depth, format, type, pixels);
 }
 else
 {
 OSG_WARNError: glTexSubImage3D not supported by OpenGL
 driverstd::endl;
 }
 }

 _glTexSubImage3D function won't be translated ,

 There are different ways to keep emscripten happy and use that
 glTexSubImage3D and I have forced it.
 But the ways how i did so far - looks patchy and inconsistent ( lots of
 '#ifdef's where calls to extensions occur )

 And I would like to have an osg port which is minimally different from
 stock osg ( just ifdef ed threading functions - there are no threads in
 browser and there will not be any similar threading functions to one used
 in osg for foreseeable future ).

 the  solution which will satisfy emscripten with least invasive way seems
 to have

 Extensions::_gl

 functions everywhere and also

 setGLExtensionFuncPtr(gl*  //no _ before gl

 approach to set extensions.

 and for setGLExtensionFuncPtr - for emscripten there will be a special
 function to deal with what gl functions WebGL has and what not.

 of cause I understand - such a change might break quite a bit of user code
 in case I develop a patch for osg which follows  such convention

 I have several other ways to deal - to write a special emscripten module
 which will be clever enough to use both gl and _gl functions during
 translation phase, but then - it is hardly possible that it will be
 accepted to emscripten as it will be needed only for my port and any user
 will need to hack emscripten to compile osg for web.

 so my question is - how feasible is to ask for _gl gl convention swap for
 extention _gl* functions and their Extensions::gl* wrappers?

 Best regards
 Sergey

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


Re: [osg-users] Possible bug in dev version:no call to initializeExtensionProcs for embedded window

2015-04-08 Thread Sergey Kurdakov
Hi Robert,

 I tracked my error.

my osg is a port of osg to emscripten, so no switch of contexts happens,
for that matter to reduce workload I commented in

void ViewerBase::renderingTraversals()

line
makeCurrent(*itr);

in

for(itr = contexts.begin();
itr != contexts.end()  !_done;
++itr)
{
if (!((*itr)-getGraphicsThread())  (*itr)-valid())
{
doneMakeCurrentInThisThread = true;
makeCurrent(*itr);
(*itr)-runOperations();
}
}

that was fine for older version of osg, never version initializes
extensions in a first call to makeCurrent(*itr);

 now I uncommented this line in my code but keep porting other things in
new version of osg though.

so there is nothing wrong with osg at all - that was just an artifact of my
port and different behavior to init extensions, sorry for wrong call.

Regards
Sergey

On Tue, Apr 7, 2015 at 2:50 PM, Sergey Kurdakov sergey.fo...@gmail.com
wrote:

 Hi Robert,

 with osg it works ok, but I try to find a source of the bug then will
 report ( or will write and example where it can be tracked in stock osg )

 Regards
 Sergey

 On Tue, Apr 7, 2015 at 12:37 PM, Robert Osfield robert.osfi...@gmail.com
 wrote:

 Hi Sergey,

 It sounds like a bug to me.  I haven't tried replicating it but will have
 a bash this morning.  Can you recreate the problem with an OSG example?

 At a first guess I think the solution would be for the
 GraphicsWindowEmbedded::relaizeImplemention() to do the
 State::initializeExtensionProcs().

 Robert.

 ___
 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] Possible bug in dev version:no call to initializeExtensionProcs for embedded window

2015-04-07 Thread Sergey Kurdakov
Hi Robert,

with osg it works ok, but I try to find a source of the bug then will
report ( or will write and example where it can be tracked in stock osg )

Regards
Sergey

On Tue, Apr 7, 2015 at 12:37 PM, Robert Osfield robert.osfi...@gmail.com
wrote:

 Hi Sergey,

 It sounds like a bug to me.  I haven't tried replicating it but will have
 a bash this morning.  Can you recreate the problem with an OSG example?

 At a first guess I think the solution would be for the
 GraphicsWindowEmbedded::relaizeImplemention() to do the
 State::initializeExtensionProcs().

 Robert.

 ___
 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] Possible bug in dev version:no call to initializeExtensionProcs for embedded window

2015-04-06 Thread Sergey Kurdakov
Hi Robert,

it looks a bug surfaces  due to my heavily modified code, so  now I
investigate the bug further ( it looks is not an osg bug now  ), though
earlier attempts to fix it by adding makeCurrent() to
GraphicsWindowEmbedded 's
  virtual bool realizeImplementation() { return makeCurrent(); }

somehow worked.

I will notify when I will find an initial  reason for the bug.

Regards
Sergey

On Mon, Apr 6, 2015 at 12:11 AM, Sergey Kurdakov sergey.fo...@gmail.com
wrote:

 Hi Robert,

 I got dev version and found following

 When I create GraphicsWindowWin32

 then osg calls

 bool GraphicsWindowWin32::realizeImplementation()

 where it calls

 bool GraphicsContext::makeCurrent()

 then

 getState()-initializeExtensionProcs();

 but when

 GraphicsWindowEmbedded

 is created it

 calls

 virtual bool realizeImplementation() { return true; }

 thus not call to

 getState()-initializeExtensionProcs();

 and no extensions are initialized for embedded window

 Regards
 Sergey

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


[osg-users] Possible bug in dev version:no call to initializeExtensionProcs for embedded window

2015-04-05 Thread Sergey Kurdakov
Hi Robert,

I got dev version and found following

When I create GraphicsWindowWin32

then osg calls

bool GraphicsWindowWin32::realizeImplementation()

where it calls

bool GraphicsContext::makeCurrent()

then

getState()-initializeExtensionProcs();

but when

GraphicsWindowEmbedded

is created it

calls

virtual bool realizeImplementation() { return true; }

thus not call to

getState()-initializeExtensionProcs();

and no extensions are initialized for embedded window

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


Re: [osg-users] embed osgViewer into FLTK window...

2015-03-26 Thread Sergey Kurdakov
Hi Shayne,

it looks  like your can render to osg fbo (with clear color set to have
alpha ), then you might apply texture from osg fbo to quad in fltk.

at least it is how I did the same thing in Blender long time ago.

Regards
Sergey

On Wed, Mar 25, 2015 at 11:12 PM, Shayne Tueller shayne.tuel...@hill.af.mil
 wrote:

 All,

 I'm trying to embed an osgViewer that has a transparent background into an
 FLTK main window. The embedded osgViewer needs to have a transparent
 background so that I can see the parent window behind it.

 Is this even possible?

 What I'm trying to do is use the osgViewer as an overlay to render
 symbology on top of the main parent FLTK window. I've looked at the
 osgViewerFLTK example and the osgHUD example but nothing has worked so far.

 Any suggestions or help would be appreciated...

 Shayne

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





 ___
 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] referenced memory management across dlls/exe (Windows only)

2015-03-01 Thread Sergey Kurdakov
Hi

To link   against shared libgcc, add -shared-libgcc
to link  against shared libstdc++ add -lstdc++_s

Regards
Sergey


On Sun, Mar 1, 2015 at 1:58 PM, Ulrich Hertlein u.hertl...@sandbox.de
wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Hi Nick,

 On 28/02/2015 14:46, Trajce Nikolov NICK wrote:
  I am facing a problem with memory clean-up when mixing the place of
 allocation across
  dlls and the executable. Let say I have main executable that loads dlls
 (plugins) in
  which I allocate memory using referenced pointers. On exit, those
 pointers that were
  allocated in one of the dlls got stucked in ... If I clean these
 pointers from the
  originated dll, it works ok, otherwise not.
 
  Any clue?

 You end up with different instances of the runtime library, each with its
 own heap
 management.  You allocate the object on the heap of one DLL and free it
 onto the heap of
 the other - bang.

 Sorry, I don't know what the corresponding flag might be on mingw.

 Cheers,
 /ulrich
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1

 iQEcBAEBCAAGBQJU8vDIAAoJEP8WARS52jMYq6gH/Axcl3evhaF8tdjUePeHb707
 Et4rociiWaZdVu2Cq3x3TWr6MvOqqdcJMka1h7z0Nyy43FI0HI2s63NdPiXH5LcS
 BYC8j1w8BTzOisOUYyQJwGaqt4856ne2tHAjAU47Qp5bAsvbx7ZTZa0VU2ncLmJt
 A5P2TOtDRGBjtxoQc4Kmx33AWHFzX3iT+yaN5v6EUTVO3MReQTqWCXdJWr+/GC/0
 DMWmO/ZhGLis2NONoDGeNtZtgABPhg91Z+tZt0jYyzEkJ9eC4WN+F7x++0NPfRaf
 BBAzFN8Ch9YA4mcMjQF2TkqEdMcBHnmUb49ObUbU6fHd9Ce946dwfrB1gtlne4M=
 =Q7H0
 -END PGP SIGNATURE-
 ___
 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] referenced memory management across dlls/exe (Windows only)

2015-03-01 Thread Sergey Kurdakov
Hi Nick,

after looking  some more I found that newer versions of Mingw switch to
dynamic linking of libstd++ by default. so libstdc++-6.dll is a right lib.

but as you have the same problems then I have no answer.

Regards
Sergey

On Sun, Mar 1, 2015 at 5:16 PM, Trajce Nikolov NICK 
trajce.nikolov.n...@gmail.com wrote:

 Hi Sergey,

 on my system with the latest from the Qt bundle I don't have the
 libstdc++_s ... only libstdc++.a and libstdc++-6.dll . And I added
 -lstdc++ and still getting the same issues. Any further hints?

 Thanks a lot

 Nick

 On Sun, Mar 1, 2015 at 1:07 PM, Trajce Nikolov NICK 
 trajce.nikolov.n...@gmail.com wrote:

 Thanks Ulrich. That is what is going on

 Sergey, where this flags go in the .pro file, in* QMAKE_CXXFLAGS* or
 *LIBS* ?

 Thanks a bunch

 Nick

 On Sun, Mar 1, 2015 at 12:49 PM, Sergey Kurdakov sergey.fo...@gmail.com
 wrote:

 Hi

 To link   against shared libgcc, add -shared-libgcc
 to link  against shared libstdc++ add -lstdc++_s

 Regards
 Sergey


 On Sun, Mar 1, 2015 at 1:58 PM, Ulrich Hertlein u.hertl...@sandbox.de
 wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA256

 Hi Nick,

 On 28/02/2015 14:46, Trajce Nikolov NICK wrote:
  I am facing a problem with memory clean-up when mixing the place of
 allocation across
  dlls and the executable. Let say I have main executable that loads
 dlls (plugins) in
  which I allocate memory using referenced pointers. On exit, those
 pointers that were
  allocated in one of the dlls got stucked in ... If I clean these
 pointers from the
  originated dll, it works ok, otherwise not.
 
  Any clue?

 You end up with different instances of the runtime library, each with
 its own heap
 management.  You allocate the object on the heap of one DLL and free it
 onto the heap of
 the other - bang.

 Sorry, I don't know what the corresponding flag might be on mingw.

 Cheers,
 /ulrich
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1

 iQEcBAEBCAAGBQJU8vDIAAoJEP8WARS52jMYq6gH/Axcl3evhaF8tdjUePeHb707
 Et4rociiWaZdVu2Cq3x3TWr6MvOqqdcJMka1h7z0Nyy43FI0HI2s63NdPiXH5LcS
 BYC8j1w8BTzOisOUYyQJwGaqt4856ne2tHAjAU47Qp5bAsvbx7ZTZa0VU2ncLmJt
 A5P2TOtDRGBjtxoQc4Kmx33AWHFzX3iT+yaN5v6EUTVO3MReQTqWCXdJWr+/GC/0
 DMWmO/ZhGLis2NONoDGeNtZtgABPhg91Z+tZt0jYyzEkJ9eC4WN+F7x++0NPfRaf
 BBAzFN8Ch9YA4mcMjQF2TkqEdMcBHnmUb49ObUbU6fHd9Ce946dwfrB1gtlne4M=
 =Q7H0
 -END PGP SIGNATURE-
 ___
 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




 --
 trajce nikolov nick




 --
 trajce nikolov nick

 ___
 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] Free OSG beginners guide

2015-02-27 Thread Sergey Kurdakov
Hi Jordi

thanks for


 JFYI Hi have seen today an offer of packtpub to get the OSG beginners
 guide ebook for free:

 https://www.packtpub.com/packt/offers/free-learning


to others - hurry up as time is ticking to claim the book.

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


Re: [osg-users] CAD Style rendering

2015-02-06 Thread Sergey Kurdakov
Hi Anders,


FreeCAD uses Open Inventor (it's fork) - and while it is not osg ( I had
idea some time ago to port FreeCAD to osg - but unfortunately I'm
constantly  time constrained ) you might take a look there for inspirations.

otherwise there are several osg based modelling tools ( which are not CAD,
but still - Blender is used for CAD rendering too ) - you might take a look
too

Regards
Sergey

On Fri, Feb 6, 2015 at 4:03 PM, Anders Backman ande...@cs.umu.se wrote:

 New try, the previous was too big (included an image...)

 Hi all.

 A general question about rendering...

 Does anyone has code? to share for a solid CAD style rendering with
 OpenSceneGraph?
 I am deliberately vague because it is a broad concept.

 A technical rendering style, order independent? transparency.
 Hidden lines wire frame etc...

 I am looking for inspiration for implementing this kind of rendering.
 We do most of our rendering using Shaders today. We have a megashader at
 the end which does all lighting, shadowing, texturing etc.

 Below is a shot from GrabCAD which sort of illustrates what I am looking
 for.

 http://pbrd.co/1zfevxL

 Position of light sources, type of lightsources # lightsources etc.
 Any hints?


 Tankful for any input.

 Cheers,
 Anders


 --
 __
 Anders Backman, HPC2N
 90187 Umeå University, Sweden
 and...@cs.umu.se http://www.hpc2n.umu.se
 Cell: +46-70-392 64 67

 ___
 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] ClipTexture and OpenSceneGraph

2015-01-29 Thread Sergey Kurdakov
Hi Tony,

I'm not aware of this functionality in stock osg, so looks like

you should search for virtual texture of sparse texture OpenGL extension or
similar terms ( MegaTexture etc ) on the net.


few links  with code examples you might find useful

http://sourceforge.net/projects/libvt/  it is claimed to work with
OpenSceneGraph

https://github.com/g-truc/ogl-samples has sparse texture example, see also
http://www.tinysg.de/techGuides/tg4_prt.html

https://bitbucket.org/hybird/moquette/src/3cf8f3ba2fcb9df70798c0cc66468e5a109fcd42?at=default
- is a virtual texture plugin for Ogre

Regards
Sergey

On Thu, Jan 29, 2015 at 3:05 PM, Tony Vasile ming...@gmail.com wrote:

 Hi,
 We are about to port an application from Performer that makes use of
 ClipTextures. What is the equivalent in OpenSceneGraph or is there an
 alternative way to get the same feature.

 For a definition of a ClipTexture see
 http://techpubs.sgi.com/library/dynaweb_docs/0620/SGI_Developer/books/Perf_PG/sgi_html/ch12.html

 Thank you!

 Cheers,
 Tony

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





 ___
 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] GIF plugin and animated GIFs

2015-01-10 Thread Sergey Kurdakov
Hi Christian,

ok I got it,

if anything, if you would  need to change code then ffmpeg has capabilities
to  use filters http://www.ffmpeg.org/doxygen/0.9/filtering_8c-source.html
(setpts filter can control speed
https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video
) to speed up or slow down video.

Regards
Sergey



On Sat, Jan 10, 2015 at 12:09 PM, Christian Buchner 
christian.buch...@gmail.com wrote:


 the ffmpeg flug-in does not currently support variable playback speed,
 it appears.

 I was also having issues with incorrect timestamps being reported close
 to the end of replaying some animations.

 I may actually look intp WebP and animated PNG, thanks,

 Christian


 2015-01-09 21:01 GMT+01:00 Sergey Kurdakov sergey.fo...@gmail.com:

 Hi Christian,

 just wonder, not knowing your needs, but anyway

 why wouldn't you use ffmpeg plugin?

 it supports animated WebP/jpeg video ( though webm vp8/vp9 video might
 also suite your needs)
 http://www.phoronix.com/scan.php?page=news_itempx=MTg1NDQ

 which is better than gif according to


 https://zoetrope.io/tech-blog/beyond-jpeg-videos-and-emerging-image-standards

 Regards
 Sergey


 On Fri, Jan 9, 2015 at 5:04 PM, Christian Buchner 
 christian.buch...@gmail.com wrote:


 In our case it's overlay animations consisting of hundreds of frames.
 These show some kind of animated plots or illustrations on top of our 3D
 renders. Some animations now take two seconds to load and they consume
 hundreds of MBs of RAM. So I guess I will have to address that problem at
 the root (the plug-in).

 Christian



 2015-01-09 12:53 GMT+01:00 Robert Osfield robert.osfi...@gmail.com:

 Hi Chrisitan,

 How big gif's are you trying to handle.

 With the gif plugin my assumption has been the the aninated gifs would
 be small enough that storing in memory wouldn't be that costly.

 I have no objection to having a separate thread handle reading as an
 option - if you are willing to code it.  However, it's not a big issue
 w.r.t memory usage then I'd say just live it as is.

 Robert.

 On 8 January 2015 at 15:51, Christian Buchner 
 christian.buch...@gmail.com wrote:

 Hi,

 there's a couple of things I noticed with the GIF plugin.

 When it encounters animated GIFs, it will decode the entire animation
 into a sequence of images in RAM.  This process appears to be synchronous
 (it blocks the calling thread), and it will consume a lot of memory.

 I was wondering if there is any interest in improving this.

 For example we could shift the decoding to when an image is actually
 supposed to be rendered to screen. We still need to make an initial first
 pass over the file in order to determine the total number of frames and
 their respective playout timestamps - but I think we could skip the
 decoding pass.

 Christian


 ___
 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



 ___
 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] GIF plugin and animated GIFs

2015-01-09 Thread Sergey Kurdakov
Hi Christian,

just wonder, not knowing your needs, but anyway

why wouldn't you use ffmpeg plugin?

it supports animated WebP/jpeg video ( though webm vp8/vp9 video might also
suite your needs)
http://www.phoronix.com/scan.php?page=news_itempx=MTg1NDQ

which is better than gif according to

https://zoetrope.io/tech-blog/beyond-jpeg-videos-and-emerging-image-standards

Regards
Sergey


On Fri, Jan 9, 2015 at 5:04 PM, Christian Buchner 
christian.buch...@gmail.com wrote:


 In our case it's overlay animations consisting of hundreds of frames.
 These show some kind of animated plots or illustrations on top of our 3D
 renders. Some animations now take two seconds to load and they consume
 hundreds of MBs of RAM. So I guess I will have to address that problem at
 the root (the plug-in).

 Christian



 2015-01-09 12:53 GMT+01:00 Robert Osfield robert.osfi...@gmail.com:

 Hi Chrisitan,

 How big gif's are you trying to handle.

 With the gif plugin my assumption has been the the aninated gifs would be
 small enough that storing in memory wouldn't be that costly.

 I have no objection to having a separate thread handle reading as an
 option - if you are willing to code it.  However, it's not a big issue
 w.r.t memory usage then I'd say just live it as is.

 Robert.

 On 8 January 2015 at 15:51, Christian Buchner 
 christian.buch...@gmail.com wrote:

 Hi,

 there's a couple of things I noticed with the GIF plugin.

 When it encounters animated GIFs, it will decode the entire animation
 into a sequence of images in RAM.  This process appears to be synchronous
 (it blocks the calling thread), and it will consume a lot of memory.

 I was wondering if there is any interest in improving this.

 For example we could shift the decoding to when an image is actually
 supposed to be rendered to screen. We still need to make an initial first
 pass over the file in order to determine the total number of frames and
 their respective playout timestamps - but I think we could skip the
 decoding pass.

 Christian


 ___
 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


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


Re: [osg-users] Get actual node path of OpenSceneGraph custom osg::Drawable

2014-12-31 Thread Sergey Kurdakov
Hi Mark,

getNodePath in visitor should return path being taken.

Regards
Sergey

On Wed, Dec 31, 2014 at 12:47 AM, Mark Schlosser markschlos...@gmail.com
wrote:

 I am writing a custom osg::Drawable class which needs to calculate its
 current distance from the camera's eye when its drawImplementation method
 is called. It needs to do this in order to determine the optimal number of
 facets for rendering.

 The difficulty is that my drawable can have any number of osg::Transform
 nodes as parents. I need to apply the transformation of the actual parent
 that is being applied to the drawable. Using osg::Node::getParents() and/or
 getParentalNodePaths(), I can determine all possible paths to this
 drawable, but not the path that was taken.

 Is there any way to determine this in OpenSceneGraph? I have dug through
 the examples and documentation and have not found exactly what I require.

 -Mark

 ___
 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] Get actual node path of OpenSceneGraph custom osg::Drawable

2014-12-31 Thread Sergey Kurdakov
Hi Mark,

I'm little bit confused,

here you ask for concrete path

I need to apply the transformation of the actual parent that is being
applied to the drawable.

and visitor gets

  /** Get the non const NodePath from the top most node applied down
  * to the current Node being visited.*/
NodePath getNodePath() { return _nodePath; }

so it is not potential nodePath, but realized one in a traversal

it does not return potential transforms as per your

So the proper way to get the node path of potential transforms

as for

Is there any way to get the actual node path from inside the
drawImplementation method inside the drawable, or does OSG not have enough
information at that point to know the node path?

I think, if you don't want somehow to store nodepath from say update
callback ( which will go before draw callback and have same selection logic
of parents as in your draw callbacks)   you might force to traverse nodes
in your draw callback to get current node path using approach taken here

http://globemaster.cs.uah.edu/labs/CS582/REL-2.5.0/src/dtCore/transformable.cpp
(look for CollectParentPaths class use in this code)  during accept
traversal with CollectParentPaths you would  apply the same selection logic
as you did for selecting drawing parents.

maybe there are more elegant ways to perform what you need, then maybe some
else will provide better advice.

Regards
Sergey




On Wed, Dec 31, 2014 at 4:35 PM, Mark Schlosser markschlos...@gmail.com
wrote:

 So the proper way to get the node path of potential transforms for a
 drawable is to use a NodeVisitor to drill down each possible path to the
 drawable?

 Here is what I have:

 Root
 Transform0  Transform1  Transform2  Transform3
 GeodeWithCustomDrawable

 where all the transforms are parents to the geode.

 Is there any way to get the actual node path from inside the
 drawImplementation method inside the drawable, or does OSG not have enough
 information at that point to know the node path?

 Will I need to visit the nodes myself and call drawImplementation myself?

 -Mark


 On Wed, Dec 31, 2014 at 4:01 AM, Sergey Kurdakov sergey.fo...@gmail.com
 wrote:

 Hi Mark,

 getNodePath in visitor should return path being taken.

 Regards
 Sergey

 On Wed, Dec 31, 2014 at 12:47 AM, Mark Schlosser markschlos...@gmail.com
  wrote:

 I am writing a custom osg::Drawable class which needs to calculate its
 current distance from the camera's eye when its drawImplementation method
 is called. It needs to do this in order to determine the optimal number of
 facets for rendering.

 The difficulty is that my drawable can have any number of osg::Transform
 nodes as parents. I need to apply the transformation of the actual parent
 that is being applied to the drawable. Using osg::Node::getParents() and/or
 getParentalNodePaths(), I can determine all possible paths to this
 drawable, but not the path that was taken.

 Is there any way to determine this in OpenSceneGraph? I have dug through
 the examples and documentation and have not found exactly what I require.

 -Mark

 ___
 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


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


Re: [osg-users] Darker image when something is drawn on a texture.

2014-12-29 Thread Sergey Kurdakov
Hi

the usual practice is to place opengl calls after all attribs are saved,
after OpenGL code is finished - they all are restored

glPushAttrib( GL_ALL_ATTRIB_BITS );
glPushClientAttrib(GL_CLIENT_ALL_ATTRIB_BITS);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glMatrixMode(GL_TEXTURE);
glPushMatrix();


 //your OpenGL code here


glMatrixMode(GL_TEXTURE);
glPopMatrix();
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
glPopClientAttrib();
glPopAttrib();

Regards
Sergey

On Mon, Dec 29, 2014 at 2:42 PM, Marcin Kolny marcin.ko...@gmail.com
wrote:

 Hi,

 I've got a following code:


 Code:

 viewer = new osgViewer::Viewer;
 viewer-setCameraManipulator(new osgGA::TrackballManipulator);
 window = viewer-setUpViewerAsEmbeddedInWindow(0,0,716,572);
 viewer-getCamera()-setClearMask(GL_DEPTH_BUFFER_BIT);

 // ...

 glMatrixMode (GL_PROJECTION);
 glLoadIdentity ();

 GLfloat verts[] = { -1.0f, -1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f };
 GLfloat texcoords[] = { 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f };

 glEnable (GL_TEXTURE_2D);
 glBindTexture (GL_TEXTURE_2D, texture_id);
 glClientActiveTexture (GL_TEXTURE0);

 glEnableClientState(GL_VERTEX_ARRAY);
 glEnableClientState (GL_TEXTURE_COORD_ARRAY);

 glVertexPointer (2, GL_FLOAT, 0, verts);
 glTexCoordPointer (2, GL_FLOAT, 0, texcoords);
 glDrawArrays (GL_TRIANGLE_FAN, 0, 4);

 glDisableClientState(GL_TEXTURE_COORD_ARRAY);

 glDisable(GL_TEXTURE_2D);

 osg::Geometry* geom = new osg::Geometry;
 osg::Vec3Array* vertices = new osg::Vec3Array;
 vertices-push_back(osg::Vec3d(0, 30, 0));
 vertices-push_back(osg::Vec3d(width, 30, 0));
 geom-setVertexArray(vertices);
 geom-addPrimitiveSet(new osg::DrawArrays(GL_LINES,0,vertices-size()));

 viewer-setSceneData(geom);
 viewer-realize();

 if (viewer.valid()) viewer-frame();





 It loads texture with identifier texture_id, draw it (using pure opengl),
 and later I try to draw line on this texture. Unfortunately, when I draw
 this line, my image is becoming darker. When I remove line

 Code:

 viewer-setSceneData(geom);



 output image has normal colours, but obviously I don't have my line there.
 What's wrong with my code, and why my image is darker? I attach also two
 images (it's not a whole image, but only a part of it) to show you the
 difference.

 Thank you!

 Cheers,
 Marcin[/code]

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




 ___
 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] Transparent Window Application [SOLVED]

2014-12-14 Thread Sergey Kurdakov
Hi Roy,

I think the next step is just to run osg with simple dx app.

I think that osg can be combined with dx via *GraphicsWindowEmbedded* and

https://sites.google.com/site/snippetsanddriblits/OpenglDxInterop

so - that osg renders inside pair

dxRenderer-BeginGlDraw();

dxRenderer-EndGlDraw();


if you would   achive that, then you would need to subclass those dx calls
via intercept dll which provide necessary info to OpenglDxInterop
https://sites.google.com/site/snippetsanddriblits/OpenglDxInterop code

the other way is to use ANGLE as it will translate opengl es calls to dx -
but I think it will be few month hacking vs a week/two with above approach.

Regards
Sergey

On Sun, Dec 14, 2014 at 3:10 PM, Roy Arents osgfo...@tevs.eu wrote:

 Hi,

 I've found another example which allows drawing over directx:
 http://www.codeforfun.it/2012/08/30/directx-hooking-with-a-proxy-dll/

 This one works for splash screen and menu's as well. Now the second step
 seems more difficult as I expected... How to add osg on top of it.
 There are quite a few solutions on how to add openGL on top of it, but I
 have not been succesfull with them so far. Perhaps someone can point me in
 the right direction?

 Thank you very much!

 Roy

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





 ___
 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] Transparent Window Application [SOLVED]

2014-12-14 Thread Sergey Kurdakov
Hi Roy,

as you use forum I do not see your email address ( otherwise I would likely
send personal message ) but anyway, might be that someone else will benefit
of such discussion in future in similar situation.

one quite unusual, but useful example for your purposes was discussed  in
discussion group some time ago - to use gldirect to run osg to translate
opengl calls to dx, the example claimed to be working well ( I did not try
it though as it was over 1 gb size and was offered over very slow
connection )

You may try this way  as it proved to be working for dx9 and thus  might
prove most easy way to follow  in case you do not use shaders in your  osg
output as gldirect supports only fixed pipeline

( gldirect could be taken here
https://raw.githubusercontent.com/bfosterjr/windowsrtdev/master/libs/gldirect5/src/gldirect5.7z
)

otherwise there are quite few examples to use nv extention besides  a lib I
already linked there is also:

https://github.com/tliron/opengl-3d-vision-bridge/blob/master/opengl_3dv.c

While to insert it into already existing code of the game might be
intimidating

the idea is quite straightforward: dx creates a texture which is then
shared with opengl as fbo

and as osg supports rendering to fbo a code to glue rendering might be
inserted to osg setting rendering target as that provided by dx fbo, after
rendering to fbo, the texture can be used in dx, such as being attached for
hud over already rendered scene.

Regards
Sergey


On Sun, Dec 14, 2014 at 8:07 PM, Sergey Kurdakov sergey.fo...@gmail.com
wrote:

 Hi Roy,

 I think the next step is just to run osg with simple dx app.

 I think that osg can be combined with dx via *GraphicsWindowEmbedded* and

 https://sites.google.com/site/snippetsanddriblits/OpenglDxInterop

 so - that osg renders inside pair

 dxRenderer-BeginGlDraw();

 dxRenderer-EndGlDraw();


 if you would   achive that, then you would need to subclass those dx calls
 via intercept dll which provide necessary info to OpenglDxInterop
 https://sites.google.com/site/snippetsanddriblits/OpenglDxInterop code

 the other way is to use ANGLE as it will translate opengl es calls to dx -
 but I think it will be few month hacking vs a week/two with above approach.

 Regards
 Sergey

 On Sun, Dec 14, 2014 at 3:10 PM, Roy Arents osgfo...@tevs.eu wrote:

 Hi,

 I've found another example which allows drawing over directx:
 http://www.codeforfun.it/2012/08/30/directx-hooking-with-a-proxy-dll/

 This one works for splash screen and menu's as well. Now the second step
 seems more difficult as I expected... How to add osg on top of it.
 There are quite a few solutions on how to add openGL on top of it, but I
 have not been succesfull with them so far. Perhaps someone can point me in
 the right direction?

 Thank you very much!

 Roy

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





 ___
 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] Transparent Window Application [SOLVED]

2014-12-04 Thread Sergey Kurdakov
Hi Roy,

I also found, that not only hooks might work

see

http://graphics.stanford.edu/~mdfisher/D3D9Interceptor.html
and
http://www.codeguru.com/cpp/g-m/directx/directx8/article.php/c11453/Intercept-Calls-to-DirectX-with-a-Proxy-DLL.htm

for old dx9 games (possibly there are similar  dx10/11 proxy dlls )

for OpenGL games there is glIntercept  ( seems like it is possible to have
your render code inserted in swap buffers implementation in glIntercept.
You will need to save complete stack, render a full screen quad with
transparent background and maybe  you will need to force osg to be single
threaded at this stage ),

so good luck, it will be interesting to know how it turned out.

Regards
Sergey



On Thu, Dec 4, 2014 at 5:57 PM, Roy Arents osgfo...@tevs.eu wrote:

 Hi Sergey,

 Thanks for your help. I'll try to use them and hopefully post a solution
 soon.

 Thanks!

 Roy

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





 ___
 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] Transparent Window Application [SOLVED]

2014-12-03 Thread Sergey Kurdakov
Hi Roy,

if you game runs full screen and cannot do anything else even with 'full
screen emulation' ( such that you render game full screen but in windowed
mode )

the answer might be - an old trick to use hooks to write  overlays  for
games
( search on the web - the trick is used in number of game hacks )

now if you use dx for game and osg for overlay there could be additional
problem, which you would need to solve with
https://sites.google.com/site/snippetsanddriblits/OpenglDxInterop - such
that you add additional overlay as described above, but the texture for
this overlay is provided by osg.

Regards
Sergey



On Wed, Dec 3, 2014 at 7:20 PM, Roy Arents osgfo...@tevs.eu wrote:

 Hi,

 Great to see that you got around the transparent mouse clicks as well. I
 just needed it yesterday and again your method works great.

 Unfortunatly I have another problem though... I would like to place this
 application on top of another full-screen windows (game). I didn't think of
 it earlier, but it does not work (perhaps this should be obvious).
 Can you think of any workarounds to make this work? Unfortunatly it is no
 option to run the game in windowed mode, since I'm using it in combination
 with the oculus rift and tridef to make te game work for it.

 Hopefully there is another workaround... As always thanks for your help!

 Cheers,
 Roy

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





 ___
 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] My first OSG application

2014-11-23 Thread Sergey Kurdakov
Hi Guy,

google

osg  Using multiple cameras ( for two areas in a window )

osg HUD quad  or just osg HUD ( for a quad with a texture ,looks like you
want it to always face user in orthographic projection )

Regards
Sergey



On Sun, Nov 23, 2014 at 2:31 PM, Guy Rosenthal guyro...@gmail.com wrote:

 Hi,
 I a newbee with OpenSceneGraph, Trying to write a really simple app doing
 the following:
 a single window is divided to 2:
 one part has a model that is rendered from different views according to
 mouse events (click,drag,...)
 The second part has simply an image.

 I really got lost with the variety of examples and tools.

 can someone give me some guidlines for this task?(what classes to use,
 maybe a similar example available in the database)
 ...

 Thank you!

 Cheers,
 Guy

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





 ___
 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] Adding textures on platonic solid

2014-11-18 Thread Sergey Kurdakov
Hi Drake,

so few links with solutions to similar problems for you as seems you did
not make progress

http://forum.openscenegraph.org/viewtopic.php?t=7720view=next

http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2009-February/023872.html
( has some russian comments but you could google translate them )


Regards
Sergey

On Fri, Nov 14, 2014 at 1:31 PM, Drake Aldwyn azrai...@gmail.com wrote:

 Hi, all!

 Guys, I need your help!
 I’ve just start learn OSG so can’t figure it out by myself. I want to add
 custom textures to loaded models (all model is platonic solid and loaded
 from .3ds file). Is there any path to apply texture (loaded from custom png
 file ) to these models properly? I.e. using attached model of cube and
 attached image as texture. I can't just attach texture to model in 3ds max,
 because goal is to making possibly change all texture on object by changing
 image.


 Thank you!

 Cheers,
 Drake Aldwyn

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




 ___
 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] Importing Animations from 3ds Max 2015

2014-11-14 Thread Sergey Kurdakov
Hi Chris

I think  you need this thread
http://forum.openscenegraph.org/viewtopic.php?t=8161view=next ( xml file
which is not allowed to be downloaded is duplicated in Sat Apr 02, 2011
1:12 pm  message )

Regards
Sergey

On Fri, Nov 14, 2014 at 11:48 AM, Chris Hidden ch...@erghis.com wrote:

 Hey everyone

 So I've been doing a lot of digging trying to figure out how to get
 Animations over from 3ds Max to OSG.  I have 3 models in my 3ds max scene.

 I use a timeline to seperate 2 animations.  I have also saved the
 animations in 3ds max using: Animations-Save Animation.  It saves it as a
 special XML format: .xaf file it appears.

 As far as I can tell there is not a simple way.  I can export the file
 directly to osg or osgb format using the exporter I have installed in 3ds
 Max using this plug in:

 http://sourceforge.net/projects/osgmaxexp/

 However, when I run this and gather the animation list from the file I get
 nothing:


 Code:
 osgAnimation::BasicAnimationManager * manager =
 dynamic_castosgAnimation::BasicAnimationManager*(node-getUpdateCallback());
 if (!manager)
 {
 std::string exit;
 std::cout  No animations  std::endl;
 std::cin  exit;
 return 1;
 }

 const osgAnimation::AnimationList animations =
 manager-getAnimationList();

 for (unsigned int i = 0 ; i  animations.size(); i++)
 {
 const std::string name = animations[i]-getName();
 manager-playAnimation(animations[i].get());
 std::cout  name  std::endl;
 }




 Ok, so apparently the .3ds max plug in does not support exporting my
 animations properly.

 My next step was to try and just load the .3ds file.  But again, none of
 my animations are showing up.

 Then I read up on osgconv.  I converted my .max files to osg, obj and
 tried those... with no luck.  I still get no animations read from
 getAnimationList().

 After that I tried exporting to .fbx format.  That originally didn't
 work.  I had to do a lot more reading.  After collapsing all of my auto key
 animations into single key frames under Motion-Trajectories AND: when
 exporting to .FBX from 3DS Max Under -Animation-Bake Animation  I give
 the range of my animation timeline, I was then able to see an animation
 being played on screen.

 Now the problem is it plays the first animation and then the second.  I
 have no way of splitting the two animations.  The output in my console from
 cout  name was take001.

 I did some more reading and found someone who had written a script
 http://forum.openscenegraph.org//files/anisplit_138.cpp that looks like
 he specifically coded it to the fellows animation.   So I would have to go
 in and edit my own XML file to do this.

 Finally I also read that OSG supports Blender animations.  This is great,
 but I have already done all my work in 3DS max and am not familiar with
 Blender.

 Is this really the only way to get animations out of 3DS MAX?  Am I
 missing some plug in or steps?

 Aside from this the only other solution I see is exporting a different
 .fbx model for each one of the animations I want to create.  Cumbersome :p

 If I wanted to have several states of animations in my models, such as for
 a character or hands. how would I even be able to manage this working
 in 3DStudio Max?

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





 ___
 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] Adding textures on platonic solid

2014-11-14 Thread Sergey Kurdakov
Hi Zaur,


you can change texture even if you have exported object from 3DS max, but
uv texture coordinated will be preserved in a model and it's convenient as
you might try that another texture in max too.

search the forum (ex via google ) for how to change texture ( it is done in
callback ).

Regards
Sergey

On Fri, Nov 14, 2014 at 12:45 PM, Drake Aldwyn azrai...@gmail.com wrote:

 Hi, all!

 Guys, I need your help!
 I’ve just start learn OSG so can’t figure it out by myself. I want to add
 custom textures to loaded models (all model is platonic solid and loaded
 from .3ds file). Is there any path to apply texture (loaded from custom png
 file ) to these models properly? I.e. using attached model of cube and
 attached image as texture. I can't just attach texture to model in 3ds max,
 because goal is to making possibly change all texture on object by changing
 image.


 Thank you!

 Cheers,
 Zaur

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




 Attachments:
 http://forum.openscenegraph.org//files/cube_194.zip


 ___
 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] Turn a line path to spheres path

2014-11-14 Thread Sergey Kurdakov
Hi,

did you try instanced geometry?

( google: openscenegraph geometry instancing )

regards
Sergey

On Fri, Nov 14, 2014 at 11:07 PM, Vinicius Schmidt osgfo...@tevs.eu wrote:

 Hi,

 I have an array of lines to mark where an object passed, but for reasons
 of visual pollution I need to turn those lines into a group of dots, or
 spheres.
 What is the best way to make it? I've tried to create a new geode for each
 sphere, but this solution isn't functional. Is there a way to just mark a
 point where it would connect my lines?
 To make things more clear, that is what I have now (the dots are the
 places where my object visited):
 .
 \._._.


 What I wanted is to just have those places marked.
 Could someone give me some help?

 Thank you!

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





 ___
 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] Turn a line path to spheres path

2014-11-14 Thread Sergey Kurdakov
Hi Vinicius

I think that http://3dcgtutorials.blogspot.com/search/label/Instancing (
read from bottom to top ) explain it quite well.

you might pack positions either to Uniform Buffer Objects

layout(std140) uniform instanceData
{
 mat4 instanceModelMatrix[MAX_INSTANCES];
};

or to texture, and the texture can be dynamically updated for your shader
instancing,
alternatively you might use geometry shader to generate spheres at points
of interest.

Regards
Sergey


On Sat, Nov 15, 2014 at 12:26 AM, Vinicius Schmidt osgfo...@tevs.eu wrote:

 Hi Sergey,

 I think it's not what I need or I didn't find an example to apply to my
 problem.

 What I have is an array of positions, and I'm drawing the path with this:


 Code:

 for (int i = 0; i  dr-agents.size(); i++) {
   dr-agents[i]-getPath()-dirty();
   dr-agents[i]-getArrayLines()-setFirst(0);

 dr-agents[i]-getArrayLines()-setCount(dr-agents[i]-getPath()-size());
 }




 Now instead to draw the lines from position 0 to position N, I'd like to
 draw a dot or sphere in all these N positions, without line links.

 Could you give me some code sample?

 Thanks

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





 ___
 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] iOS GLES2 : VERTEX glCompileShader FAILED

2014-11-13 Thread Sergey Kurdakov
Hi,

I heard of some work being done to support automatic shaders (in private
talks, not sure I'm allowed to provide further details), which
transparently emulate fixed pipeline for osg, but not sure of it's state or
when it will be available to public,

currently osgUtil ShaderGen is a way to start with  and also
osgEarth/ShaderGenerator.cpp might be of some help.

Regards
Sergey

On Thu, Nov 13, 2014 at 3:44 PM, Liu Xiao skyl...@126.com wrote:

 Hi,
 I would like to try the osgjs plugin. But as my application need to show
 all fbx files users provide. I cannot write shaders for every 3d models.

 Is there anyway I can do this?

 Thanks!


 Sergey Kurdakov wrote:
  Hi Liu,
 
 
  as you already indicated in other posts - you have read my advice to
 other people in this situation
  And here I repeat it use Cedrik Pinson osgjs format ( exporter for osg
 converter  is here
 https://github.com/cedricpinson/osg/tree/master/src/osgPlugins/osgjs (
 https://github.com/cedricpinson/osg/tree/master/src/osgPlugins/osgjs) )
 it looks very suitable for  OpenGL ES 2.0 models. To use it, though, you
 will need to write your own loader
 
 
 
 
 
  Regards
  Sergey
 
  On Mon, Nov 10, 2014 at 1:23 PM, Liu Xiao  () wrote:
 
   Thanks ! That is really a simple and nice example for me, I will try
 it and feedback when I get succeed.
  
   I think your solution is loading texture separatly , while my osg file
 is binding with texture. I donot know how to convert fbx to osg format for
 external texture file.
  
   However, the following shader works for my young.osg file here :
  
  
   Code:
   static const char gVertexShader1[] =
   varying vec2 v_texCoord;
  n
   void main() {
   n
   gl_Position  = gl_ModelViewProjectionMatrix * gl_Vertex;
  n
v_texCoord   = gl_MultiTexCoord0.xy;
 n
   }
   n;
  
   static const char gFragmentShader1[] =
   varying  mediump vec2 v_texCoord;
   n
   uniform sampler2D sam;
 n
   void main() {
 n
   gl_FragColor = texture2D(sam, v_texCoord);
 n
   }
  
  
  
  
  
 
 
   --
  Post generated by Mail2Forum


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





 ___
 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] iOS GLES2 : VERTEX glCompileShader FAILED

2014-11-10 Thread Sergey Kurdakov
Hi Liu,

as you already indicated in other posts - you have read my advice to other
people in this situation
And here I repeat it use Cedrik Pinson osgjs format ( exporter for osg
converter  is here
https://github.com/cedricpinson/osg/tree/master/src/osgPlugins/osgjs ) it
looks very suitable for  OpenGL ES 2.0 models. To use it, though, you will
need to write your own loader


Regards
Sergey

On Mon, Nov 10, 2014 at 1:23 PM, Liu Xiao skyl...@126.com wrote:

 Thanks ! That is really a simple and nice example for me, I will try it
 and feedback when I get succeed.

 I think your solution is loading texture separatly , while my osg file is
 binding with texture. I donot know how to convert fbx to osg format for
 external texture file.

 However, the following shader works for my young.osg file here :


 Code:
 static const char gVertexShader1[] =
 varying vec2 v_texCoord; \n
 void main() {
   \n
 gl_Position  = gl_ModelViewProjectionMatrix * gl_Vertex;
  \n
  v_texCoord   = gl_MultiTexCoord0.xy;
 \n
 }
 \n;

 static const char gFragmentShader1[] =
 varying  mediump vec2 v_texCoord;
   \n
 uniform sampler2D sam;
 \n
 void main() {
 \n
 gl_FragColor = texture2D(sam, v_texCoord);
 \n
 }



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


Re: [osg-users] ComputeThread in parallel to Viewer's RenderThreads

2014-11-09 Thread Sergey Kurdakov
Hi Markus,

it's difficult to figure out while you want exactly compute shaders,
but with OpenCL you might have several OpenCL threads - one which will
communicate with OpenGl and another one which will perform independent
computations
https://software.intel.com/en-us/articles/opencl-and-opengl-interoperability-tutorial
Regards
Sergey

On Sun, Nov 9, 2014 at 4:16 PM, Markus Hein mah...@frisurf.no wrote:

 Hello All,

 maybe someone can point me to example or osg-users discussion where data
 computation is done in parallel to scene rendering. Maybe someone has done
 similar stuff before, I could not find the right answer after searching in
 osg example code.

 I want to realize a pure OSG based application , where  a compute thread
 is using compute shaders, updating data stored in BufferObjects stored in
 GPU memory. This  thread must run very straight at  high and predictable
 framerate for numerical precision.

  In addition, the app will have  one or multiple  viewer threads,
 rendering the scene at fastest possible framerate. The visual scene will
 use the data stored in GPU  memory that is updated by the compute thread
 for rendering  (avoiding data transfer to host and back).

 I see that osg viewer.frame() is dispatching rendering of the scene , but
 fastest possible framerate is given by viewers framerate.  Is there a way
 to realize a thread that doesn't depend on viewers framerate for fast and
 predictable computation ? I expect that my viewer threads will run at 20-60
 Hz, but the compute thread must run  60 Hz, eventually locked to some
 given framerate.

 Thanks for some info!

 regards,  Markus
 ___
 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] ComputeThread in parallel to Viewer's RenderThreads

2014-11-09 Thread Sergey Kurdakov
Hi Markus,

thanks for more details.

Unfortunately I cannot provide answers, but hope additional information
would  lead to answer by someone else who is more knowledgeable in this
area.

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


Re: [osg-users] iOS GLES2 : VERTEX glCompileShader FAILED

2014-11-07 Thread Sergey Kurdakov
Hi Liu,

use setUseVertexAttributeAliasing as Robert recently explained for similar
question

===
The aliasing of gl_* uniforms to osg_* equivialants is not done by
default.  You can switch it one yourself if required though via osg::State,
from the osgsimplegl3 example:

// for non GL3/GL4 and non GLES2 platforms we need enable the osg_
uniforms that the shaders will use,
// you don't need thse two lines on GL3/GL4 and GLES2 specific builds
as these will be enable by default.
gc-getState()-
setUseModelViewAndProjectionUniforms(true);
gc-getState()-setUseVertexAttributeAliasing(true);

In your own shaders if you are building against GL1/2 (default build of
OSG) then you can simply use the gl_* parameters.

Also have a look at the shaders in OpenSceneGraph-Data and the osgshaders
example.
===


Regards
Sergey

On Fri, Nov 7, 2014 at 12:14 PM, Liu Xiao skyl...@126.com wrote:

 Hi,

 When I trying to use the osg 3.2.1 (with OSG_GLES2_AVAILABLE:BOOL=ON )
 example_osgViewerIPhone, I got the following errors:


 Code:
 VERTEX glCompileShader  FAILED
 VERTEX Shader  infolog:
 ERROR: 0:6: Use of undeclared identifier 'gl_Vertex'
 ERROR: 0:7: Use of undeclared identifier 'gl_FrontColor'

 FRAGMENT glCompileShader  FAILED
 FRAGMENT Shader  infolog:
 ERROR: 0:4: 'vec4' : declaration must include a precision qualifier for
 type
 ERROR: 0:5: Use of undeclared identifier 'base'
 ERROR: 0:6: Use of undeclared identifier 'color'
 ERROR: 0:6: Use of undeclared identifier 'gl_Color'
 ERROR: 0:7: Use of undeclared identifier 'color'

 glLinkProgram  FAILED
 Program  infolog:
 ERROR: One or more attached shaders not successfully compiled



 My Config file is as follows:


 Code:
 #ifndef OSG_CONFIG
 #define OSG_CONFIG 1

 /* #undef OSG_NOTIFY_DISABLED */
 /* #undef OSG_USE_FLOAT_MATRIX */
 /* #undef OSG_USE_FLOAT_PLANE */
 #define OSG_USE_FLOAT_BOUNDINGSPHERE
 #define OSG_USE_FLOAT_BOUNDINGBOX
 #define OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION
 /* #undef OSG_USE_UTF8_FILENAME */
 #define OSG_DISABLE_MSVC_WARNINGS

 /* #undef OSG_GL1_AVAILABLE */
 /* #undef OSG_GL2_AVAILABLE */
 /* #undef OSG_GL3_AVAILABLE */
 /* #undef OSG_GLES1_AVAILABLE */
 #define OSG_GLES2_AVAILABLE
 /* #undef OSG_GL_LIBRARY_STATIC */
 /* #undef OSG_GL_DISPLAYLISTS_AVAILABLE */
 /* #undef OSG_GL_MATRICES_AVAILABLE */
 /* #undef OSG_GL_VERTEX_FUNCS_AVAILABLE */
 /* #undef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE */
 /* #undef OSG_GL_FIXED_FUNCTION_AVAILABLE */

 #endif




 Can anyone help with this? Or is there any examples of osg ios can I learn?

 Thank you!

 Cheers,
 Liu

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





 ___
 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] iOS GLES2 : VERTEX glCompileShader FAILED

2014-11-07 Thread Sergey Kurdakov
Hi Liu,

consider this simple pseudo code example ( just fix
createTexturedQuadGeometry in code below so that it has #if
defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) line instead of
#if defined(OSG_GLES1_AVAILABLE) || !defined(OSG_GLES2_AVAILABLE) ) )

have u_Texture sampler in your shader

uniform sampler2D u_Texture;

then create geode

osg::Geode*   geode   = new osg::Geode();
osg::Program* program = new osg::Program();

osg::Shader*  vert= new osg::Shader(osg::Shader::VERTEX,
gVertexShader);
osg::Shader*  frag=  new osg::Shader(osg::Shader::FRAGMENT,
gFragmentShader );

program-addShader(vert);
program-addShader(frag);
geode-addDrawable(makePlain ());
osg::StateSet* pStateSet = geode-getOrCreateStateSet();


osg::Image* pImage = new osg::Image;

load image here, now

osg::Texture2D* pTex = new osg::Texture2D();
pTex-setFilter( pTex-MIN_FILTER,pTex-LINEAR);
pTex-setFilter( pTex-MAG_FILTER,pTex-LINEAR);
pTex-setImage(0,  pImage);



pStateSet-setTextureAttribute( 0, pTex, osg::StateAttribute::ON );

pStateSet-addUniform(new osg::Uniform(u_Texture, 0));

pStateSet-setAttribute(program);

makePlain could be as following:

osg::Geometry*
makePlain()
{

osg::ref_ptrosg::Geometry geom= osg::createTexturedQuadGeometry(
osg::Vec3(-0.5f, 0.0f,-0.5f),

osg::Vec3(1.0f,0.0f,0.0f),

osg::Vec3(0.0f,0.0f,1.0f) );

if( geom == NULL )
geom = new osg::Geometry;

geom-setUseVertexBufferObjects(true);

return( geom.release() );
}

this simple example should work, then you should move further.

Regards
Sergey

On Fri, Nov 7, 2014 at 3:56 PM, Liu Xiao skyl...@126.com wrote:

 Thanks so much for your quick reply , it really helps.

 Also this post gives me a good example of shader:
 http://forum.openscenegraph.org/viewtopic.php?t=6482

 But still I have problem on drawing the texture.


 Sergey Kurdakov wrote:
  Hi Liu,
 
 
  use setUseVertexAttributeAliasing as Robert recently explained for
 similar question
 
  ===
  The aliasing of gl_* uniforms to osg_* equivialants is not done by
 default.  You can switch it one yourself if required though via osg::State,
 from the osgsimplegl3 example:
 
  // for non GL3/GL4 and non GLES2 platforms we need enable the osg_
 uniforms that the shaders will use,
  // you don't need thse two lines on GL3/GL4 and GLES2 specific
 builds as these will be enable by default.
  gc-getState()-setUseModelViewAndProjectionUniforms(true);
  gc-getState()-setUseVertexAttributeAliasing(true);
 
 
  In your own shaders if you are building against GL1/2 (default build of
 OSG) then you can simply use the gl_* parameters.
 
  Also have a look at the shaders in OpenSceneGraph-Data and the
 osgshaders example.
  ===
 
 
 
 
  Regards
  Sergey
 
  On Fri, Nov 7, 2014 at 12:14 PM, Liu Xiao  () wrote:
 
   Hi,
  
   When I trying to use the osg 3.2.1 (with OSG_GLES2_AVAILABLE:BOOL=ON )
 example_osgViewerIPhone, I got the following errors:
  
  
   Code:
   VERTEX glCompileShader  FAILED
   VERTEX Shader  infolog:
   ERROR: 0:6: Use of undeclared identifier 'gl_Vertex'
   ERROR: 0:7: Use of undeclared identifier 'gl_FrontColor'
  
   FRAGMENT glCompileShader  FAILED
   FRAGMENT Shader  infolog:
   ERROR: 0:4: 'vec4' : declaration must include a precision qualifier
 for type
   ERROR: 0:5: Use of undeclared identifier 'base'
   ERROR: 0:6: Use of undeclared identifier 'color'
   ERROR: 0:6: Use of undeclared identifier 'gl_Color'
   ERROR: 0:7: Use of undeclared identifier 'color'
  
   glLinkProgram  FAILED
   Program  infolog:
   ERROR: One or more attached shaders not successfully compiled
  
  
  
   My Config file is as follows:
  
  
   Code:
   #ifndef OSG_CONFIG
   #define OSG_CONFIG 1
  
   /* #undef OSG_NOTIFY_DISABLED */
   /* #undef OSG_USE_FLOAT_MATRIX */
   /* #undef OSG_USE_FLOAT_PLANE */
   #define OSG_USE_FLOAT_BOUNDINGSPHERE
   #define OSG_USE_FLOAT_BOUNDINGBOX
   #define OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION
   /* #undef OSG_USE_UTF8_FILENAME */
   #define OSG_DISABLE_MSVC_WARNINGS
  
   /* #undef OSG_GL1_AVAILABLE */
   /* #undef OSG_GL2_AVAILABLE */
   /* #undef OSG_GL3_AVAILABLE */
   /* #undef OSG_GLES1_AVAILABLE */
   #define OSG_GLES2_AVAILABLE
   /* #undef OSG_GL_LIBRARY_STATIC */
   /* #undef OSG_GL_DISPLAYLISTS_AVAILABLE */
   /* #undef OSG_GL_MATRICES_AVAILABLE */
   /* #undef OSG_GL_VERTEX_FUNCS_AVAILABLE */
   /* #undef OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE */
   /* #undef OSG_GL_FIXED_FUNCTION_AVAILABLE */
  
   #endif
  
  
  
  
   Can anyone help with this? Or is there any examples of osg ios can I
 learn?
  
   Thank you!
  
   Cheers,
   Liu
  
   --
   Read this topic online here:
   http://forum.openscenegraph.org/viewtopic.php?p=61538#61538 (
 http://forum.openscenegraph.org/viewtopic.php?p=61538#61538)
  
  
  
  
  
   ___
   osg-users mailing list
()
  
 http

Re: [osg-users] calculate the scale of a pixel

2014-10-30 Thread Sergey Kurdakov
Hi Anton,

nothing prevents you to use the same code with osg

just get

osg::Matrixd viewMatrix=osgcamera-getViewMatrix();
osg::Matrixd projMatrix=osgcamera-getProjectionMatrix();

GLint viewport[4];
viewport[0]=osgcamera-getViewport()-x();
viewport[1]=osgcamera-getViewport()-y();
viewport[2]=osgcamera-getViewport()-width();
viewport[3]=osgcamera-getViewport()-height();

then you might pass
viewMatrix.ptr()
projMatrix.ptr()
viewport
to gluUnProject function

Regards
Sergey




On Thu, Oct 30, 2014 at 4:28 PM, AntonPopov anton.po...@mabi-robotic.com
wrote:

 Hi,

 I would like to calculate the scale of a pixel. In a program in OpenGL, I
 hate it posted a Function. How can I make it for OSG?


 Code:

 Public Function get_Massstab() As Double

 Dim modelmatrix(15) As Double
 Dim projMatrix(15) As Double
 Dim viewMatrix(3) As Integer

 Dim tx1 As Double
 Dim ty1 As Double
 Dim tz1 As Double
 Dim tx2 As Double
 Dim ty2 As Double
 Dim tz2 As Double
 Dim dist As Double

 Gl.glGetDoublev(Gl.GL_MODELVIEW_MATRIX, modelmatrix)
 Gl.glGetDoublev(Gl.GL_PROJECTION_MATRIX, projMatrix)
 Gl.glGetIntegerv(Gl.GL_VIEWPORT, viewMatrix)

 gluUnProject(0, 0, 0, modelmatrix, projMatrix, viewMatrix, tx1, ty1,
 tz1)
 gluUnProject(0, 1, 0, modelmatrix, projMatrix, viewMatrix, tx2, ty2,
 tz2)

 'einen Pixel
 dist = Math.Sqrt((tx1 - tx2) ^ 2 + (ty1 - ty2) ^ 2 + (tz1 - tz2) ^ 2)
 Return dist

   End Function




 Thank you!

 Cheers,
 Anton[/code]

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




 Attachments:
 http://forum.openscenegraph.org//files/size2_801.png
 http://forum.openscenegraph.org//files/size1_776.png


 ___
 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] 转发: Web browser crash when OSGEarth loading large model

2014-10-22 Thread Sergey Kurdakov
Hi Chris,

concerning

have you considered compiling osg and osgEarth 9and their dependencies)
via Emscripten into Javascript/WebGL?

I still plan to put an update to my port of osg to emscripten, so it is
more useful, than in current state, possibly will port osgEarth ( as it is
one of my priority), just was forced to delay my efforts, but currently
move some more with a port.

Anyway. having some experience with such type of activity, I could say
that  the effort required (even considering I put everything I now have,
besides what I already released last year ) would be  much ( several times
) more, than to develop/debug  ActiveX ( I coded ActiveX so could compare
).

one problem for porting osg+osgEarth for web  is that
there is need to write a  new system for texture loading etc, because out
of the box osg is not very suitable for online projects ( as it's main
focus is desktop apps and to some extent smartphones, web is somewhat
different). and also too big models could prove to be a problem for
emscripten too.

Regards
Sergey

On Wed, Oct 22, 2014 at 6:59 PM, Chris Hanson xe...@alphapixel.com wrote:

 Glen, have you considered compiling osg and osgEarth 9and their
 dependencies) via Emscripten into Javascript/WebGL? This would give you a
 cross-browser solution instead of an ActiveX solution.

 It won't be easy, but I think the result might be great.

 I don't know anyone who has used OSG+ActiveX=FireBreath, much less with
 osgEarth thrown into the mix.

 If you want to email me privately, I can talk to you about Emscripten.


 --
 Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
 http://www.alphapixel.com/
 Training • Consulting • Contracting
 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4
 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
 Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry •
 Cryptography • Digital Audio • LIDAR • Kinect • Embedded • Mobile •
 iPhone/iPad/iOS • Android
 @alphapixel https://twitter.com/alphapixel facebook.com/alphapixel (775)
 623-PIXL [7495]

 ___
 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] Low frame rate ( Update Callback on 50 bones ).

2014-10-21 Thread Sergey Kurdakov
Hi Chris,

one of the problem could be delays from sensors.
to make things better  I would suggest to have a three (maybe two will be
enough, but generally an algo is such that it switches lists when either
'sensor' frame is finished and osg frame is finished - thus sensor frame
and osg frame are completely separate and this requires three similar lists
for sensor data ) lists which will store data from sensor - so that sensor
thread pushes data to list and osg reads another list - and you switch
pointers to lists everytime you make a frame() step - this way you don't
wait for sensor data and process it as fast as osg can, but you always have
a fresh data.

Regards
Sergey

On Tue, Oct 21, 2014 at 6:41 PM, Robert Osfield robert.osfi...@gmail.com
wrote:

 Hi Chris,

 How to optimize your application will depend on where the bottleneck is.
 I'd suspect CPU, but as I don't have your application and data in front of
 me I can't really provide any specific advice.

 One thing I would suggest is making sure you are testing performance with
 a release build.  Debug builds, especially under Windows are very slow
 indeed and will suggest bottlenecks that simply don't exist in final
 applications.

 Robert.


 On 21 October 2014 15:20, Chris Hidden ch...@erghis.com wrote:

 Hey everyone.

 I've come a far way since my last post.  Our application is reading
 sensor data from the Leap Motion and we are interpreting this data and
 using OSG to display the hand models on scene.  The issue now is that
 running on my laptop I get a tops of 20 fps.  On other computers with lower
 specs the fr is abysmal.

 The way its set up right now is that we load the fbx model of a hand and
 traverse through its nodes.  If it finds a bone and if it is one of the
 bones we want to affect we attach an updateCallback.  The update callback
 queries our data for a new position and the position is updated using a
 matrix and then the new position is set:


 Code:

 osg::ref_ptrosgAnimation::Bonebone=
 dynamic_castosgAnimation::Bone*(node);

 if (bone)
 {
 ref_ptrosgAnimation::Bone parent
   = bone-getBoneParent();
 const osg::Matrix  matrix
   = _transforms.getMatrix();
 _transforms.update
 ();
 setBoneOrientations
  ();
 setLocalMatrices
   ();
 setLocalTranslationsAndRotations(parent, matrix);





 if (parent)
 bone-setMatrixInSkeletonSpace(fingerSpace *
 fingerTranslation * parent-getMatrixInSkeletonSpace());
 }

 traverse(node, nv);




 The setBoneOrientations(), setLocalMatrices() and
 setLocalTranslationsAndRotation() are methods used to manipulate the data
 so the it fits the position and rototaion on the screen properly. Basically
 converting the data to osg coordinate spaces.

 The viewer is basically just while(!viewer-done())

 I believe in total we end up attaching a callback to about 40 - 50
 bones.  20-25 on each hand.  This doesn't feel like too much to process but
 Im no expert... far from it.   Is this the reason causing my low frame
 rate?  If so what are some steps or things to start looking at to improve
 performance.

 Thanks everyone!

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





 ___
 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] OpenNI(Kinect) and osgAnimation

2014-10-14 Thread Sergey Kurdakov
Hi Cledja

I did not try kinect myself, but there are few osg-kinect projects which
are supposed to work

https://github.com/mrogowski/KinectDemo
https://code.google.com/p/livescene/source/checkout
http://code.sat.qc.ca/redmine/projects/spinframework

try to look there.

Regards
Sergey


On Tue, Oct 14, 2014 at 5:53 PM, Cledja Rolim cle...@yahoo.com.br wrote:

 Hi,

 I saw that this topic is a little bit old, but someone could help.
 I'm trying to animate an avatar with kinect too. Some parts works, like
 arms, head, but when I try to move the hands, they don't move.
 Is there someone who had success to animate an avatar with kinect that
 could help me?
 I think that as the hand has a lot of bones, something in the hierarchy
 doesn't work well.

 Thanks for any help.

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





 ___
 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-users Digest, Vol 88, Issue 7

2014-10-10 Thread Sergey Kurdakov
Hi yangzhongqiyzq

first  if you want to be addressed by human name, please provide this in
your signature under post (anyway -  as you might notice everyone here has
quite a distinct human name, so having a well recognizable, human name
which other can address  is a right way to start talk in the list ),

another point - do not use reply to digest - it is very difficult to
follow, digests are just for reading - not for keeping discussions.

subscribe to separate messages and start new thread if you have a new
question.
do not pollute discussion with all day messages which you did not bother to
delete, nor changed header of your message.

and finally  to respond

to access texture coordinates you need to pass it to shader via having in
vertex shader

varying vec2 v_TexCoordinate;

assigning it:

v_TexCoordinate = gl_MultiTexCoord0.st;

then using v_TexCoordinate in your pixel shader

Regards
Sergey

On Fri, Oct 10, 2014 at 1:44 PM, yangzhongqiyzq yangzhongqi...@163.com
wrote:


 hi:group
 how to set texture coordinates  in osg shader?
 I want to set texture coordinates to gl_Coordinates[0],how can I?
 thanks!





 At 2014-10-07 09:14:55, osg-users-requ...@lists.openscenegraph.org wrote:
 Send osg-users mailing list submissions to
  osg-users@lists.openscenegraph.org
 
 To subscribe or unsubscribe via the World Wide Web, visit
  
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
 or, via email, send a message with subject or body 'help' to
  osg-users-requ...@lists.openscenegraph.org
 
 You can reach the person managing the list at
  osg-users-ow...@lists.openscenegraph.org
 
 When replying, please edit your Subject line so it is more specific
 than Re: Contents of osg-users digest...
 
 
 Today's Topics:
 
1. Re: How do I adapt the osgViewer::Viewer in order to   have my
   model in fullscreen mode? (Filipe P)
2. Re: LineSegmentIntersector bug? (weijianggood)
 
 
 --
 
 Message: 1
 Date: Tue, 07 Oct 2014 00:24:17 +0200
 From: Filipe P filipe.edu.pimen...@gmail.com
 To: osg-users@lists.openscenegraph.org
 Subject: Re: [osg-users] How do I adapt the osgViewer::Viewer in order
  to  have my model in fullscreen mode?
 Message-ID: 1412634257.m2f.61...@forum.openscenegraph.org
 Content-Type: text/plain; charset=UTF-8
 
 Hi Robert,
 thanks for your reply.
 
 I guess it should be the setUpViewOnSingleScreen() call.
 Unfortunately, the result was the same.
 
 Could you please give me an example or hints that demonstrate a fullscreen 
 model or image?
 
 Taking this problem, all the evaluation that I'm doing with OSG is going 
 very well.
 I'm happy with the performance of this scene graph.
 
 Thanks in advanced.
 
 Best regards,
 Filipe
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=61255#61255
 
 
 
 
 
 
 
 --
 
 Message: 2
 Date: Tue, 7 Oct 2014 09:15:28 +0800
 From: weijianggood weijiangg...@163.com
 To: osg-users osg-users@lists.openscenegraph.org
 Subject: Re: [osg-users] LineSegmentIntersector bug?
 Message-ID: 201410070915268413...@163.com
 Content-Type: text/plain; charset=utf-8
 
 Hello, Robert,
 
 Thank you for the suggestion.
 Currently, I am using osg3.0.1, intersector does not have the function 
 setPrecisionHint.
 So I download the newest  version of osg from svn, then compile it.
 
 Finally,
 I add  the following line into my test code:
 intersector-setPrecisionHint(osgUtil::Intersector::PrecisionHint::USE_DOUBLE_CALCULATIONS);
 It worked. Woo!
 Thanks again.
 
 Rubby
 
 
 
 
 
 
 
 
 From: Robert Osfield
 Date: 2014-10-06 16:22
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] LineSegmentIntersector bug?
 HI ? Could you sign your post so we know how to address you :-)
 
 
 From the description of the problem it looks likely to be a precision issue 
 where the line segment aligns right along the edge between two triangles 
 with neither triangle passing the test.
 
 
 In the svn/trunk version of the OSG there is a 
 IntersectionVisitor::setPrecisionHint(PrecisionHint hint) method that you 
 can use to hint to the intersectors to use double maths.  The 
 LineSegmentIntersector supports this.
 
 
 Could you try this out to see if it helps?
 
 Robert.
 
 
 
 On 5 October 2014 09:51, weijianggood weijiangg...@163.com wrote:
 
 
 Hi,
 When i use LineSegmentIntersector in the following code.
 there must be 8 lines. but after I run the code, only 7 lines exist.
 
 
 
 int main( int argc, char** argv ){
 
 float height = 5.f;
 
 osg::ref_ptrosg::TessellationHints hints;
 hints = new osg::TessellationHints;
 hints-setDetailRatio(0.5f);
 hints-setCreateBody(true);
 hints-setCreateBottom(false);
 hints-setCreateTop(false);
 osg::ref_ptrosg::Geode mynode = new osg::Geode;
 osg::ref_ptrosg::ShapeDrawable drawable = 

Re: [osg-users] osgAndroidExampleGLES2 can not drag and zoom the model cow.osg.

2014-10-03 Thread Sergey Kurdakov
Hi Xia,

for loading cow.osg there was answer - there is need to write your own
loader, which will pass textures to respective  shaders

to save osg models in OpenGL ES 2.0 friendly format there is a write plugin
https://github.com/cedricpinson/osg/tree/master/src/osgPlugins/osgjs

but you would have to write a loader yourself

 though older files from https://code.google.com/p/hogbox/ - you can
retrieve older versions of files via source control app, as new code has
little code for loaders,  have some hints to help to write your own loader.


Regards
Sergey

On Sun, Sep 28, 2014 at 7:06 AM, Xia Qingran qingran@gmail.com wrote:

 And there is another problem, the texture of cow.osg can not be loaded. I
 have copied the Images directory to my phone.

 ...

 Thank you!

 Cheers,
 Xia

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





 ___
 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] [3rdparty] Animated 3d-models for OSG

2014-09-23 Thread Sergey Kurdakov
Hi

FBX has only one animation and this is well-known feature.

no, it is well known that Max supports one animation in FBX, but FBX itself
can support multiple animations and Motion Builder is a tool to work with
them.

Regards
Sergey

On Tue, Sep 23, 2014 at 1:50 PM, Maxim Kuzmin maxri...@mail.ru wrote:

 Hi,

 FBX has only one animation and this is well-known feature. Collada DAE has
 several animations, but osg parses them as one big animation. Osgconv
 converts this .dae file to .osgt file with one animation. So, it seems that
 this solution doesn't work.
 Is there any other way to get separate animations? Unfortunately,
 copy-paste method is unacceptable.

 Thank you!

 Cheers,
 Maxim

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





 ___
 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] [3rdparty] Animated 3d-models for OSG

2014-09-23 Thread Sergey Kurdakov
Hi Maxim,

But in my OSG program I still have only one animation in list. Why so?

cannot say, maybe some else will help you with this.

but  possibly collada to fbx converter ( such as
http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112id=20481519 )
will make a trick?

Regards
Sergey

On Tue, Sep 23, 2014 at 5:36 PM, Maxim Kuzmin maxri...@mail.ru wrote:

 Thanks for reply, Sergey! I have another question now.
 I have .dae file with 3d-model made with 3ds Max. I've read its code and
 found out, that there are several animations inside library_animations
 tag. But in my OSG program I still have only one animation in list. Why so?

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





 ___
 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] [3rdparty] Animated 3d-models for OSG

2014-09-22 Thread Sergey Kurdakov
Hi Maxim,

I do not work with animations much for quite a while, so take this with
grain of salt,

Either fbx or collada files could have multiple animations.
As they are text files ( as well as osgt itself ) - it is possible just do
some cut an paste work with text editor.

when being converted to osg - those animations will be preserved.

Otherwise such packages as Motion Builder  allow to put several animations.

Regards
Sergey

On Mon, Sep 22, 2014 at 12:54 PM, Maxim Kuzmin maxri...@mail.ru wrote:

 Hi,

 I have .osgt file with valid 3d-model. It has one animation for all
 elements of the scene. As I saw in OSG examples (nathan.osg and
 bignathan.osg) it is possible to create a file with some separate
 animations. But as far as I know, 3dsmax and Blender can make animations in
 one timeline only, i.e. one animation per scene.
 So the question is - what 3d-editor was used to create nathan.osg and
 bignathan.osg? In other words, what 3d-editor may be used for creation of
 one scene with some separate animations?

 Thank you!

 Cheers,
 Maxim

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





 ___
 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] About *BezierChannel

2014-09-17 Thread Sergey Kurdakov
Hi Maxim,

it's in  osgWrappers, otherwise,

if to search where LinearChannel occures in code - then you might, I think,
find corresponding places outside of osgWrappers and place respective code
there.

So, you are right - it is not in main code, but code itself is there and
can be reused.

Regards
Sergey

On Wed, Sep 17, 2014 at 4:00 PM, Maxim Kuzmin maxri...@mail.ru wrote:

 Hi Sergey,

 Unfortunately, I didn't find such file.

 Thank you!

 Cheers,
 Maxim

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





 ___
 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] About *BezierChannel

2014-09-16 Thread Sergey Kurdakov
Hi Maxim,

while I do not work much with animations, it looks like there is
Double/Float CubicBezierChannel in osg .

they are read  in to graph from file in
\serializers\osgAnimation\Animation.cpp

so you might debug what goes wrong there as you have complete source code
for osg.

Regards
Sergey

On Tue, Sep 16, 2014 at 3:21 PM, Maxim Kuzmin maxri...@mail.ru wrote:

 OK, I can rephrase it once again :)
 Does OSG support 3d models with *BezierChannel and *StepChannel?

 Thank you!

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





 ___
 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] Building OSG with OpenGL ES 2

2014-09-10 Thread Sergey Kurdakov
Hi Joey

I achieved a result by using SDL 2 with EGL enabled,

see a sample app  for a derived from osg project ( it is almost osg just
compiled to be used under emscripten ), hope the code  helps

https://github.com/Kurdakov/emscripten_OSG/blob/master/examples/osgviewerSDL2EmscriptenSTATIC/osgviewerSDL2Emscripten.cpp

in case you are interested - I used ANGLE ad OpenGL ES 2.0 provider ( not
any wgl functions ) but to force SDL 2 to use ANGLE

in file \SDL-2.0.x\src\video\windows\SDL_windowsopengl.c in function

void WIN_GL_InitExtensions(_THIS)

I had to comment following lines

if (HasExtension(WGL_EXT_create_context_es2_profile, extensions)) {
_this-gl_data-HAS_WGL_EXT_create_context_es2_profile = SDL_TRUE; }

hope those steps are not intimidating.


Regards

Sergey



On Wed, Sep 10, 2014 at 9:22 AM, Chris Hanson xe...@alphapixel.com wrote:

 Unfortunately, GLES2 on Windows is not so easy, because there really isn't
 a GraphicWindowEGL implementation that would work on Windows.

 I started writing one, but got bogged down and had to abandon it.

 You might consider not compiling the GraphicsWindowWin32 code and just
 using GraphicsWindowEmbedded and using EGL functions in your app's code to
 create a context, and then pass it to OSG.
 ​
 Also, we might be able to help you more if we knew what exactly you were
 trying to accomplish in the end.

 ___
 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] Texture modes in OpenGL ES 2.0 in OSG

2014-09-09 Thread Sergey Kurdakov
Hi Robert,

while it would be better to send a fix, but I would rather report it here,
because unsure what is best solution ( the code in discussion is both
relevant to dev version and latest stable version )

in osg/State header file there is a function

inline bool applyModeOnTexUnit(unsigned int
unit,StateAttribute::GLMode mode,bool enabled,ModeStack ms)

which applies texture mode for texture, say for Texture2D after getting

virtual GLenum getTextureTarget() const { return GL_TEXTURE_2D; }

it sets

glEnable(GL_TEXTURE_2D)

the problem is, that for OpenGL ES 2.0 enabling  GL_TEXTURE_2D is a mistake.
And while some drivers might be permissive, my test with ANGLE on windows
provides a clear error message if glEnabled is called.

currently I just omit enabling mode #if defined(OSG_GLES2_AVAILABLE)
but maybe a better solution exists.

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


Re: [osg-users] Texture modes in OpenGL ES 2.0 in OSG

2014-09-09 Thread Sergey Kurdakov
Hi Robert,

my previous 'solution' was y wrong, because there are other possible modes
being assosiated.

So better  as no Texture modes are associated with textures in OpenGL ES 2.0

to ifndef code in

osg/Texture header file

instead of

 virtual bool getModeUsage(StateAttribute::ModeUsage usage) const
{
usage.usesTextureMode(getTextureTarget());
return true;
}

to have

virtual bool getModeUsage(StateAttribute::ModeUsage usage) const
{
#ifndef OSG_GLES2_AVAILABLE
usage.usesTextureMode(getTextureTarget());
return true;
#else
return false;
#endif

}


Regards
Sergey

On Tue, Sep 9, 2014 at 3:27 PM, Sergey Kurdakov sergey.fo...@gmail.com
wrote:

 Hi Alistair,

 in that case was to just use setTextureAttribute

 a correct solution,

 So possibly a fix for those unaware of this subtle difference to  just
 have in setTextureAttributeAndModes for OpenGL ES 2.0 a similar code as for
 setTextureAttribute

 void StateSet::setTextureAttributeAndModes(unsigned int
 unit,StateAttribute *attribute, StateAttribute::GLModeValue value)
 {
 if (attribute)
 {

 if (attribute-isTextureAttribute())
 {
 if (valueStateAttribute::INHERIT)
 {
 removeTextureAttribute(unit,attribute-getType());
 }
 else
 {

 setAttribute(getOrCreateTextureAttributeList(unit),attribute,value);
 #ifndef OSG_GLES2_AVAILABLE
 setAssociatedTextureModes(unit,attribute,value);
 #endif
 }
 }
 else
 {
 OSG_NOTICEWarning: non texture attribute
 'attribute-className()' passed to
 setTextureAttributeAndModes(unit,attr,value), std::endl;
 OSG_NOTICE assuming
 setAttributeAndModes(attr,value) instead.std::endl;
 OSG_NOTICE please change calling code to use
 appropriate call.std::endl;
 setAttribute(attribute,value);
 }
 }
 }

 Regards
 Sergey

 On Tue, Sep 9, 2014 at 2:58 PM, Alistair Baxter alist...@mve.com wrote:

I found the solution in that case was to just use setTextureAttribute
 rather than setTextureAttributeAndModes in OpenGL ES 2 builds.



 However, since glEnable(GL_TEXTURE_2D) is a mistake in GLES2, it would be
 better if osg didn’t ever try to do that for GLES2 contexts.

 ___
 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] Texture coordinates to OpenGL ES 2.0 shader

2014-09-08 Thread Sergey Kurdakov
Hi All,

there is a nice answer on  how to use textures in shader
here http://forum.openscenegraph.org/viewtopic.php?t=8273 ( see answer
by Skylark
(Jean-Sébastien Guay) )

now in OpenGL ES 2.0 there is no such feature as possibility to address

gl_TexCoord[0].st

there is a need to pass it in a separate step so in shader it is possible
to access texture coordinate - say by such declaration:

attribute vec2 a_TexCoordinate;

thus setting setTexCoordArray won't automatically pass any data, and
overall lack of texture coordinates seem to brake the overall osg way to
pass everything to program.

so the question is how to appoach the issue to pass texture coordinates to
OpenGL ES 2.0 in unified way?

Just a thought then:
OpenSceneGraph has a nice feature like osg_ModelViewMatrix, ideally for
platforms which lack gl_TexCoord support there could be similar build in
attributes/uniforms, but I cannot find them.

so if there is not unified way already ( maybe there is , just I'm not
aware ) any pointers ( or what should be changed to add a glue to bring
setTexCoordArray to shader attributs/uniforms ) are welcome.

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


Re: [osg-users] Texture coordinates to OpenGL ES 2.0 shader

2014-09-08 Thread Sergey Kurdakov
Hi Robert,

thanks, really there is

osg_MultiTexCoordi

somehow missed it

Regards
Sergey

On Mon, Sep 8, 2014 at 7:07 PM, Robert Osfield robert.osfi...@gmail.com
wrote:

 HI Sergey,

 osg::State has support for aliasing the gl_Vertex, gl_Color etc.
 attributes to osg_Vertex, osg_Color etc just in the same way as
 gl_ModelViewMatrix is mapped to osg_ModelViewMatrix etc.  You just need to
 enable it via osg::State::setUseVertexAttributeAliasing(true); i.e.


 graphicscontext-getState()-osg::State::setUseVertexAttributeAliasing(true);

 Robert.

 On 8 September 2014 14:49, Sergey Kurdakov sergey.fo...@gmail.com wrote:

 Hi All,

 there is a nice answer on  how to use textures in shader
 here http://forum.openscenegraph.org/viewtopic.php?t=8273 ( see answer
 by Skylark (Jean-Sébastien Guay) )

 now in OpenGL ES 2.0 there is no such feature as possibility to address

 gl_TexCoord[0].st

 there is a need to pass it in a separate step so in shader it is possible
 to access texture coordinate - say by such declaration:

 attribute vec2 a_TexCoordinate;

 thus setting setTexCoordArray won't automatically pass any data, and
 overall lack of texture coordinates seem to brake the overall osg way to
 pass everything to program.

 so the question is how to appoach the issue to pass texture coordinates
 to OpenGL ES 2.0 in unified way?

 Just a thought then:
 OpenSceneGraph has a nice feature like osg_ModelViewMatrix, ideally for
 platforms which lack gl_TexCoord support there could be similar build in
 attributes/uniforms, but I cannot find them.

 so if there is not unified way already ( maybe there is , just I'm not
 aware ) any pointers ( or what should be changed to add a glue to bring
 setTexCoordArray to shader attributs/uniforms ) are welcome.

 Regards
 Sergey




 ___
 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] Proper way to display a HUD

2014-09-02 Thread Sergey Kurdakov
Hi Chris,

I suppose I could use something other than an OSG::Image to bind to the
BYTE property of my struct.

whatever you bind, the way you copy rendered results to layered window (
see your
memcpy which is exactly copying via system memory  )  will move video
memory to system memory and this is a bottleneck

the suggestion was to avoid this step and perform whatever you want in
video memory ( even if a copy will occur- the copy between video memory is
much faster than a copy to system memory.

You might remember, I already sent you three approaches to avoid working
via system memory ( maybe others will find this tip useful too in case of
such an attempt ).

1) use windows DWM trick as in http://www.youtube.com/watch?v=4qWKSYWIqdk

the code  to look at how it is achived is here
https://github.com/sphair/ClanLib/tree/master/Examples/GUI/GUI_Layered

the idea is here is that you render using DWM system calls  and then
compose layered windows without old layered windows api which you try to
use to achive result. Here  layering is achieved by exploiting  the fact
that in new windows ( since Vista ) all windows first are rendered to
offscreen surface, but then are composed to produce final screen result  -
you will be limited here to any windows operation system above windows xp (
but it is already retired and Vista is also not widely used - so limiting
yourself just to Win7+ will make all coding much easier ). BTW on linux the
same result possibly could be achieved via wayland compositor.

You might compile ClanLib and see how that achieved - it is fairly easy and
takes just few lines of code during creation of window and  the complete
code to achive what you need is provided, so you will need just add the
same code to osg window creation function ( and use appropriate flags
elsewhere to use DWM hack, but still, as in this example it is fairly easy
to achive ).

2) use http://msdn.microsoft.com/en-us/magazine/ee819134.aspx approach and
then https://sites.google.com/site/snippetsanddriblits/OpenglDxInterop  to
copy opengl rendered result  to Direct2D layered window in video memory  (
currently NV_DX_interop
http://www.opengl.org/registry/specs/NV/DX_interop2.txt and NV_DX_interop2
http://www.opengl.org/registry/specs/NV/DX_interop2.txt are supported on
almost all video cards ), that might not work, due to possible problems
with very difficult path via Direct3D/Direct2D texture, but still it is
possible that it will work and will give you better results than now

3) you might use rendering with OpenGL ES with osg ( though you would need
to have your own model loader ) via  ANGLE to use
http://msdn.microsoft.com/en-us/magazine/ee819134.aspx trick, as final
rendered result in ANGLE might be a direct3d texture, which you could apply
to Direct2D layered window.

all approaches are not easy to implement to novice, but still - in case you
want to significantly improve fps - you should avoid working via system
memory, maybe someone else can offer some other insights - but I think that
there are hardly any more, so  you still will have to implement one of
suggested approaches. And looks like the first suggested approach is most
simple one and also can be possibly ported to linux, at least ClanLib team
tries to have that example to run on linux too ,to significantly improve
fps for the task you wish to solve.

Regards
Sergey



On Mon, Sep 1, 2014 at 7:27 PM, Chris Hidden ch...@erghis.com wrote:

 Hey Robert


 
  Thanks for the more detailed explanation.  From what I can make out you
 are able to render the 3 models to a pbuffer than render this with
 transparency over the desktop OK, this part if functioning as intended.  Is
 this correct?
 


 Yes this is correct!

 As for the HUD Ill try getting it working in a standard OSG graphics
 context first as you said.  Probably the best idea.

 As far as your suggestions for optimization.  I think I understand.
 However I was under the impression that the osg::Image was the pbuffer.

 In order to to my transparent screen trick I have a struct:


 Code:

 typedef struct
 {
 int width;
 int height;
 int pitch;
 HDC hdc;
 HBITMAP hBitmap;
 BITMAPINFO  info;
 BYTE*pPixels;
 } Scene;




 Then I initiate the struct with some init values.  Then the I do a memcpy
 from the pbuffer/image to the struct:


 Code:

 for (int i = 0; i  g_image-t(); ++i)
 {
 memcpy(g_scene.pPixels[g_scene.pitch * i],
 g_image-data()[((sHeight - 1) - i) * (sWidth *
 4)],
 sWidth * 4);
 }




 Here g_image is my osg::image and g_scene is my struct.  Once I have
 copied the data I redraw to my layered window .  This method takes care
 of applying the necessary actions using BLENDFUNCTION and
 UpdateLayeredWindow.


 Code:

 void RedrawLayeredWindow()
 {
 // 

Re: [osg-users] Transparent Window Application

2014-08-22 Thread Sergey Kurdakov
Hi Chris,

I think that

the use of FBO in place of pbuffer,

and use of async read pixels see my message
https://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg50831.html
could improve speed a bit in your case.

Regards
Sergey


On Fri, Aug 22, 2014 at 11:55 AM, Chris Hidden ch...@erghis.com wrote:

 Ok, with your pushes in the right direction I have finally managed to get
 this working!  :D. Its not very performance friendly but that I can
 optimize later.

 Ill break it down so that people who are looking to do somethings similar
 can see what I did and suggest betters ways of doing it if they want :D.

 The first step is to take a look at dhpowares code.  His open GL layered
 window example is the basis for a lot of what I did.
 http://www.dhpoware.com/demos/glLayeredWindows.html

 Dhpoware defines a bunch of constants to help set up the OpenGL and OpenGL
 Extensions in his code.  A lot of these we don't need however as OSG takes
 care of a lot of this for us.  We also don't need the methods:


 Code:

 InitChekerPatternTexture();
 InitGLExtensions();
 InitPBuffer();
 InitGL();




 These methods do things that OSG takes care of for us.  We can also remove
 the Struct called Vertex and the Vertex object g_cube as we are using our
 own models.

 I changed the Image struct to Scene instead of image just to make things
 easier for myself.  The struct itself remains the same:


 Code:

 typedef struct
 {
 int width;
 int height;
 int pitch;
 HDC hdc;
 HBITMAP hBitmap;
 BITMAPINFO  info;
 BYTE*pPixels;
 } Scene;




 I also added a few global variables to make things easier while I was
 trying to figure this out:


 Code:

 /**
 *   Handle to the current Instance
 */
 HINSTANCE   g_hInst;
 /**
  *  Screen Horizontal x
  */
 int sLeft;
 /**
 *   Screen Vertical y
 */
 int sTop;
 /**
 *   Width of the screen
 */
 int sWidth;
 /**
 *   Height of the screen
 */
 int sHeight;

 /**
  *  Viewer for the OSG engine
  */
 osg::ref_ptrosgViewer::Viewer g_viewer;
 /**
 *   Image for the off screen pbuffer for the osg Scene
 */
 osg::ref_ptrosg::Imageg_image;
 /**
 *   OSG camera object for our scene
 */
 osg::ref_ptrosg::Camera   g_camera;





 With WinMain we establish the layered window as shown in the example
 except I use sTop, sLeft, sWidth and sHeight to set the createWindow
 x,y,width and height attriubutes:


 Code:

 g_hWnd = CreateWindowEx(
 WS_EX_LAYERED | WS_EX_TOPMOST,  // 32 bit value declaring
 the extended window style
 wcl.lpszClassName,  // Null
 terminated string.  Class name.
 _T(GL Layered Window Demo),   // Null terminated
 string.  Window Name.
 WS_POPUP,   //
 32 but value declaring the style of the window.
 sLeft,  //
 int x pos of window
 sTop,   //
 int y pos of window.
 sWidth, //
 int width of window
 sHeight,//
 int height of window.
 0,
   // HWND handle to parent window, 0 if none.
 0,
   // HMENU handle to menu
 wcl.hInstance,  //
 HINSTANCE handle to the instance of the module.
 0);




 Then I built a small method to set the full screen:


 Code:

 void SetToFullScreen()
 {
 RECT desktop;

 const HWND hDesk = GetDesktopWindow();
 GetWindowRect(hDesk, desktop);

 sLeft   = desktop.left;
 sTop= desktop.top;
 sWidth  = desktop.right - sLeft;
 sHeight = desktop.bottom- sTop;
 }




 Now that the window is full screen and the layered window is established
 we need to set up the WindowProc method to handle messages:


 Code:

 LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM
 lParam)
 {
 static TCHAR szBuffer[32] = { 0 };

 switch (msg)
 {
 case WM_CREATE:
 initOSG(hWnd);
 return 0;

 case WM_DESTROY:
 PostQuitMessage(0);
 return 0;

 case WM_KEYDOWN:
 if (wParam == VK_ESCAPE)
 {
 SendMessage(hWnd, WM_CLOSE, 0, 0);
 return 0;
 }
 break;

 default:
 break;
 }

 return DefWindowProc(hWnd, msg, wParam, lParam);
 }




 This looks a bit different as I didn't need the timer functionality 

Re: [osg-users] Transparent Window Application

2014-08-21 Thread Sergey Kurdakov
Hi Chris,

for read pixels there are  examples

http://trac.openscenegraph.org/projects/osg//browser/OpenSceneGraph/trunk/examples/osgscreencapture/osgscreencapture.cpp

https://code.google.com/p/osgworks/source/browse/trunk/src/osgwTools/ScreenCapture.cpp

Regards
Sergey




On Thu, Aug 21, 2014 at 12:27 PM, Chris Hidden ch...@erghis.com wrote:

 Yes! Ok, I read that forum and it gave me a better idea of how I might do
 this.   To account for transparency though I need to get the current
 pbuffer and put it into a local byte array.

 Something like


 Code:

 static BYTE pixels[width * height * 4] = {0};

 unsigned char* ptr = g_image-data();

 for (unsigned int i = 0; i  size; i += 2)
 {
 pixels[i] = (ptr[i / 2]  4);
 pixels[i + 1] = (ptr[i / 2]  0x0F);
 }




 Now this doens't really work of course, I just get an empy BYTE array.

 Normally this could be done with :


 Code:

 glPixelStorei(GL_PACK_ALIGNMENT, 1);
 glReadPixels(0, 0, IMAGE_WIDTH, IMAGE_HEIGHT, GL_BGRA_EXT,
 GL_UNSIGNED_BYTE, pixels);





 I know that OSG has a readPixels method.  But I don't really understand
 how to read the pixels into a byte array.  The optional packing parameter
 is an int in the osg::image::readpixels.  I just lack understanding of how
 to make this conversion.

 How would I got about doing this?  Is there maybe a better way in this
 case than readpixels?

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





 ___
 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] Transparent Window Application

2014-08-19 Thread Sergey Kurdakov
Hi Chris,

I did not followed your code, sorry, but reading the question  I realized
that what you need is a silent renderer

see discussion here http://forum.openscenegraph.org/viewtopic.php?t=7202

just read all the discussion on three forum pages.
then taking rendered images - you can put them into layered windows.

Regards
Sergey






On Tue, Aug 19, 2014 at 8:50 PM, Chris Hidden ch...@erghis.com wrote:

 Anyone have any ideas?

 This is what Im working on so far.  I have used the exmaple linked in the
 above post.

 I create a layered window:


 Code:

 int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
 LPSTR lpCmdLine, int nShowCmd)
 {
 DetectMemoryLeaks();

 MSG msg = { 0 };
 WNDCLASSEX wcl = { 0 };

 wcl.cbSize = sizeof(wcl);
 wcl.style = CS_HREDRAW | CS_VREDRAW;
 wcl.lpfnWndProc = WindowProc;
 wcl.cbClsExtra = 0;
 wcl.cbWndExtra = 0;
 wcl.hInstance = hInstance;
 wcl.hIcon = LoadIcon(0, IDI_APPLICATION);
 wcl.hCursor = LoadCursor(0, IDC_ARROW);
 wcl.hbrBackground = 0;
 wcl.lpszMenuName = 0;
 wcl.lpszClassName = _T(GLLayeredWindowClass);
 wcl.hIconSm = 0;

 if (!RegisterClassEx(wcl))
 return 0;

 g_hWnd = CreateWindowEx(WS_EX_LAYERED | WS_EX_TOPMOST,
 wcl.lpszClassName,
 _T(GL Layered Window Demo), WS_POPUP, 0, 0, IMAGE_WIDTH,
 IMAGE_HEIGHT, 0, 0, wcl.hInstance, 0);

 if (g_hWnd)
 {

 if (Init())
 {
 ShowWindow(g_hWnd, nShowCmd);
 UpdateWindow(g_hWnd);

 while (true)
 {
 if (PeekMessage(msg, 0, 0, 0, PM_REMOVE))
 {
 if (msg.message == WM_QUIT)
 break;

 TranslateMessage(msg);
 DispatchMessage(msg);
 }
 else
 {
 DrawFrame();
 }
 }
 }

 Cleanup();
 UnregisterClass(wcl.lpszClassName, hInstance);
 }

 return (int)(msg.wParam);
 }




 Then I establish the osg reference object for my scene in the WindProc:


 Code:

 LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM
 lParam)
 {
 static TCHAR szBuffer[32] = { 0 };

 switch (msg)
 {
 case WM_CREATE:
 {
 osg::ref_ptrosg::Referenced windata =
 new
 osgViewer::GraphicsWindowWin32::WindowData(hWnd);

 osg::ref_ptrosg::GraphicsContext::Traits traits =
 new osg::GraphicsContext::Traits;
 traits-x = 0;
 traits-y = 0;
 traits-width = 800;
 traits-height = 600;
 traits-windowDecoration = false;
 traits-doubleBuffer = true;
 traits-pbuffer = true;
 traits-inheritedWindowData = windata;

 osg::ref_ptrosg::GraphicsContext gc =

 osg::GraphicsContext::createGraphicsContext(traits.get()
 );
 osg::ref_ptrosg::Camera camera = new osg::Camera;
 camera-setGraphicsContext(gc);
 camera-setViewport(
 new osg::Viewport(0, 0, traits-width,
 traits-height));
 camera-setClearMask(GL_DEPTH_BUFFER_BIT |
 GL_COLOR_BUFFER_BIT);
 camera-setClearColor(osg::Vec4f(0.0f, 0.0f, 0.0f, 0.0f));
 camera-setProjectionMatrixAsPerspective(
 30.0f, (double)traits-width / (double)traits
 -height, 1.0, 1000.0);
 g_viewer = new osgViewer::Viewer;
 g_viewer-setCamera(camera.get());
 g_viewer-setSceneData(osgDB::readNodeFile(cessna.osg));
 g_viewer-setKeyEventSetsDone(0);
 g_viewer-setCameraManipulator(
 new osgGA::TrackballManipulator);


 return 0;
 }


 case WM_DESTROY:
 PostQuitMessage(0);
 return 0;

 case WM_KEYDOWN:
 if (wParam == VK_ESCAPE)
 {
 SendMessage(hWnd, WM_CLOSE, 0, 0);
 return 0;
 }
 break;

 case WM_NCHITTEST:
 return HTCAPTION;   // allows dragging of the window

 case WM_TIMER:
 _stprintf(szBuffer, _TEXT(%d FPS), g_frames);
 SetWindowText(hWnd, 

Re: [osg-users] Mouse World Position in Perspective View

2014-07-26 Thread Sergey Kurdakov
Hi Sonya,

I think you could solve your problem if you understand theory what goes
during the whole process and test if anything works from simplest examples,
then after  tests  you'll uncover a problem

for theory I think following to links are useful, but see not only first
link, but also second

http://www.mvps.org/directx/articles/rayproj.htm
http://www.mvps.org/directx/articles/improved_ray_picking.htm


Regards
Sergey


On Sat, Jul 26, 2014 at 1:53 AM, Sonya Blade sonyablade2...@hotmail.com
wrote:

 Dear All,

 I'm having a hard time getting the correct results for the mouse position
 in world coordinates.
 The problem is: retrived world mouse position is not even close to those
 when I hoover over an
 object so I couldn't find any correlation between to which vertex of
 object is mouse close to.

 To obtain the world mouse position I use world_mouse =
 screen_mouse*inverse(MVPW), for obtaining
 the vertex position I use LineSegmentIntersector 
 getWorldIntersectionPoint() and there is absolutey
 not any coherent value that I can find any relation. My aim was to snap
 the mouse to the closest vertex
 in object, but produced results are as follow.

  world coords vertex(6.97538 20.55 18.7482
  local coords vertex(0.876922 -3.74963 4
 Mouse Position -101.794 44.6545 -130.128

 Your help will be appreciated,

 ___
 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] Mouse World Position in Perspective View

2014-07-26 Thread Sergey Kurdakov
Hi Sonya

but what happens if mouse is close enough and supposed
to be snapped to vertex but mouse is not on object.?

I can think of two things -  set bounding sphere to be larger so that you
intersect object when you click near object ( see
http://vtp.googlecode.com/svn-history/r7601/trunk/TerrainSDK/vtlib/vtosg/NodeOSG.cpp
as an example), then create custom intersector to suite your needs see
custom intersectors here
http://www.packtpub.com/sites/default/files/downloads/6884_Chapter10.pdf

Regards
Sergey



On Sat, Jul 26, 2014 at 11:11 PM, Sonya Blade sonyablade2...@hotmail.com
wrote:

 Hi Sergey,

 Thanks for the tutorial, but I believe that the problem is: Casted ray
 with world_mouse = screen_mouse*inverse(MVPW)
 matrix manipulation is unware of whether it crossed an object or not, it
 simply returns near/far points of frustum.
 On the other hand using, the LineSegmentIntersector 
 getWorldIntersectionPoint()   and example in *OSG cookbook*
 *Ch3 Selecting a point on the model** solves* the issue of what is behind
 the mouse but I believe that it has drawbacks.
 Because this tecnique requires the mouse to be hoovered on object, but
 what happens if mouse is close enough and supposed
 to be snapped to vertex but mouse is not on object.?

 The above is my intuitive reasoning , I tried to put it in succinct manner
 and hope that I well versed it. If it is not clear  I'll try to
 ealaborate it with images.

 Regards,
 --
 Date: Sat, 26 Jul 2014 14:11:38 +0400
 From: sergey.fo...@gmail.com
 To: osg-users@lists.openscenegraph.org
 Subject: Re: [osg-users] Mouse World Position in Perspective View


 Hi Sonya,

 I think you could solve your problem if you understand theory what goes
 during the whole process and test if anything works from simplest examples,
 then after  tests  you'll uncover a problem

 for theory I think following to links are useful, but see not only first
 link, but also second

 http://www.mvps.org/directx/articles/rayproj.htm
 http://www.mvps.org/directx/articles/improved_ray_picking.htm


 Regards
 Sergey


 On Sat, Jul 26, 2014 at 1:53 AM, Sonya Blade sonyablade2...@hotmail.com
 wrote:

 Dear All,

 I'm having a hard time getting the correct results for the mouse position
 in world coordinates.
 The problem is: retrived world mouse position is not even close to those
 when I hoover over an
 object so I couldn't find any correlation between to which vertex of
 object is mouse close to.

 To obtain the world mouse position I use world_mouse =
 screen_mouse*inverse(MVPW), for obtaining
 the vertex position I use LineSegmentIntersector 
 getWorldIntersectionPoint() and there is absolutey
 not any coherent value that I can find any relation. My aim was to snap
 the mouse to the closest vertex
 in object, but produced results are as follow.

  world coords vertex(6.97538 20.55 18.7482
  local coords vertex(0.876922 -3.74963 4
 Mouse Position -101.794 44.6545 -130.128

 Your help will be appreciated,

 ___
 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


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


Re: [osg-users] Convert depth image to 3D model

2014-07-24 Thread Sergey Kurdakov
Hi Mikhail,

while it might be overkill ( depends on details I cannot figure from your
description )
you might want to try Point Cloud Library, see also
http://nccastaff.bournemouth.ac.uk/jmacey/MastersProjects/MSc13/14/Thesis/SurfaceReconstructionThesis.pdf

Regards
Sergey


On Thu, Jul 24, 2014 at 2:26 PM, Jordi Torres jtorresfa...@gmail.com
wrote:

 Hi Mikhail,

 In my opinion the easiest way is to use a displacement mapping shader. In
 the vertex shader you use the texture values to alter vertex positions. I
 think there is an example in the OSG Cookbook from Wang Rui.

 Hope it helps.


 2014-07-24 12:21 GMT+02:00 Mikhail Matrosov mikhail.matro...@gmail.com:

 Hello,

 I have a depth image, i.e. grayscale floating point image, where each
 pixel represents a depth value in this point of a scene. What is the
 easiest way to create a 3D model of the scene?

 I know I can simply loop over all pixels and create a pair of triangles
 for each pixel. But I feel like it has to be more elegant solution.

 Cheers,
 Mikhail

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





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




 --
 Jordi Torres



 ___
 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] Merge several images

2014-07-13 Thread Sergey Kurdakov
Hi Taras,

just have several uniform sampler2D  or sampler2DRect in shader and bind
textures to them
see example here
http://trac.openscenegraph.org/projects/osg//browser/OpenSceneGraph/trunk/examples/osgmultiplerendertargets/osgmultiplerendertargets.cpp

take notice how

uniform sampler2DRect textureID0;
uniform sampler2DRect textureID1;
uniform sampler2DRect textureID2;
uniform sampler2DRect textureID3;


uniforms are used

Regards
Sergey


On Thu, Jul 10, 2014 at 4:19 PM, Taras Nagorny kalashni...@inbox.ru wrote:

 Hi, I need to merge the two (or more) images. I have a vector of objects
 of type osg::Image. As a result, we obtain a single object (same type)
 combines all the necessary objects from the vector. Please help.

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





 ___
 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] Where does RenderInfo come from which is passed to all Drawable::draw?

2014-07-05 Thread Sergey Kurdakov
Hi Michael.

But I may return to the issue later in 1 or 2 years when I expect to have
a good understanding of both.

maybe someone will find this thread and will pick the task.

but overall what I've seen does not look too difficult ( I'd like to start
to experiment with it as native integration of CEGUI for osg will be very
beneficial, but think that won't have spare time anytime soon ).

Regards
Sergey






On Sat, Jul 5, 2014 at 1:00 PM, michael kapelko korn...@gmail.com wrote:

 I estimated it would take me about 2 months since I'm not good enough at
 OSG and CEGUI internals. But I may return to the issue later in 1 or 2
 years when I expect to have a good understanding of both.



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


Re: [osg-users] Where does RenderInfo come from which is passed to all Drawable::draw?

2014-07-04 Thread Sergey Kurdakov
Hi Michael,

though I did not dig into code ( just spotted that there is native render
for ogre ), but seems an approach like

http://static.cegui.org.uk/docs/0.8.3/classCEGUI_1_1OgreRenderer.html can
be of some use.

That is - instead to render by CEGUI - render all things by osg itself (
see in CEGUI code cegui-0.8.3\cegui\src\RendererModules - and ogre renderer
is there ).
there is need for the render class for osg though.

but then - this will be really good integration with all capabilities of
osg in place.

Regards
Sergey


On Fri, Jul 4, 2014 at 5:07 PM, michael kapelko korn...@gmail.com wrote:

 Hi.
 I'm working on integrating CEGUI into OSG and I have successfully followed
 Wang Rui's example from his Cookbook:
 https://github.com/xarray/osgRecipes/tree/master/cookbook/chapter9/ch09_04

 But there's an ugly part with CEGUI initialization: it happens in
 CEGUIDrawable::drawImplementation(RenderInfo ). It initializes paths, uses
 a lot of mutables, strips constness. I want to get rid of that ugly stuff
 and initialize CEGUI somewhere outside drawImplementation() call.
 So when and where can I get RenderInfo that is passed to all
 Drawable::draw(RenderInfo )?
 Thanks.

 ___
 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] Where does RenderInfo come from which is passed to all Drawable::draw?

2014-07-04 Thread Sergey Kurdakov
Hi Michael,

Do you mean a module located in CEGUI or OSG?

module in CEGUI and calls there are made to osg

My  thought is this: osg is somewhat similar to ogre in many respects.
So it is possible to take ogre renderer and to try to replace calls to ogre
with similar calls to  osg ( mostly the replacement is  obvious, but some
parts are not ... here is a difficulty, but again I did not spend much time
on the code of that CEGUI module just browsed it ).

possibly it is few days effort .

Regards
Sergey




On Fri, Jul 4, 2014 at 6:41 PM, michael kapelko korn...@gmail.com wrote:

 I was thinking about OSG renderer module for CEGUI, but I'm not sure how
 to do it atm.
 Can you please elaborate (as much as possible) what you mean by here is
 need for the render class for osg though. Do you mean a module located in
 CEGUI or OSG? If the latter, what do I need to take into account?
 Thanks.


 2014-07-04 21:16 GMT+07:00 Sergey Kurdakov sergey.fo...@gmail.com:

 Hi Michael,

 though I did not dig into code ( just spotted that there is native render
 for ogre ), but seems an approach like

 http://static.cegui.org.uk/docs/0.8.3/classCEGUI_1_1OgreRenderer.html
 can be of some use.

 That is - instead to render by CEGUI - render all things by osg itself (
 see in CEGUI code cegui-0.8.3\cegui\src\RendererModules - and ogre renderer
 is there ).
 there is need for the render class for osg though.

 but then - this will be really good integration with all capabilities of
 osg in place.

 Regards
 Sergey


 On Fri, Jul 4, 2014 at 5:07 PM, michael kapelko korn...@gmail.com
 wrote:

 Hi.
 I'm working on integrating CEGUI into OSG and I have successfully
 followed Wang Rui's example from his Cookbook:
 https://github.com/xarray/osgRecipes/tree/master/cookbook/chapter9/ch09_04

 But there's an ugly part with CEGUI initialization: it happens in
 CEGUIDrawable::drawImplementation(RenderInfo ). It initializes paths, uses
 a lot of mutables, strips constness. I want to get rid of that ugly stuff
 and initialize CEGUI somewhere outside drawImplementation() call.
 So when and where can I get RenderInfo that is passed to all
 Drawable::draw(RenderInfo )?
 Thanks.

 ___
 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


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


Re: [osg-users] Rubber window for multiple selection

2014-07-02 Thread Sergey Kurdakov
Hi Sonya,

if I'm not mistaken Enviro in vtp ( osg based app ) has rubber band
implemented

https://code.google.com/p/vtp/

Regards
Sergey


On Wed, Jul 2, 2014 at 10:19 AM, Sonya Blade sonyablade2...@hotmail.com
wrote:

  Dear All,

 Mainly I have 2 questions, both are to achieve the comprehensive selection
 task in OSG.

 #1 - How to draw a rectangle, polygonal, circle, lasso etc.. selection
 rubber?
 #2 - How to configure OSG to implement that selection defined at the first
 step?

 For selection part OSG Beginners book suggest to use 
 osgUtil::PolytopeIntersector
 for regional selection,
 but doesn't give any clue on how to draw the rubber or is it comes as an 
 intrinsic
 feature of
 sgUtil::PolytopeIntersector when you create it with WINDOW parameter set
 on.

 I also studied the osgkeyboardmouse.cpp example, but I couldn't find any
 visible difference when I switch
 from LineSegmentInteresect to PolytopeIntersector, while I was expecting
 to see the HUD window rubber
 to be drawn and objects falling into that rectangle to be selected.

 Your guidance will be appreciated!

 Regards,


 ___
 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] Rubber window for multiple selection

2014-07-02 Thread Sergey Kurdakov
Hi Sonya,

it is in Enviro.cpp there, see function -

void Enviro::SetWindowBox(const IPoint2 p1, const IPoint2 p2)

and also look at track of mouse movements see for MM_SELECTBOX in that file.

basically the approach is to render quad ( with border or without ), keep
track of mouse and resize this quad accordingly

rubber band is based on  common approach ( you might look for C++ rubber
bands in google ), and only osg one is to appropriately render  selection
quad, other tricks are non osg related.

Regards
Sergey




On Wed, Jul 2, 2014 at 1:32 PM, Sonya Blade sonyablade2...@hotmail.com
wrote:

  Hi Sergey,

 It really is very hard to locate the code portion where it implements the
 rubber
 drawing, I'm paving my way with osgHUD example to create the rubber
 banding.

 Your comments will be appreciated,

 Regards,
 --
 Date: Wed, 2 Jul 2014 11:03:47 +0400
 From: sergey.fo...@gmail.com
 To: osg-users@lists.openscenegraph.org
 Subject: Re: [osg-users] Rubber window for multiple selection


 Hi Sonya,

 if I'm not mistaken Enviro in vtp ( osg based app ) has rubber band
 implemented

 https://code.google.com/p/vtp/

 Regards
 Sergey


 On Wed, Jul 2, 2014 at 10:19 AM, Sonya Blade sonyablade2...@hotmail.com
 wrote:

  Dear All,

 Mainly I have 2 questions, both are to achieve the comprehensive selection
 task in OSG.

 #1 - How to draw a rectangle, polygonal, circle, lasso etc.. selection
 rubber?
 #2 - How to configure OSG to implement that selection defined at the first
 step?

 For selection part OSG Beginners book suggest to use 
 osgUtil::PolytopeIntersector
 for regional selection,
 but doesn't give any clue on how to draw the rubber or is it comes as an 
 intrinsic
 feature of
 sgUtil::PolytopeIntersector when you create it with WINDOW parameter set
 on.

 I also studied the osgkeyboardmouse.cpp example, but I couldn't find any
 visible difference when I switch
 from LineSegmentInteresect to PolytopeIntersector, while I was expecting
 to see the HUD window rubber
 to be drawn and objects falling into that rectangle to be selected.

 Your guidance will be appreciated!

 Regards,


 ___
 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


[osg-users] Hi all, The OpenSceneGraph3.3.2 DEV Running in D3D9 mode's full sourcecode version is uploaded and can be downloaded, Happy a good weekend!

2014-06-27 Thread Sergey Kurdakov
Hi LearningOSG,

GLSL shaders could be converted  to HLSL 'on the fly' via ANGLE project,

cannot say if you'd take this task, but should be, in principle, very
similar to what was already done:

 just a modified ANGLE source should be used to be combined with what was
already done. Fortunately licenses of all involved projects do allow such a
thing.

Regards
Sergey


On Sat, Jun 28, 2014 at 3:49 AM, LearningOSG LearningOSG 
learning...@gmail.com wrote:

 Hi Nick,
This is only the very simple methods to provide the full(90%)
 convert,if not use GLSL shader parts,if you also want use GLSL shades,I
 know a new tool can convert GLSL to HLSL,Have some suggestions:
1.If you want to use this in OSG MT static Mode,minor osg lines changes
 is need.
2.If you want to write directx codes in osg,you need to use OSG MT Mode.
3.Currently please use only .ive files only ,this can ensure run
 successful,otherwise,such as .osg,.osgt files have problems,in theory the
 .osg and .ive file is equal,i haven't times in this aspect to dig the
 reason.
thank all of you kindly.
cheers
Learned osg five months



 2014-06-28 5:37 GMT+08:00 Trajce Nikolov NICK 
 trajce.nikolov.n...@gmail.com:

 I tried it at my end as well. Well, I think Mr. Zhu (?) deserve credit for
 being the first one that publicly tried this after the big and somewhat
 weird marketing. It is just linking osg against gldirect library and you
 can run osg now on XBox :-) (Robert? :-)). I read all the nice defensive
 thoughts from the community about language barriers, cultural differences
 etc.(which afterall made me feel bad since I commented in not so friendly
 fashion), still thinking that Mr. Zhu (?)  could have been nice to the
 community as well by not making such a big noise and describing it in just
 a line of nice email and to not make the curious from the community to
 download 1.1GB of compiled all of OSG where just a link (or built) gldirect
 would be enough

 Nick

 Nick


 On Fri, Jun 27, 2014 at 9:25 PM, Thomas Hogarth thomas.hoga...@gmail.com
  wrote:

 I've deleted the binaries and am uploading the binaries.

 It's just osg built with all the example etc again that mesa lib.

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





 ___
 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



 ___
 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] Hi all, The OpenSceneGraph3.3.2 DEV Running in D3D9 mode's full sourcecode version is uploaded and can be downloaded, Happy a good weekend!

2014-06-27 Thread Sergey Kurdakov
Hi LearningOSG,

This is a very very minor works

yes, but you won't stop moving further? it would be sad if all endeavors
just stopped at the first step.

as for

and many of them have no time to learn osg,they needed the final
results,the finished simulator that they can used directly.

and  for that normal customers  hire software developers and if these
customers are instead themselves software developers, then like you they
are capable to make something valuable in relatively short time frames,

so what is your exact point - to promote OSG to customers or to developers?

These are two different tasks.

even not know what is OSG

so if your task is to promote OSG to those who do not know graphics
programming at all to hire graphics programmers - that is fine, and demos
are really what is needed, but showing that  directx 9 can be supported is
not really good selling point to even naive customer. Because windows xp is
already discontinued, and almost all win 7 capable computers have opengl
compatible cards with respective drivers and very well served by osg as it
is.

currently - what could be a hot sell - is a support for DX 11 features
( to have osg based projects in windows METRO  apps and to run on current
XBOX )

and it is already can be done via ANGLE project which  currently supports
almost all  OpenGL ES 3.0 features, and while OpenGL ES 3.0  is a little
limited compared to OpenGL 4.x , if the game or software is heavily shader
based - differences are minimal. and with your 'fixed part' being done -
even fixed pipeline could be supported ( if it is used in a project ).

So, it is not like - that some new feature could be a selling point. Rather
- the existing demand should be met with specific features.

but you will see that by yourself - that over time just you new feature -
dx9 support won't attract much attention.

Regards
Sergey

On Sat, Jun 28, 2014 at 4:20 AM, LearningOSG LearningOSG 
learning...@gmail.com wrote:

 Hi Sergey,
This is a very very minor works in osg,please not mind,and thanks to
 use LearningOSG,this is what i am doing,and like this name,OSG is a
 excellent lower simulation layer,just like Linux.
But for world customers,they even not know what is OSG,and many of them
 have no time to learn osg,they needed the final results,the finished
 simulator that they can used directly.
cheers
Learned osg five months



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


[osg-users] Hi all, The OpenSceneGraph3.3.2 DEV Running in D3D9 mode's full sourcecode version is uploaded and can be downloaded, Happy a good weekend!

2014-06-27 Thread Sergey Kurdakov
Hi LearningOSG,

OSG to D3D9's convert is very simple,and i also conside this is nothing,so
never mind.

ok, but you tried to sell it as a major feature and almost succeed, until
others got a look. To novice that might seem like a good approach to
communicate in professional community - but it is not. It just feels not
right for almost anyone here.

so you are welcome to add things, just to create too much noise for any new
minor features distracts from discussing those other points, which
professionally interest people, neither it helps to any customer, which are
irrelevant here - as it is not a customer market place.

Regards
Sergey



On Sat, Jun 28, 2014 at 5:52 AM, LearningOSG LearningOSG 
learning...@gmail.com wrote:

 Hi Sergey,
Agreed all of your points,but you seems ignored the most important one
 point,all of the customers they only want the immediately results,and the
 result quality is required highly,rarely of them hope to have dangers to
 engage a thing too far to realize and not know the final results.
Say sorry first,because i wantn't to ment a osg software before,his
 name is delta3d,they first get the american army's amounts money help to
 develop the thing which army needed,and many years pasted,now you can see
 the results.
OSG to D3D9's convert is very simple,and i also conside this is
 nothing,so never mind.

cheers

Learned osg five months


 2014-06-28 9:07 GMT+08:00 Sergey Kurdakov sergey.fo...@gmail.com:

 Hi LearningOSG,

 This is a very very minor works

 yes, but you won't stop moving further? it would be sad if all endeavors
 just stopped at the first step.

 as for

 and many of them have no time to learn osg,they needed the final
 results,the finished simulator that they can used directly.

 and  for that normal customers  hire software developers and if these
 customers are instead themselves software developers, then like you they
 are capable to make something valuable in relatively short time frames,

 so what is your exact point - to promote OSG to customers or to
 developers?

 These are two different tasks.

 even not know what is OSG

 so if your task is to promote OSG to those who do not know graphics
 programming at all to hire graphics programmers - that is fine, and demos
 are really what is needed, but showing that  directx 9 can be supported is
 not really good selling point to even naive customer. Because windows xp is
 already discontinued, and almost all win 7 capable computers have opengl
 compatible cards with respective drivers and very well served by osg as it
 is.

 currently - what could be a hot sell - is a support for DX 11 features
 ( to have osg based projects in windows METRO  apps and to run on current
 XBOX )

 and it is already can be done via ANGLE project which  currently supports
 almost all  OpenGL ES 3.0 features, and while OpenGL ES 3.0  is a little
 limited compared to OpenGL 4.x , if the game or software is heavily shader
 based - differences are minimal. and with your 'fixed part' being done -
 even fixed pipeline could be supported ( if it is used in a project ).

 So, it is not like - that some new feature could be a selling point.
 Rather - the existing demand should be met with specific features.

 but you will see that by yourself - that over time just you new feature -
 dx9 support won't attract much attention.

 Regards
 Sergey

 On Sat, Jun 28, 2014 at 4:20 AM, LearningOSG LearningOSG 
 learning...@gmail.com wrote:

 Hi Sergey,
This is a very very minor works in osg,please not mind,and thanks to
 use LearningOSG,this is what i am doing,and like this name,OSG is a
 excellent lower simulation layer,just like Linux.
But for world customers,they even not know what is OSG,and many of
 them have no time to learn osg,they needed the final results,the finished
 simulator that they can used directly.
 cheers
Learned osg five months




 ___
 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] Hi all, The OpenSceneGraph3.3.2 DEV Running in D3D9 mode's full sourcecode version is uploaded and can be downloaded, Happy a good weekend!

2014-06-27 Thread Sergey Kurdakov
Hi LearningOSG,among other feature which  were mentioned was lua scripting
- this is exact feature which is now developed by Robert ( in the past it
was possible to script osg from other languages though, such as C# ).

btw I do not blame you, just try to convey to you, that how you behave
looks weird to the members of the list and even to Chris ( you may ask him
), so that if you get a message ( not offense - it is not intended) you may
try to change somewhat how you announce things and not be banned some day
due to how others see your actions.

Regards

Sergey





On Sat, Jun 28, 2014 at 6:17 AM, LearningOSG LearningOSG 
learning...@gmail.com wrote:

 Hi Sergey,
First i never wantn't to emphasize osg to d3d9 features,this is only a
 feature mented in the coming OSGWARES 1.0 Beta,you can look at the osg
 mailing lists again,one day a people named Chris Hanson in this list,say he
 is in 51 areas about this feature,then have following Robert's justice and
 discusses,I am only a osg leaner,and not selling softwares,until currently.
cheers
Learned osg five months


 2014-06-28 9:52 GMT+08:00 LearningOSG LearningOSG learning...@gmail.com:

 Hi Sergey,
Agreed all of your points,but you seems ignored the most important one
 point,all of the customers they only want the immediately results,and the
 result quality is required highly,rarely of them hope to have dangers to
 engage a thing too far to realize and not know the final results.
Say sorry first,because i wantn't to ment a osg software before,his
 name is delta3d,they first get the american army's amounts money help to
 develop the thing which army needed,and many years pasted,now you can see
 the results.
OSG to D3D9's convert is very simple,and i also conside this is
 nothing,so never mind.

cheers

Learned osg five months


 2014-06-28 9:07 GMT+08:00 Sergey Kurdakov sergey.fo...@gmail.com:

  Hi LearningOSG,

 This is a very very minor works

 yes, but you won't stop moving further? it would be sad if all endeavors
 just stopped at the first step.

 as for

 and many of them have no time to learn osg,they needed the final
 results,the finished simulator that they can used directly.

 and  for that normal customers  hire software developers and if these
 customers are instead themselves software developers, then like you they
 are capable to make something valuable in relatively short time frames,

 so what is your exact point - to promote OSG to customers or to
 developers?

 These are two different tasks.

 even not know what is OSG

 so if your task is to promote OSG to those who do not know graphics
 programming at all to hire graphics programmers - that is fine, and demos
 are really what is needed, but showing that  directx 9 can be supported is
 not really good selling point to even naive customer. Because windows xp is
 already discontinued, and almost all win 7 capable computers have opengl
 compatible cards with respective drivers and very well served by osg as it
 is.

 currently - what could be a hot sell - is a support for DX 11 features
 ( to have osg based projects in windows METRO  apps and to run on
 current XBOX )

 and it is already can be done via ANGLE project which  currently
 supports almost all  OpenGL ES 3.0 features, and while OpenGL ES 3.0  is a
 little limited compared to OpenGL 4.x , if the game or software is heavily
 shader based - differences are minimal. and with your 'fixed part' being
 done - even fixed pipeline could be supported ( if it is used in a project
 ).

 So, it is not like - that some new feature could be a selling point.
 Rather - the existing demand should be met with specific features.

 but you will see that by yourself - that over time just you new feature
 - dx9 support won't attract much attention.

 Regards
 Sergey

 On Sat, Jun 28, 2014 at 4:20 AM, LearningOSG LearningOSG 
 learning...@gmail.com wrote:

 Hi Sergey,
This is a very very minor works in osg,please not mind,and thanks to
 use LearningOSG,this is what i am doing,and like this name,OSG is a
 excellent lower simulation layer,just like Linux.
But for world customers,they even not know what is OSG,and many of
 them have no time to learn osg,they needed the final results,the finished
 simulator that they can used directly.
 cheers
Learned osg five months




 ___
 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] Hi all, The OpenSceneGraph3.3.2 DEV Running in D3D9 mode's full sourcecode version is uploaded and can be downloaded, Happy a good weekend!

2014-06-27 Thread Sergey Kurdakov
Hi LearningOSG

Sergey,Now a very ideal poeple or company hired you,and give you tons of
moneys,and you get all of the offers and tell them please give me a team
and many many years?just like delta3d???

this is exactly not a question to discuss on a list which is about
technical developments of osg.

there could be those who can find someone ready to finance big projects,
much bigger than few people working on delta3d ( I seen few such start up
companies personally ), but those who managed to convince - did not dig
into much of tech details, so discussions of business and technical
features  are two separate things - and exactly no one discussed bussiness
opportunities on the list ( except of occasional position offerings )

I think, that I'm so much talented like you - so I could only congratulate
you and your progress with osg.

But please - ask tech questions, post your achievements but do not try to
touch how to convince someone to finance projects, it's off topic.

Regards
Sergey



On Sat, Jun 28, 2014 at 6:44 AM, LearningOSG LearningOSG 
learning...@gmail.com wrote:

 Hi Sergey,
Maybe make some disturb for the list members,the following things i
 want to emphasize:
1.The currently Lua interface and features which osg is developping
 haven't any relationships with OSGWARES 1.0 Beta.
2.In fact the big problems all the advanced osg develops faced is for
 Example:
  Sergey,Now a very ideal poeple or company hired you,and give you tons
 of moneys,and you get all of the offers and tell them please give me a team
 and many many years?just like delta3d???
Say sorry first for the disturbs,and i wantn't to discuss no more not
 related with technology.
cheers
Learned osg five months


 2014-06-28 10:28 GMT+08:00 Sergey Kurdakov sergey.fo...@gmail.com:

 Hi LearningOSG,among other feature which  were mentioned was lua
 scripting - this is exact feature which is now developed by Robert ( in the
 past it was possible to script osg from other languages though, such as C#
 ).

 btw I do not blame you, just try to convey to you, that how you behave
 looks weird to the members of the list and even to Chris ( you may ask him
 ), so that if you get a message ( not offense - it is not intended) you may
 try to change somewhat how you announce things and not be banned some day
 due to how others see your actions.

 Regards

 Sergey





 On Sat, Jun 28, 2014 at 6:17 AM, LearningOSG LearningOSG 
 learning...@gmail.com wrote:

 Hi Sergey,
First i never wantn't to emphasize osg to d3d9 features,this is only
 a feature mented in the coming OSGWARES 1.0 Beta,you can look at the osg
 mailing lists again,one day a people named Chris Hanson in this list,say he
 is in 51 areas about this feature,then have following Robert's justice and
 discusses,I am only a osg leaner,and not selling softwares,until currently.
 cheers
Learned osg five months


 2014-06-28 9:52 GMT+08:00 LearningOSG LearningOSG learning...@gmail.com
 :

 Hi Sergey,
Agreed all of your points,but you seems ignored the most important
 one point,all of the customers they only want the immediately results,and
 the result quality is required highly,rarely of them hope to have dangers
 to engage a thing too far to realize and not know the final results.
Say sorry first,because i wantn't to ment a osg software before,his
 name is delta3d,they first get the american army's amounts money help to
 develop the thing which army needed,and many years pasted,now you can see
 the results.
OSG to D3D9's convert is very simple,and i also conside this is
 nothing,so never mind.

cheers

Learned osg five months


 2014-06-28 9:07 GMT+08:00 Sergey Kurdakov sergey.fo...@gmail.com:

  Hi LearningOSG,

 This is a very very minor works

 yes, but you won't stop moving further? it would be sad if all
 endeavors just stopped at the first step.

 as for

 and many of them have no time to learn osg,they needed the final
 results,the finished simulator that they can used directly.

 and  for that normal customers  hire software developers and if these
 customers are instead themselves software developers, then like you they
 are capable to make something valuable in relatively short time frames,

 so what is your exact point - to promote OSG to customers or to
 developers?

 These are two different tasks.

 even not know what is OSG

 so if your task is to promote OSG to those who do not know graphics
 programming at all to hire graphics programmers - that is fine, and demos
 are really what is needed, but showing that  directx 9 can be supported is
 not really good selling point to even naive customer. Because windows xp 
 is
 already discontinued, and almost all win 7 capable computers have opengl
 compatible cards with respective drivers and very well served by osg as it
 is.

 currently - what could be a hot sell - is a support for DX 11 features
 ( to have osg based projects in windows METRO  apps and to run on
 current XBOX

Re: [osg-users] Hi all, The OpenSceneGraph3.3.2 DEV Running in D3D9 mode's full sourcecode version is uploaded and can be downloaded, Happy a good weekend!

2014-06-27 Thread Sergey Kurdakov
Hi Michael.

Sergey, don't forget to append Re:  when you reply

strange, threading should not depend on Re: ( neither it depends in my web
gmail browser ), rather it was always a good way to keep the same name for
thread -according to old message lists etiquette ( it is just more
difficult currently in online web gmail mail client due to that it hides
automatic Re: )

so I think Re: issue  is more about your settings.

Regards
Sergey



On Sat, Jun 28, 2014 at 7:52 AM, michael kapelko korn...@gmail.com wrote:

 Sergey, don't forget to append Re:  when you reply. Otherwise, GMail
 sees it as different threads. And that's even more annoying that what's
 happening already ;)


 2014-06-28 10:11 GMT+07:00 LearningOSG LearningOSG learning...@gmail.com
 :

 yes,off topic,so we stop and not to continue this,let back to osg related
 topics.
 cheers
 Learned osg five months


 2014-06-28 10:06 GMT+08:00 Sergey Kurdakov sergey.fo...@gmail.com:

 Hi LearningOSG,

 OSG to D3D9's convert is very simple,and i also conside this is
 nothing,so never mind.

 ok, but you tried to sell it as a major feature and almost succeed,
 until others got a look. To novice that might seem like a good approach to
 communicate in professional community - but it is not. It just feels not
 right for almost anyone here.

 so you are welcome to add things, just to create too much noise for any
 new minor features distracts from discussing those other points, which
 professionally interest people, neither it helps to any customer, which are
 irrelevant here - as it is not a customer market place.

 Regards
 Sergey



 On Sat, Jun 28, 2014 at 5:52 AM, LearningOSG LearningOSG 
 learning...@gmail.com wrote:

 Hi Sergey,
Agreed all of your points,but you seems ignored the most important
 one point,all of the customers they only want the immediately results,and
 the result quality is required highly,rarely of them hope to have dangers
 to engage a thing too far to realize and not know the final results.
Say sorry first,because i wantn't to ment a osg software before,his
 name is delta3d,they first get the american army's amounts money help to
 develop the thing which army needed,and many years pasted,now you can see
 the results.
OSG to D3D9's convert is very simple,and i also conside this is
 nothing,so never mind.

cheers

Learned osg five months


 2014-06-28 9:07 GMT+08:00 Sergey Kurdakov sergey.fo...@gmail.com:

  Hi LearningOSG,

 This is a very very minor works

 yes, but you won't stop moving further? it would be sad if all
 endeavors just stopped at the first step.

 as for

 and many of them have no time to learn osg,they needed the final
 results,the finished simulator that they can used directly.

 and  for that normal customers  hire software developers and if these
 customers are instead themselves software developers, then like you they
 are capable to make something valuable in relatively short time frames,

 so what is your exact point - to promote OSG to customers or to
 developers?

 These are two different tasks.

 even not know what is OSG

 so if your task is to promote OSG to those who do not know graphics
 programming at all to hire graphics programmers - that is fine, and demos
 are really what is needed, but showing that  directx 9 can be supported is
 not really good selling point to even naive customer. Because windows xp 
 is
 already discontinued, and almost all win 7 capable computers have opengl
 compatible cards with respective drivers and very well served by osg as it
 is.

 currently - what could be a hot sell - is a support for DX 11 features
 ( to have osg based projects in windows METRO  apps and to run on
 current XBOX )

 and it is already can be done via ANGLE project which  currently
 supports almost all  OpenGL ES 3.0 features, and while OpenGL ES 3.0  is a
 little limited compared to OpenGL 4.x , if the game or software is heavily
 shader based - differences are minimal. and with your 'fixed part' being
 done - even fixed pipeline could be supported ( if it is used in a project
 ).

 So, it is not like - that some new feature could be a selling point.
 Rather - the existing demand should be met with specific features.

 but you will see that by yourself - that over time just you new
 feature - dx9 support won't attract much attention.

 Regards
 Sergey

 On Sat, Jun 28, 2014 at 4:20 AM, LearningOSG LearningOSG 
 learning...@gmail.com wrote:

 Hi Sergey,
This is a very very minor works in osg,please not mind,and thanks
 to use LearningOSG,this is what i am doing,and like this name,OSG is
 a excellent lower simulation layer,just like Linux.
But for world customers,they even not know what is OSG,and many of
 them have no time to learn osg,they needed the final results,the finished
 simulator that they can used directly.
 cheers
Learned osg five months




 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org

 http

[osg-users] newbie issues using GLES 2.0

2014-06-25 Thread Sergey Kurdakov
Hi Mike,

yes, the question confuses when one starts to work with pure shader
environments.

the approach is to have a custom format and custom materials which are not
so far implemented in core of osg.

I found one osg compatible approach for materials see
https://code.google.com/p/hogbox/

while the code has nice materials class
https://code.google.com/p/hogbox/source/browse/trunk/src/hogbox/HogBoxMaterial.cpp

 the code provided lacks loader,

another example format for shader-only based  osg is internal format for
http://osgjs.org/

there is though one catch - it is possible to  save to this format from
osg, but load only in osgjs, but it might shed light on how to proceed with
own custom format

https://github.com/cedricpinson/osg/tree/master/src/osgPlugins/osgjs

also there is a split plugin which is needed if there is hardware
limitation on vertex count

https://github.com/cedricpinson/osg/tree/master/src/osgPlugins/split

Regards
Sergey

On Thu, Jun 26, 2014 at 12:24 AM, Mike Metcalf metcalfnos...@mac.com
wrote:

 We are putting together an mapping application targeted for the imx6
 hardware. The drivers support GLES 2.0, with no fallback/support for
 previous versions.

 We have models and other resources in osgb files, and load them at
 run-time, attaching them to our scene graph as necessary. On our dev
 platforms (win7 and linux on x86) things render without issue, but when
 cross-compiled and deployed to our imx6 hardware, these osgb resources did
 not show.

 We traced it to bad shaders, and found on these forums that the reason is
 that ShaderGen.cpp was generating (fallback?) shaders which are not
 compatible with GLES 2.0.

 My first naive step was to modify the vertex and fragment shaders in
 ShaderGen to enable them to compile in our GLES GPU. We had to remove
 references to the fixed-function pipeline, and that included references to
 gl_Color (et al), which was how each vertex got it's starting material
 color. So... we could see our geometry on-screen, but the material colors
 as stored in the osgb file were unavailable.

 I then dug around GLSL 2.0 enough to tentatively conclude that the new
 method of supplying those vertex colors to the shader code is to declare
 vertex attributes in the vertex shader and then bind an array of attributes.

 But, and this is my question, how do we use the generalized approach of
 reading in osg::nodes from osgb files, attach them to the scenegraph and
 still bind attributes to them?

 It seems that we would either need to create a unique osg::program per
 osg::node we load and then somehow glean the vertex color information from
 the osg::node, load it into an array and bind that array to the shader
 program.

 Can anyone shed any light on this? I thing I'm missing something fairly
 fundamental.

 Many thanks in advance!

 Mike

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





 ___
 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] newbie issues using GLES 2.0

2014-06-25 Thread Sergey Kurdakov
Hi Mike.

a little update to previous reply

somehow I overlooked that hogbox has in fact plugin, which can serve as
inspiration for you own

https://code.google.com/p/hogbox/source/browse/trunk/src/#src%2FhogboxXmlPlugins%2FhogboxPlugin


Regards
Sergey
On Thu, Jun 26, 2014 at 1:53 AM, Sergey Kurdakov sergey.fo...@gmail.com
wrote:

 Hi Mike,

 yes, the question confuses when one starts to work with pure shader
 environments.

 the approach is to have a custom format and custom materials which are not
 so far implemented in core of osg.

 I found one osg compatible approach for materials see
 https://code.google.com/p/hogbox/

 while the code has nice materials class

 https://code.google.com/p/hogbox/source/browse/trunk/src/hogbox/HogBoxMaterial.cpp

  the code provided lacks loader,

 another example format for shader-only based  osg is internal format for
 http://osgjs.org/

 there is though one catch - it is possible to  save to this format from
 osg, but load only in osgjs, but it might shed light on how to proceed with
 own custom format

 https://github.com/cedricpinson/osg/tree/master/src/osgPlugins/osgjs

 also there is a split plugin which is needed if there is hardware
 limitation on vertex count

 https://github.com/cedricpinson/osg/tree/master/src/osgPlugins/split

 Regards
 Sergey

 On Thu, Jun 26, 2014 at 12:24 AM, Mike Metcalf metcalfnos...@mac.com
 wrote:

 We are putting together an mapping application targeted for the imx6
 hardware. The drivers support GLES 2.0, with no fallback/support for
 previous versions.

 We have models and other resources in osgb files, and load them at
 run-time, attaching them to our scene graph as necessary. On our dev
 platforms (win7 and linux on x86) things render without issue, but when
 cross-compiled and deployed to our imx6 hardware, these osgb resources did
 not show.

 We traced it to bad shaders, and found on these forums that the reason is
 that ShaderGen.cpp was generating (fallback?) shaders which are not
 compatible with GLES 2.0.

 My first naive step was to modify the vertex and fragment shaders in
 ShaderGen to enable them to compile in our GLES GPU. We had to remove
 references to the fixed-function pipeline, and that included references to
 gl_Color (et al), which was how each vertex got it's starting material
 color. So... we could see our geometry on-screen, but the material colors
 as stored in the osgb file were unavailable.

 I then dug around GLSL 2.0 enough to tentatively conclude that the new
 method of supplying those vertex colors to the shader code is to declare
 vertex attributes in the vertex shader and then bind an array of attributes.

 But, and this is my question, how do we use the generalized approach of
 reading in osg::nodes from osgb files, attach them to the scenegraph and
 still bind attributes to them?

 It seems that we would either need to create a unique osg::program per
 osg::node we load and then somehow glean the vertex color information from
 the osg::node, load it into an array and bind that array to the shader
 program.

 Can anyone shed any light on this? I thing I'm missing something fairly
 fundamental.

 Many thanks in advance!

 Mike

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





 ___
 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] GLSL-Debugger is moving along and builds on Windows

2014-02-21 Thread Sergey Kurdakov
Hi Chris,

you might add notice in old repository
https://github.com/GLSL-Debugger/GLSL-Debugger that it moved to a new place.

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


[osg-users] Shapes - Without ShapeDrawable that is

2013-12-25 Thread Sergey Kurdakov
Hi,

(btw what is your real name? Just check, we address everyone  by real
names, it is a policy of this mailing list )

you might take a look for a code in osgWorks
https://code.google.com/p/osgworks/

namely
https://code.google.com/p/osgworks/source/browse/trunk/src/osgwTools/Shapes.cpp

Regards
Sergey

On Thu, Dec 26, 2013 at 12:16 AM, leetsnipersephirothninjade...@gmail.com 
leetsnipersephirothninjade...@gmail.com wrote:

 Dear List members!
 Warning: This is a „help a noob” kind of question.

 Sorry for sending my request or rather question, directly in mail. I'll
 try to keep it short.
 After spending an enormous amount of time looking for a tutorial or some
 good guide, I stumbled upon this message from the very same mailing list.
 Though, it's years old.

 http://lists.openscenegraph.org/pipermail/osg-users-
 openscenegraph.org/2007-December/004923.html

 The code works perfectly. And I could modify it to make sphere out of
 that. But I fear the result would be really taxing, even on modern
 hardware. I read Stackoverflow questions and various articles I found, and
 some of those said that I could just use a „mathematical shape” to do this.
 I have lost my browsing history since then, so I cannot link the exact page
 right now. It was a geometrical shape that would become a sphere with the
 right resolution. (You get the point, catch my drift. Like how you make a
 cylinder.)

 But. Which one should I go with?
 More importantly: Is there a pre-existing code that I could use my base
 and that I could build upon?
 Or any foundation would be much appreciated. The more shapes I could learn
 the better.
 (So far I got basic things like cubes, rectangles, circle [from the
 message], pyramid, cylinder.)

 Best regards,
 LSSND
 ___
 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] [ANN] Free Android game based on OSG Bullet released

2013-12-10 Thread Sergey Kurdakov
Hi Marcin,

took a look at youtube video ( don't have android phone to try )

but I have one idea for you.

as the game uses only OpenGL ES features, it could be run under browser.

I started to port osg to emscripten ( the port is not complete though I
hope to update soon, but preliminary port is here - with some tweaks it
works in browser https://github.com/Kurdakov/emscripten_OSG )

with this - it is possible to run your game in browser - and that is a
major extension of possible coverage.

BTW bullet was ported to emscripten too.

Regards
Sergey




On Tue, Dec 10, 2013 at 11:42 AM, Marcin Hajder mhaj...@o2.pl wrote:


 kornerr wrote:
  Hi. Nice!
  Is its source code available? :)


 that's quite possible, as fast as we reach 10M downloads ;)

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





 ___
 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] Is OSG dead?

2013-10-16 Thread Sergey Kurdakov
Hi Julio,

no, osg is not dead.

the main activity was and is on the mailing list.

the problem with forum exists, and was discussed few times, but currently
not enougth energy from people wanting to support forum materialized.

this will be resolved someday, but currently just stick to mailing list, it
is quite active.

Regards
Sergey

On Wed, Oct 16, 2013 at 8:06 PM, Julio Jerez jerezjul...@gmail.com wrote:

 I register on the forum, and on tow mailing list.

 I also send private messages and email to the administrator and moderators
 asking to activate my account.

 ** **

 but on the forum all I see if topic waiting approval  message

 It seems that no moderator or administrator check the list anymore. 

 ** **

 Julio

 ** **

 ___
 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+osm

2013-09-17 Thread Sergey Kurdakov
Hi Idar,

it is not that easy, but here you may find some code at

http://www.osgvisual.org/projects/osgvisual/wiki/OsgTerrainData

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


[osg-users] shader composing related link

2013-08-05 Thread Sergey Kurdakov
Hi All,

just to share,

searching for shader composing stumbled across

https://github.com/tlorach/nvFX

https://developer.nvidia.com/sites/default/files/akamai/gamedev/docs/nvFX%20A%20New%20Shader-Effect%20Framework.pdf

it is open sourced so maybe it might be of some interest to look at.

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


[osg-users] osgviewer segmentation fault under virtualbox

2013-08-02 Thread Sergey Kurdakov
Hi Chen.

just for your information:

Ubuntu and osg work  ok in VMWare player on windows ( which is free for non
commercial/educational ussage )

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


[osg-users] OpenGL ES 2.0 on windows

2013-07-30 Thread Sergey Kurdakov
Hi Robert,

working with OpenGL ES 2.0 with Angle ( I also checked ATI OpenGL ES SDK )
with osg 3.2
I have a warning Detected OpenGL error invalid enumerant on this line in
State.cpp

 glGetIntegerv(GL_MAX_TEXTURE_COORDS,_glMaxTextureCoords);

( in following part of  code in function void
State::initializeExtensionProcs()  )

 if ( osg::getGLVersionNumber() = 2.0 ||
osg::isGLExtensionSupported(_contextID,GL_ARB_vertex_shader) ||
OSG_GLES2_FEATURES)
{

glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS,_glMaxTextureUnits);
glGetIntegerv(GL_MAX_TEXTURE_COORDS,_glMaxTextureCoords);
}



I asked Angle project list that maybe they are wrong here ( but still ATI
ES SDK also lacks GL_MAX_TEXTURE_COORDS ) and they responded they are not,
the  GL_MAX_TEXTURE_COORDS is underfined for OpenGL ES 2.0


So, possibly here there should be a code like

if ( osg::getGLVersionNumber() = 2.0 ||
osg::isGLExtensionSupported(_contextID,GL_ARB_vertex_shader) ||
OSG_GLES2_FEATURES)
{

glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS,_glMaxTextureUnits);
if(OSG_GLES2_FEATURES)
{
_glMaxTextureCoords = _glMaxTextureUnits;
}
else
glGetIntegerv(GL_MAX_TEXTURE_COORDS,_glMaxTextureCoords);
}

?

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


[osg-users] OpenGL ES 2.0 on windows

2013-07-30 Thread Sergey Kurdakov
Hi Robert,

Once you have the code working cleanly could
you post the modified file to osg-submissions.

ok,

checking now.

Regards
Sergey

On Wed, Jul 31, 2013 at 9:29 AM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Sergey,

 You suggested change looks reasonable.  Curious that others including
 myself haven't spotted this error so I can only presume that quite a
 few GLES implementations do indeed included support for
 GL_MAX_TEXTURE_COORDS.  Once you have the code working cleanly could
 you post the modified file to osg-submissions.

 Thanks,
 Robert.


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


[osg-users] latest dev code and OpenGL ES 2.0 on linux/windows

2013-07-23 Thread Sergey Kurdakov
Hi,

I try to make some experiments with OpenGL ES 2.0 on both windows and linux,
and while I myself is searching for answers ( I think will resolve in
coming days ), I will share few observations for anyone concerned.

I have following problem with latest development code.

On windows

using http://code.google.com/p/angleproject/ and
https://github.com/fantasydr/sdl-gles and SDL viewer example I
attempted to have
OpenGL ES 2.0 with visual studio compiler

( I used recommended settings )

Cmake settings for OpenGL   ES 2.0
 OSG_GL1_AVAILABLE   OFF
 OSG_GL2_AVAILABLE   OFF
 OSG_GL3_AVAILABLE   OFF
 OSG_GLES1_AVAILABLE OFF
 OSG_GLES2_AVAILABLE ON
 OPENGL_INCLUDE_DIR  /pathtogles/include/
 OPENGL_LIBRARY  /pathtogles/lib/libGLESv2.so
 OPENGL_egl_LIBRARY  /pathtoegllib/libEGL.so
 OSG_GL_DISPLAYLISTS_AVAILABLE   OFF
 SG_GL_MATRICES_AVAILABLEOFF
 OSG_GL_VERTEX_FUNCS_AVAILABLE   OFF
 OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE OFF
 OSG_GL_FIXED_FUNCTION_AVAILABLE OFF
 OSG_CPP_EXCEPTIONS_AVAILABLEOFF

While mostly it works - it compiles and runs, it fails to compile
build-in osg shaders ( though I checked to have D3Dcompiler_46.dll in
bin folder otherwise http://code.google.com/p/angleproject/ will not
work outside visual studio ),

You might find  my OpenGL ES/SDL cpp file in attachment.

to check further  problem I also compiled osg on linux with mesa es
2.0  support (on latest ubuntu )
with exact paths for opengl

OPENGL_egl_LIBRARY  /usr/lib/x86_64-linux-gnu/mesa-egl/libEGL.so.1

OPENGL_gl_LIBRARY /usr/lib/x86_64-linux-gnu/mesa-egl/libGLESv2.so

somehow I also get problems in release build I get from osgviewer with cow.osg

the output reads

GraphicsWindowX11::init() - eglInitialize() succeded eglMajorVersion=1
iMinorVersion=4
GraphicsWindowX11::init() - window created =1
Warning: TexGen::apply(State) - not supported.
Warning: Material::apply(State) - not supported.
Warning: TexGen::apply(State) - not supported.

and no cow is visible

So does it mean that current opengl es implementation unusable?

(I will  bebug on linux tomorrow, because so far adding
IF( NOT CMAKE_BUILD_TYPE )
  SET( CMAKE_BUILD_TYPE Debug )
  SET( CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -DDEBUG )
ENDIF( NOT CMAKE_BUILD_TYPE )

to CMakeLists.txt causes problem with linker ( not sure it problem
with CMakeLists.txt or with my actions -
I'm not very quick when on linux ).

Regards
Sergey
/* OpenSceneGraph example, osgviewerSDL.
*
*  Permission is hereby granted, free of charge, to any person obtaining a copy
*  of this software and associated documentation files (the Software), to deal
*  in the Software without restriction, including without limitation the rights
*  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
*  copies of the Software, and to permit persons to whom the Software is
*  furnished to do so, subject to the following conditions:
*
*  THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
*  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
*  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
*  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
*  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
*  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
*  THE SOFTWARE.
*/

// (C) 2005 Mike Weiblen http://mew.cx/ released under the OSGPL.
// Simple example using GLUT to create an OpenGL window and OSG for rendering.
// Derived from osgGLUTsimple.cpp and osgkeyboardmouse.cpp

#include osgViewer/Viewer
#include osgViewer/ViewerEventHandlers
#include osgGA/TrackballManipulator
#include osgDB/ReadFile
#include osg/PositionAttitudeTransform

#include SDL.h

#include iostream

#include osgText/Text
#include osg/Geometry
 
osg::Node* createScene()
{
// create drawable geometry object
osg::Geometry* pGeo = new osg::Geometry;
 
// add 3 vertices creating a triangle
osg::Vec3Array* pVerts = new osg::Vec3Array;
pVerts-push_back( osg::Vec3( -1, 0, -1 ) );
pVerts-push_back( osg::Vec3( 1, 0, -1 ) );
pVerts-push_back( osg::Vec3( 0, 0, 1 ) );
pGeo-setVertexArray( pVerts );
 
// create a primitive set (add index numbers)
osg::DrawElementsUInt* pPrimitiveSet =
new osg::DrawElementsUInt( osg::PrimitiveSet::TRIANGLES, 0 );
pPrimitiveSet-push_back( 2 );
pPrimitiveSet-push_back( 1 );
pPrimitiveSet-push_back( 0 );
pGeo-addPrimitiveSet( pPrimitiveSet );
 
// create color array data (each corner of our triangle will have one color component)
osg::Vec4Array* pColors = new osg::Vec4Array;
pColors-push_back( osg::Vec4( 1.0f, 0.0f, 0.0f, 1.0f ) );
pColors-push_back( osg::Vec4( 0.0f, 1.0f, 0.0f, 1.0f ) );
pColors-push_back( osg::Vec4( 0.0f, 0.0f, 1.0f, 1.0f ) );
pGeo-setColorArray( pColors );
 
// make sure that our geometry is using one color per vertex

[osg-users] latest dev code and OpenGL ES 2.0 on linux/windows

2013-07-23 Thread Sergey Kurdakov
Hi,

managed to compile latest osg debug on linux ( possible cmake-gui made
some some strange things after severl reconfigurations - absolutely
clean svn code compiled just fine ).

but still the same error in osgviewer ( now osgviewerd ) with OpenGL
ES 2.0 enabled

 GraphicsWindowX11::init() - eglInitialize() succeded eglMajorVersion=1
 iMinorVersion=4
 GraphicsWindowX11::init() - window created =1
 Warning: TexGen::apply(State) - not supported.
 Warning: Material::apply(State) - not supported.
 Warning: TexGen::apply(State) - not supported.

I will look with debugger tomorrow. but a small question - is such
output is expected  on linux or is it osg bug?


Regards
Sergey




On Tue, Jul 23, 2013 at 8:19 PM, Sergey Kurdakov sergey.fo...@gmail.com wrote:
 Hi,

 I try to make some experiments with OpenGL ES 2.0 on both windows and linux,
 and while I myself is searching for answers ( I think will resolve in
 coming days ), I will share few observations for anyone concerned.

 I have following problem with latest development code.

 On windows

 using http://code.google.com/p/angleproject/ and
 https://github.com/fantasydr/sdl-gles and SDL viewer example I
 attempted to have
 OpenGL ES 2.0 with visual studio compiler

 ( I used recommended settings )

 Cmake settings for OpenGL   ES 2.0
  OSG_GL1_AVAILABLE   OFF
  OSG_GL2_AVAILABLE   OFF
  OSG_GL3_AVAILABLE   OFF
  OSG_GLES1_AVAILABLE OFF
  OSG_GLES2_AVAILABLE ON
  OPENGL_INCLUDE_DIR  /pathtogles/include/
  OPENGL_LIBRARY  /pathtogles/lib/libGLESv2.so
  OPENGL_egl_LIBRARY  /pathtoegllib/libEGL.so
  OSG_GL_DISPLAYLISTS_AVAILABLE   OFF
  SG_GL_MATRICES_AVAILABLEOFF
  OSG_GL_VERTEX_FUNCS_AVAILABLE   OFF
  OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE OFF
  OSG_GL_FIXED_FUNCTION_AVAILABLE OFF
  OSG_CPP_EXCEPTIONS_AVAILABLEOFF

 While mostly it works - it compiles and runs, it fails to compile
 build-in osg shaders ( though I checked to have D3Dcompiler_46.dll in
 bin folder otherwise http://code.google.com/p/angleproject/ will not
 work outside visual studio ),

 You might find  my OpenGL ES/SDL cpp file in attachment.

 to check further  problem I also compiled osg on linux with mesa es
 2.0  support (on latest ubuntu )
 with exact paths for opengl

 OPENGL_egl_LIBRARY  /usr/lib/x86_64-linux-gnu/mesa-egl/libEGL.so.1

 OPENGL_gl_LIBRARY /usr/lib/x86_64-linux-gnu/mesa-egl/libGLESv2.so

 somehow I also get problems in release build I get from osgviewer with cow.osg

 the output reads

 GraphicsWindowX11::init() - eglInitialize() succeded eglMajorVersion=1
 iMinorVersion=4
 GraphicsWindowX11::init() - window created =1
 Warning: TexGen::apply(State) - not supported.
 Warning: Material::apply(State) - not supported.
 Warning: TexGen::apply(State) - not supported.

 and no cow is visible

 So does it mean that current opengl es implementation unusable?

 (I will  bebug on linux tomorrow, because so far adding
 IF( NOT CMAKE_BUILD_TYPE )
   SET( CMAKE_BUILD_TYPE Debug )
   SET( CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -DDEBUG )
 ENDIF( NOT CMAKE_BUILD_TYPE )

 to CMakeLists.txt causes problem with linker ( not sure it problem
 with CMakeLists.txt or with my actions -
 I'm not very quick when on linux ).

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


[osg-users] latest dev code and OpenGL ES 2.0 on linux/windows

2013-07-23 Thread Sergey Kurdakov
Hi Robert,

 OpenGL ES 2.0 does not support TexGen or Material, and in fact has fixed
 function pipeline at all.

yes, just forgot it and seen few shaders in replacement of fixed pipeline.

 When using OpenGL ES 2.0 you need to use shaders exclusively, there is the
 osgUtil::ShaderGenVisitor that can attempt to convert some fixed function
 scene graphs across to shaders for you but it's not very sophisticated so
 can only handle quite simple scene graphs.

ok,  thanks.


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


[osg-users] OpenGL 3.x support

2013-05-30 Thread Sergey Kurdakov
Hi,

just for ref


https://hogbox.googlecode.com

has following code which might be of some use:

https://code.google.com/p/hogbox/source/browse/trunk/include/hogbox/HogBoxMaterial.h
https://code.google.com/p/hogbox/source/browse/trunk/src/hogbox/HogBoxMaterial.cpp

https://code.google.com/p/hogbox/source/browse/trunk/include/hogbox/HogBoxLight.h
https://code.google.com/p/hogbox/source/browse/trunk/src/hogbox/HogBoxLight.cpp

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


[osg-users] Save rendered frames to video file.

2013-05-27 Thread Sergey Kurdakov
Hi David,

a practical solution is to write frames using

https://code.google.com/p/osgworks/source/browse/trunk/src/osgwTools/ScreenCapture.cpp

then to convert resulting frames to video using ffmpeg or one of free
video editors.

you might also use ffmpeg for real time encoding frames using
approaches something like in

https://github.com/neilmendoza/ofxMovieExporter/blob/master/src/ofxMovieExporter.cpp
http://qgismapper.googlecode.com/svn-history/r59/trunk/mapper/video-capture/CompressThread.cpp
http://vpman.googlecode.com/svn-history/r7/VPM/vc-video.cpp
http://dvj.googlecode.com/svn-history/r580/trunk/src/LGL.module/LGL.cpp

( there are a lot of samples just search google in cpp files for
av_write_frame )

I would recommend to setup FFmpeg video codec ( lossless codec  FFV1)
and later convert video to any desired format using ffmpeg ( ffv1
reduces hard drive access compared with raw images - but does not load
cpu much ).


Regards
Sergey


On Mon, May 27, 2013 at 6:10 PM, David Hornung
webmaster.elj-ges...@web.de wrote:
 Hi,

 did somebody already implemented a component to save the recent frames in a 
 video file in real time?

 The only solution I found was implemented using OpenCV
 http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2012-August/059394.html

 Are there any other solutions? (OpenCV is a little bit too huge just for 
 saving the frames to video file)

 Thank you!

 Cheers,
 David

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





 ___
 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] How to apply textures to a model in openscenegraph?

2013-05-23 Thread Sergey Kurdakov
Hi Lokesh

in http://www.packtpub.com/openscenegraph-3-0-beginners-guide/book on
support tab for the page of the book you may download sample code,

in \2824_12_Code\2824_12_Code folder from  download zip there is
sharing_textures.cpp which has a class

class ReadAndShareImageCallback : public osgDB::ReadFileCallback

you are looking for as example

make something similar, but before loading texture - change extension
of loaded image

I recommend to get existing osg books and read them - it will save you
a lot of time.
In India see 
http://www.junglee.com/mn/search/junglee/ref=nav_sb_noss?url=search-alias%3Dstripbooksfield-keywords=openscenegraph

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


[osg-users] [Viewer] Detecting mouse move

2013-05-20 Thread Sergey Kurdakov
Hi Asher

 In some of my application, I would like to detect when a clic + mouse move 
 event happen. My goal is to display on screen during the clic + mouse move 
 only objects bounding boxes.

see osgkeyboardmouse example,

have an additional flag for clicked stateL

pseudocode:
case(osgGA::GUIEventAdapter::PUSH):
{
clicked = true;
 _mx = ea.getX();
 _my = ea.getY();
return false;
}

and for
case(osgGA::GUIEventAdapter::MOVE):
{
_mxnew = ea.getX();
 _mynew = ea.getY();

if(clicked)  coord of mouse changed
{
perform your actions
}
else
{
 _mx = _mxnew;
 _my = _mxnew;
return false;
}
 case(osgGA::GUIEventAdapter::RELEASE):
{
clicked = false;
}


On Tue, May 21, 2013 at 1:00 AM, Asher Kamiraze
asher.kamir...@gmail.com wrote:

 Hi all,

 In some of my application, I would like to detect when a clic + mouse move 
 event happen. My goal is to display on screen during the clic + mouse move 
 only objects bounding boxes.

 Do you have any hint on how to do this? Maybe some tips starting from 
 osgviewer could help!

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


[osg-users] Detecting windows focus

2013-05-13 Thread Sergey Kurdakov
Hi Bram,

one suggestion for 'hackish' way  to implement,

for windows in

osgViewer/GraphicsWindowWin32.cpp

in handleNativeWindowingEvent(

to add handling of boolean for focused state tracing events WM_SETFOCUS
WM_KILLFOCUS  WM_ACTIVATE like described in

http://stackoverflow.com/questions/466354/how-can-i-tell-if-a-window-has-focus-win32-apianswer
4

and request the state when needed (either pushing in osg event Queue
(getEventQueue (push) then checkEvents (get)) or by 'hackish' way )

or, if it is desired to have for many platforms and have official osg
support - then there is need for patch for other platforms

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


[osg-users] plz help me out with PrecipitationEffect

2013-04-30 Thread Sergey Kurdakov
Hi Kim,

while you probably won't copy code from FlighGear http://www.flightgear.org/
(it is GPLed ) you might get inspirations from  this OSG based game code

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


[osg-users] Matrox M9188 OpenGL

2013-04-25 Thread Sergey Kurdakov
Hi Chris,

won't AMD Eyefinity 6 monitors on one card ( and I think 12 monitors on two
cards - because they could work together, though I did not try, but if I
understand correctly this will work
http://hardforum.com/showthread.php?t=1645343
http://hardforum.com/showthread.php?t=1645343see also
http://www.pcworld.com/article/251521/when_two_monitors_arent_enough.html )
suite your needs?

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


Re: [osg-users] Matrox M9188 OpenGL

2013-04-25 Thread Sergey Kurdakov
Hi Chris,

It is my understanding that AMD cards won't frame-lock without the S400
card

you might be correct, but

you mentioned, that rendering in not very demanding, thus setting VSync
might be enough to soft-frame-lock on powerful card ( which should be oders
of magnitude more powerful than old Matrox cards )

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


[osg-users] Questions about OSG

2013-04-22 Thread Sergey Kurdakov
Hi Mike,

in respect to vao you might look at this thread
http://forum.openscenegraph.org/viewtopic.php?t=10001 with initial attempt
to add it.

with this you get a core profile,

Are scenegraphs in general suited for games?

yes, not all games use scenegraphs but most I know - do.

scenegraphs are too expensive for games.

it depends,  but due to extensive use, scenegraphs like OSG are quite
optimized  for minimizing state changes, and thus there are games on
smartphones and PCs which are based on OSG.

I only know that Ogre3d is using an scenegraph too.

that is correct, and Ogre3d is used in many games. the difference is though
with OSG - that Ogre3d rendering pipeline is not thread safe, so only one
core is used for all graphics operations ( while OSG can use one or more
threads),  Ogre3d is just somehow more popular among those who develops
games, because it has additional features which are useful when developing
games, but OSG is more powerful in respect to rendering flexibility

I also saw that there are many different implementations of scenegraphs,
like BSP octree etc.

OSG is not about octree of BSP thought there are use samples see *
OpenSceneGraph* 3 Cookbook for octree and also
there are examples for BSP use in osgBullet and Delta3D which are related
to OSG. Also  OSG has KdTree implementation

You might want to look at
http://www.packtpub.com/openscenegraph-3-0-beginners-guide/book?tag=ns/openscene-abr4/0211book
to get more details.

as for 'non' scene graph games  - in fact almost all are using rendering
library of some sort, it is just that they could be less general than
proper scenegraph to make some features to run faster, but I'm not a
specialist in non scene graphs games, so could not elaborate on it much.



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


[osg-users] glslDevil

2013-03-26 Thread Sergey Kurdakov
Hi Chris,

I just wanted to followup here and mention that this project is now on
GitHub and I'm looking for people who can assist with it.

 https://github.com/XenonofArcticus/GLSL-Debugger/https://github.com/XenonofArcticus/GLSL-Debugger/

I did not notice announcement neither at your twitter, or G+ -  while I
will hardly spend time on this great tool, I, at least, will reshare.

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


[osg-users] Possible to make pixel-pretty text in OSG?

2013-03-12 Thread Sergey Kurdakov
Hi

Would using OSGPango for text help with this,

Yes, I would recommend to use http://code.google.com/p/osgpango/ ( based on
http://code.google.com/p/osgcairo/ )
by Jeremy Moles, at least it gives best results I seen and it is not
difficult to use ( there examples there ).

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


[osg-users] Using OpenSceneGraph with 3rd party window libraries

2013-03-08 Thread Sergey Kurdakov
Hi Randall,

so, I can only  guess, what goes wrong (I'm sorry).

but , in case there are several windowing libraries, they could run in
separate threads

http://msdn.microsoft.com/en-us/library/ms810439.aspx - so that their even
loops are not intersected, the communication
should be async this way, but then other ( non osg ) thread window messages
should not touch handleNativeWindowingEvent

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


[osg-users] Using OpenSceneGraph with 3rd party window libraries

2013-03-07 Thread Sergey Kurdakov
Hi Randall,

but as soon as I use the other library to create a window ... the
application crashes

maybe others will give you better response, but I would suggest to set osg
into single threaded mode

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


[osg-users] Building OSG with FFMPEG

2013-02-27 Thread Sergey Kurdakov
Hi Jason,

have downloaded everything and tried to build it and i am getting errors
with AVFormatParameters not being declared.

it looks like your problem  depends on version of ffmpeg, current stable
version uses relatively old version of ffmpeg ( pre 0.7 ),
current development (svn ) version  uses latest ffmpeg (or any version of
ffmpeg since 0.8 ), see submission forum ( or mailing list  archive ) for
details,

so in order to use new ffmpeg - get newest ffmpeg plugin or use older
ffmpeg with current osg.

Regards
Sergey

On Thu, Feb 28, 2013 at 1:47 AM, jason massey  wrote:

 Hi,
 I have downloaded everything and tried to build it and i am getting errors
 with AVFormatParameters not being declared.



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


[osg-users] Fwd: setting a polygon height

2013-02-25 Thread Sergey Kurdakov
Hi Mohammed,

yes - it is possible - to move vertices changing their coordinates in
callback or in shader (say you have 'flat cube' assuming initially you have
all  neccesary cube vertices in place, then you have what you want, if you
have just one square - then tesselate accordingly, then move vertices as
assumed initially ).

( every example with cloth or ocean,  for example, makes just that - moves
vertices, the same way
it is possible to achieve what you need), correct?

as to how to move vertice coordinaties in either case, just check examples

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


[osg-users] Dynamic / incremental mesh generation or triangulation

2013-02-20 Thread Sergey Kurdakov
Hi Joe,

just a suggestion taken from ideas how the dynamic sculpting is done in
Blender

( for reference see
http://code.blender.org/index.php/2011/10/dynamic-topology-sculpting/
http://hal.inria.fr/docs/00/60/65/16/PDF/Freestyle.pdf
and
http://farsthary.files.wordpress.com/2011/10/dynamic-subdivision-sculpting-final.pdf-
just look for PBHV and then
http://wiki.blender.org/index.php/Dev:2.5/Source/Modeling/PBVH )

all these refs ( not needed to read carefully, just to browse ) are  for
one idea - split your geometry using spatial structure ( in Blender it is
pbhv - but  an alternative would be http://en.wikipedia.org/wiki/Range_treeor
http://en.wikipedia.org/wiki/Interval_tree or maybe some sort of adaptive
octree ) then you would need to find changed node, which contains mesh
which you will 'remesh' using some heuristic or restricted delaunay to fit
vertices to where they are ( to glue with other spacial nodes ) or to use
code such as of tetgen http://tetgen.berlios.de/features.html#F3 ( though
license is MIT - it has some additional requirements which might be quite
complicated to some uses  )

so it is what I can see - you keep most of topology intact, but need to
find 'node' to change and some code to glue new tesselation of changed
node  with old nodes.

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


[osg-users] Dynamic / incremental mesh generation or triangulation

2013-02-20 Thread Sergey Kurdakov
Hi Joe,

on a second thought -

another approach would be to use marching cubes see

http://ivl.calit2.net/wiki/index.php/Real-Time_Meshing_of_Dynamic_Point_Clouds

http://www.youtube.com/watch?v=1DAvgLCj_RQ

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


  1   2   >