[osg-users] Double precision tessellator, optimizer, and such

2010-07-26 Thread Sukender
Hi Robert, hi all,

I need double precision things in my app, and had to code things like 
Tessellatord, a double precision version of Tessellator (already 
submitted). However, I would like to have something cleaner to submit, such as 
a unique tesselator class that handle both single and double precision values.
I need your advice: according to you, what is the best way to code this? Some 
ideas:
- Duplicate code (VERY ugly)
- Make the class templated (ugly)
- Make a templated class that would be used by the Tessellator (still ugly)
- Create/use an array adapter (Vec*Array would be encapsulated, and Tessellator 
would use it instead of direclty reading the array)
- ... other ideas?

Thanks.

I'll try to apply this to other classes after.

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Double precision tessellator, optimizer, and such

2010-07-26 Thread Robert Osfield
Hi Sukender,

I single Tessellator class is the right way to go, one could possible
make parts of the implementation templated but keep the interface the
same for both cases.

One other thing to bare in mind is that OpenGL ES and for OpenGL
3.x/4.x GLU is no longer available so we need to replace all the OSG's
GLU code for the OSG to be fully functionality across all OpenGL
targets.

Robert.

On Mon, Jul 26, 2010 at 8:32 AM, Sukender suky0...@free.fr wrote:
 Hi Robert, hi all,

 I need double precision things in my app, and had to code things like 
 Tessellatord, a double precision version of Tessellator (already 
 submitted). However, I would like to have something cleaner to submit, such 
 as a unique tesselator class that handle both single and double precision 
 values.
 I need your advice: according to you, what is the best way to code this? Some 
 ideas:
 - Duplicate code (VERY ugly)
 - Make the class templated (ugly)
 - Make a templated class that would be used by the Tessellator (still ugly)
 - Create/use an array adapter (Vec*Array would be encapsulated, and 
 Tessellator would use it instead of direclty reading the array)
 - ... other ideas?

 Thanks.

 I'll try to apply this to other classes after.

 Sukender
 PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
 ___
 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] Double precision tessellator, optimizer, and such

2010-07-26 Thread Sukender
Hi Robert,

Thanks for the answer. However, I won't be able to write the non-GLU code. I 
guess making it work with GLU first would be nice...

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

- Robert Osfield robert.osfi...@gmail.com a écrit :

 Hi Sukender,
 
 I single Tessellator class is the right way to go, one could possible
 make parts of the implementation templated but keep the interface the
 same for both cases.
 
 One other thing to bare in mind is that OpenGL ES and for OpenGL
 3.x/4.x GLU is no longer available so we need to replace all the
 OSG's
 GLU code for the OSG to be fully functionality across all OpenGL
 targets.
 
 Robert.
 
 On Mon, Jul 26, 2010 at 8:32 AM, Sukender suky0...@free.fr wrote:
  Hi Robert, hi all,
 
  I need double precision things in my app, and had to code things
 like Tessellatord, a double precision version of Tessellator
 (already submitted). However, I would like to have something cleaner
 to submit, such as a unique tesselator class that handle both single
 and double precision values.
  I need your advice: according to you, what is the best way to code
 this? Some ideas:
  - Duplicate code (VERY ugly)
  - Make the class templated (ugly)
  - Make a templated class that would be used by the Tessellator
 (still ugly)
  - Create/use an array adapter (Vec*Array would be encapsulated, and
 Tessellator would use it instead of direclty reading the array)
  - ... other ideas?
 
  Thanks.
 
  I'll try to apply this to other classes after.
 
  Sukender
  PVLE - Lightweight cross-platform game engine -
 http://pvle.sourceforge.net/
  ___
  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] Double precision tessellator, optimizer, and such

2010-07-26 Thread Robert Osfield
Hi Sukender,

On Mon, Jul 26, 2010 at 9:24 AM, Sukender suky0...@free.fr wrote:
 Thanks for the answer. However, I won't be able to write the non-GLU code. I 
 guess making it work with GLU first would be nice...

I have wondered about whether we could use the
osgUtil::DelaunayTriangulator to implement osgUtil::Tessellator.

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


Re: [osg-users] Double precision tessellator, optimizer, and such

2010-07-26 Thread Sukender
Going to check. Thanks for the info.

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

- Robert Osfield robert.osfi...@gmail.com a écrit :

 Hi Sukender,
 
 On Mon, Jul 26, 2010 at 9:24 AM, Sukender suky0...@free.fr wrote:
  Thanks for the answer. However, I won't be able to write the non-GLU
 code. I guess making it work with GLU first would be nice...
 
 I have wondered about whether we could use the
 osgUtil::DelaunayTriangulator to implement osgUtil::Tessellator.
 
 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] Double precision tessellator, optimizer, and such

2010-07-26 Thread Sukender
Maybe a good idea, but DelaunayTriangulator is single precision only, and there 
is a lot of code. I must admit I don't have enough time for porting 
DelaunayTriangulator yet.

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/

- Robert Osfield robert.osfi...@gmail.com a écrit :

 Hi Sukender,
 
 On Mon, Jul 26, 2010 at 9:24 AM, Sukender suky0...@free.fr wrote:
  Thanks for the answer. However, I won't be able to write the non-GLU
 code. I guess making it work with GLU first would be nice...
 
 I have wondered about whether we could use the
 osgUtil::DelaunayTriangulator to implement osgUtil::Tessellator.
 
 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] Double precision tessellator, optimizer, and such

2010-07-26 Thread Robert Osfield
Hi Sukender,

On Mon, Jul 26, 2010 at 10:30 AM, Sukender suky0...@free.fr wrote:
 Maybe a good idea, but DelaunayTriangulator is single precision only, and 
 there is a lot of code. I must admit I don't have enough time for porting 
 DelaunayTriangulator yet.

I think porting Tessellator to doubles when we have to replace it soon
is a wasted effort.  We do at least know that DelaunayTriangulator
while it has flaws is deprecated by lack of GLU.

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