Re: [osg-users] osgCairo and osgPango on Windows : some progress

2008-11-12 Thread Jean-Sébastien Guay

Hi Jeremy,


These will be in shortly; osgCairo is done, the osgPango patch was
harder because I had an ungodly amount of changes in the works. :)


I just updated. Most changes are in, but I think you missed the last 
patch I sent for osgPango (which was in addition to the first one I sent 
Sunday night). Here it is again - nothing really complicated, but it 
makes osgpangoanimation and osgpangoguiviewer build against the 
osgWidget/osgAnimation branch.


Thanks,

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
Index: examples/osgpangoanimation/CMakeLists.txt
===
--- examples/osgpangoanimation/CMakeLists.txt   (revision 25)
+++ examples/osgpangoanimation/CMakeLists.txt   (working copy)
@@ -4,7 +4,10 @@
 # current project, but we need to add the postfix for the other libs.
 LINK_LIBRARIES(osgPango
debug OpenThreads${CMAKE_DEBUG_POSTFIX}
-   optimized OpenThreads)
+   optimized OpenThreads
+   debug osgGA${CMAKE_DEBUG_POSTFIX}
+   optimized osgGA
+)
 
 ADD_EXECUTABLE(osgpangoanimation osgpangoanimation.cpp)
 
Index: examples/osgpangoanimation/osgpangoanimation.cpp
===
--- examples/osgpangoanimation/osgpangoanimation.cpp(revision 25)
+++ examples/osgpangoanimation/osgpangoanimation.cpp(working copy)
@@ -9,6 +9,8 @@
 #include osgAnimation/EaseMotion
 #include osgPango/Text
 
+#include stdlib.h
+
 // const unsigned int WINDOW_WIDTH  = 720;
 // const unsigned int WINDOW_HEIGHT = 480;
 
@@ -56,7 +58,7 @@

_motions[i] = MyMotion(0, duration, 3.14, 
osgAnimation::Motion::LOOP);

-   float offset = (random() * 1.0 / (1.0 * 
RAND_MAX)) * duration;
+   float offset = (rand() * 1.0 / (1.0 * 
RAND_MAX)) * duration;

_motions[i].setTime(offset);
}
@@ -141,8 +143,8 @@
const osg::Vec2 size = t-getSize();
 
t-setMatrix(osg::Matrix::translate(
-   round((WINDOW_WIDTH - size.x()) / 2.0f),
-   size.y() + round((WINDOW_HEIGHT - size.y()) / 2.0f),
+osg::round((WINDOW_WIDTH - size.x()) / 2.0f),
+size.y() + osg::round((WINDOW_HEIGHT - size.y()) / 2.0f),
0.0f
));
 
@@ -154,7 +156,7 @@
 
camera-addChild(t);
 
-   viewer.setUpViewInWindow(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);
+   viewer.setUpViewInWindow(50, 50, WINDOW_WIDTH, WINDOW_HEIGHT);
viewer.setSceneData(camera);
viewer.getCamera()-setClearColor(osg::Vec4(0.2f, 0.2f, 0.2f, 1.0f));
 
Index: examples/osgpangoguiviewer/CMakeLists.txt
===
--- examples/osgpangoguiviewer/CMakeLists.txt   (revision 25)
+++ examples/osgpangoguiviewer/CMakeLists.txt   (working copy)
@@ -4,7 +4,10 @@
 # current project, but we need to add the postfix for the other libs.
 LINK_LIBRARIES(osgPango
debug OpenThreads${CMAKE_DEBUG_POSTFIX}
-   optimized OpenThreads)
+   optimized OpenThreads
+   debug osgDB${CMAKE_DEBUG_POSTFIX}
+   optimized osgDB
+)
 
 ADD_EXECUTABLE(osgpangoguiviewer osgpangoguiviewer.cpp)
 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgCairo and osgPango on Windows : some progress

2008-11-12 Thread Jeremy Moles
On Wed, 2008-11-12 at 09:26 -0500, Jean-Sébastien Guay wrote:
 Hi Jeremy,
 
  These will be in shortly; osgCairo is done, the osgPango patch was
  harder because I had an ungodly amount of changes in the works. :)
 
 I just updated. Most changes are in, but I think you missed the last 
 patch I sent for osgPango (which was in addition to the first one I sent 
 Sunday night). Here it is again - nothing really complicated, but it 
 makes osgpangoanimation and osgpangoguiviewer build against the 
 osgWidget/osgAnimation branch.

Ah thanks. :) I had changed so much in osgPango without committing I had
to do the initial patch by hand (though I prefer that way anyways so I
can see what's going on. :)) Looks like I missed some.

Thanks!

 Thanks,
 
 J-S
 plain text document attachment (osgPango-3.patch)
 Index: examples/osgpangoanimation/CMakeLists.txt
 ===
 --- examples/osgpangoanimation/CMakeLists.txt (revision 25)
 +++ examples/osgpangoanimation/CMakeLists.txt (working copy)
 @@ -4,7 +4,10 @@
  # current project, but we need to add the postfix for the other libs.
  LINK_LIBRARIES(osgPango
 debug OpenThreads${CMAKE_DEBUG_POSTFIX}
 -   optimized OpenThreads)
 +   optimized OpenThreads
 +   debug osgGA${CMAKE_DEBUG_POSTFIX}
 +   optimized osgGA
 +)
  
  ADD_EXECUTABLE(osgpangoanimation osgpangoanimation.cpp)
  
 Index: examples/osgpangoanimation/osgpangoanimation.cpp
 ===
 --- examples/osgpangoanimation/osgpangoanimation.cpp  (revision 25)
 +++ examples/osgpangoanimation/osgpangoanimation.cpp  (working copy)
 @@ -9,6 +9,8 @@
  #include osgAnimation/EaseMotion
  #include osgPango/Text
  
 +#include stdlib.h
 +
  // const unsigned int WINDOW_WIDTH  = 720;
  // const unsigned int WINDOW_HEIGHT = 480;
  
 @@ -56,7 +58,7 @@
   
   _motions[i] = MyMotion(0, duration, 3.14, 
 osgAnimation::Motion::LOOP);
   
 - float offset = (random() * 1.0 / (1.0 * 
 RAND_MAX)) * duration;
 + float offset = (rand() * 1.0 / (1.0 * 
 RAND_MAX)) * duration;
   
   _motions[i].setTime(offset);
   }
 @@ -141,8 +143,8 @@
   const osg::Vec2 size = t-getSize();
  
   t-setMatrix(osg::Matrix::translate(
 - round((WINDOW_WIDTH - size.x()) / 2.0f),
 - size.y() + round((WINDOW_HEIGHT - size.y()) / 2.0f),
 +osg::round((WINDOW_WIDTH - size.x()) / 2.0f),
 +size.y() + osg::round((WINDOW_HEIGHT - size.y()) / 2.0f),
   0.0f
   ));
  
 @@ -154,7 +156,7 @@
  
   camera-addChild(t);
  
 - viewer.setUpViewInWindow(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);
 + viewer.setUpViewInWindow(50, 50, WINDOW_WIDTH, WINDOW_HEIGHT);
   viewer.setSceneData(camera);
   viewer.getCamera()-setClearColor(osg::Vec4(0.2f, 0.2f, 0.2f, 1.0f));
  
 Index: examples/osgpangoguiviewer/CMakeLists.txt
 ===
 --- examples/osgpangoguiviewer/CMakeLists.txt (revision 25)
 +++ examples/osgpangoguiviewer/CMakeLists.txt (working copy)
 @@ -4,7 +4,10 @@
  # current project, but we need to add the postfix for the other libs.
  LINK_LIBRARIES(osgPango
 debug OpenThreads${CMAKE_DEBUG_POSTFIX}
 -   optimized OpenThreads)
 +   optimized OpenThreads
 +   debug osgDB${CMAKE_DEBUG_POSTFIX}
 +   optimized osgDB
 +)
  
  ADD_EXECUTABLE(osgpangoguiviewer osgpangoguiviewer.cpp)
  
 ___
 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] osgCairo and osgPango on Windows : some progress

2008-11-12 Thread Jean-Sébastien Guay

Hi Jeremy,


Ah thanks. :) I had changed so much in osgPango without committing I had
to do the initial patch by hand (though I prefer that way anyways so I
can see what's going on. :)) Looks like I missed some.


No problem, yeah there were quite a bit of changes in osgPango... 
Thankfully I just used your files directly and the merges were good. So 
with these last changes osgCairo and osgPango both build and run on 
Windows :-)


Thanks,

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgCairo and osgPango on Windows : some progress

2008-11-11 Thread Jean-Sébastien Guay

Hi Jeremy,

I just noticed something: osgpangoanimation is the only example in 
osgCairo and osgPango that sets a fixed window size/position. Why is that?



As far as getting the OSG viewer
resolution is concerned, I'm probably more prone to just fixing the bug
outright rather than working around it. To be honest, I don't really
even know of any way to get this data--it's abstracted somewhere deep in
OSG. If you know of an example bit of code that does it, please let me
know.


The width and height are in the traits for a graphics context. To get 
them, the viewer needs to be realized. You can call viewer.realize() 
early, and do the scene setup afterwards, I don't see a problem with that.


You will of course need some special cases if there are two graphics 
contexts (for example, one view spanning across two or more video cards) 
but that should be pretty easy, as 
osgViewer::View::setUpViewAcrossAllScreens() just assumes a horizontal 
span layout. In all other cases, it will be a single context and the 
width and height will be in the traits.


Check out those methods (osgViewer::View::setUpViewAcrossAllScreens(), 
setUpViewInWindow() and setUpViewOnSingleScreen()) - it's pretty easy to 
figure out what's going on. And see osgViewer::Viewer::realize() to see 
how it chooses which one to call.


Thanks,

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgCairo and osgPango on Windows : some progress

2008-11-11 Thread Jeremy Moles
On Tue, 2008-11-11 at 11:14 -0500, Jean-Sébastien Guay wrote:
 Hi Jeremy,
 
  Merging now!
 
 I haven't updated from your SVN yet to see if anything has changed, but 
 compiling osgPango with the osgWidget branch of OSG has revealed a few 
 more changes needed for the osgpangoguiviewer and osgpangoanimation 
 examples. I've attached the patch file (without the other changes, so 
 they're separate). Both examples were missing some libraries in the 
 CMakeLists.txt files, and I had to make some small changes to 
 osgpangoanimation.cpp :

These will be in shortly; osgCairo is done, the osgPango patch was
harder because I had an ungodly amount of changes in the works. :)

 1. to use osg::round instead of round()
 2. for random(), I think using the more standard rand() defined in 
 stdlib.h would be better.
 
 Also, osgpangoguiviewer tries to load osgWidget/frame-theme.png which it 
 can't find, and instead of printing an error and exiting as it should, 
 it crashes when it tries to do image-s() in 
 osgWidget::Frame::createSimpleFrameWithSingleTexture(). The 
 osgDB::readImageFile should be taken out of the 
 createSimpleFrameWithSingleTexture() call at osgpangoguiviewer.cpp line 
 23 and its return value tested, and 
 osgWidget::Frame::createSimpleFrameWithSingleTexture() should test that 
 image is not NULL/0.
 
 Because I don't have this image, I can't tell if osgpangoguiviewer's 
 result is correct... I replaced it with osgWidget/theme.png (which is in 
 OSG-Data) but the result looks bad, so it's probably not the right image :-)

A lot of this is already fixed and just uncommitted; the guiviewer isn't
complete yet, though--it's purpose is to get a list of every available
font and provide a drop-down box to chose from them. It'll be a few more
days before this is finished.

 I will again make the comment that your screen settings in 
 osgpangoanimation.cpp are pretty bad. For one, not everyone has a screen 
 of 1920x1200 (I'm at 1280x1024 myself), and also, you position the 
 window at 0,0 (again!) which puts the title bar outside the screen on 
 Windows. Please let osgViewer position the window how the user wants 
 it... Your arguments from last week make sense, but there are ways of 
 getting the window size and then passing it wherever it's needed instead 
 of locking the example to a set resolution and window placement.

I just set it to 1920x1200 (my res on my laptop) for a test and forgot
to change it to something sensible. As far as getting the OSG viewer
resolution is concerned, I'm probably more prone to just fixing the bug
outright rather than working around it. To be honest, I don't really
even know of any way to get this data--it's abstracted somewhere deep in
OSG. If you know of an example bit of code that does it, please let me
know.

 Other than that, osgpangoanimation's result looks good (looks like the 
 video on the osgPango site, to be specific) so osgPango's grade goes up 
 from 3/5 to 4/5. :-)
 
 Thanks for your hard work, and please excuse my ranting...

Haha, it's all good. :) Thanks for everything so far!

 J-S
 plain text document attachment (osgPango-2.patch)
 Index: examples/osgpangoanimation/CMakeLists.txt
 ===
 --- examples/osgpangoanimation/CMakeLists.txt (revision 23)
 +++ examples/osgpangoanimation/CMakeLists.txt (working copy)
 @@ -1,7 +1,14 @@
  PROJECT(osgpangoanimation)
  
 -LINK_LIBRARIES(osgPango)
 +# osgPango gets the proper debug postfix automatically since it's part of the
 +# current project, but we need to add the postfix for the other libs.
 +LINK_LIBRARIES(osgPango
 +   debug OpenThreads${CMAKE_DEBUG_POSTFIX}
 +   optimized OpenThreads
 +   debug osgGA${CMAKE_DEBUG_POSTFIX}
 +   optimized osgGA)
  
  ADD_EXECUTABLE(osgpangoanimation osgpangoanimation.cpp)
  
  INSTALL(TARGETS osgpangoanimation DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
 +SET_TARGET_PROPERTIES(osgpangoanimation PROPERTIES DEBUG_POSTFIX 
 ${CMAKE_DEBUG_POSTFIX})
 Index: examples/osgpangoanimation/osgpangoanimation.cpp
 ===
 --- examples/osgpangoanimation/osgpangoanimation.cpp  (revision 23)
 +++ examples/osgpangoanimation/osgpangoanimation.cpp  (working copy)
 @@ -9,6 +9,8 @@
  #include osgAnimation/EaseMotion
  #include osgPango/Text
  
 +#include stdlib.h
 +
  // const unsigned int WINDOW_WIDTH  = 720;
  // const unsigned int WINDOW_HEIGHT = 480;
  
 @@ -56,7 +58,7 @@
   
   _motions[i] = MyMotion(0, duration, 3.14, 
 osgAnimation::Motion::LOOP);
   
 - float offset = (random() * 1.0 / (1.0 * 
 RAND_MAX)) * duration;
 + float offset = (rand() * 1.0 / (1.0 * 
 RAND_MAX)) * duration;
   
   _motions[i].setTime(offset);
   

Re: [osg-users] osgCairo and osgPango on Windows : some progress

2008-11-11 Thread Jeremy Moles
On Mon, 2008-11-10 at 21:58 -0500, Jean-Sébastien Guay wrote:
 Hi Jeremy,
 
  So, are you able to notice any difference in font quality under Windows?
  Each glyph should be sharp and crisp, with absolutely not visual
  anomalies of any sort. This is harder to do than you might think, so it
  was always the most important (and the reason for writing the kit in the
  first place!)
 
 Yep, looks great, much better than normal osgText output (which has 
 blurry characters at some sizes and characters that seem clipped one or 
 two columns sometimes).
 
  Also, add:
  
  --cache outline 2
  
  ...as an arg, or:
  
  --cache shadowOffset 1
  
  ...or something like that. :)
 
 Heh, looks great too!
 
 So, when are you going to merge my changes? :-)

Sorry! Got my hands on a Wii last night and didn't do anything else. :)
Merging now!

 J-S

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


Re: [osg-users] osgCairo and osgPango on Windows : some progress

2008-11-10 Thread Jeremy Moles
On Mon, 2008-11-10 at 00:23 -0500, Jean-Sébastien Guay wrote:
 Hi Jeremy,
 
  I'm working on packing up my changes for osgCairo and osgPango now. Will 
  send soon.
 
 I've finished my first pass of changes to make osgCairo and osgPango 
 build and run on Windows. The result is attached to this message, as SVN 
 patches.
 
 I've tried to comment changes to the CMake files so that you know why 
 they're required. In general, they're analogous to things in OSG's CMake 
 files. Also, there is one added file in each case 
 (include/osg{Pango|Cairo}/Export), make sure you don't miss it.
 
 Note that some changes might strike you as unneeded, but MSVC requires 
 them. Such changes are for example the cast to double in fabs (MSVC 
 gives an ambiguous function call error if fabs is called with an int 
 but returning a double), and the default arguments for some constructors 
 so that you get the equivalent of a default constructor.
 
 One thing I didn't test is anything that depends on recent changes in 
 the osgWidget branch. I didn't compile the osgWidget branch here at 
 home, so I just wanted things to compile for this first pass (anything 
 else was gravy). As a result, I just commented out such things and 
 compiled. One example is in osgPango/src/Label.cpp (Label::parented() 
 and Label::_removeDrawables()). Also, I commented out osgpangoanimation 
 and osgpangoguiviewer from the osgPango CMakeLists.txt file just so I 
 could get a full build and install. I haven't included those changes, 
 but I also haven't tested those functionalities as a result.
 
 I've taken a bit more time in order to actually test some things. Here 
 are the results:
 
 * osgcairoviewer runs and gives the image attached
(osgcairoviewer.jpg, resized to 25%)
 
 * osgcairowidget runs and gives the image attached
(osgcairowidget.jpg, resized to 25%)
 
 * osgcairomatrix runs and gives the output in osgcairomatrix.txt
 
 * osgpangofonts runs and gives the output in osgpangofonts.txt
 
 * osgpangoviewer --font Arial 20 --width 800 --alignment justify
 --alpha 0.6 runs and gives the image attached (only the bottom part
 of the screen, with the cow rotated slightly to show the alpha is
 correct)

So, are you able to notice any difference in font quality under Windows?
Each glyph should be sharp and crisp, with absolutely not visual
anomalies of any sort. This is harder to do than you might think, so it
was always the most important (and the reason for writing the kit in the
first place!)

Also, add:

--cache outline 2

...as an arg, or:

--cache shadowOffset 1

...or something like that. :)

 * osgpangocustomrenderer runs and gives the image attached
(osgpangocustomrenderer.jpg, resized to 25%) but also outputs the
following warning (though it seems normal since I really don't have
that font :-) ):
 
(osgpangocustomrenderer.exe:1476): Pango-WARNING **: couldn't load
font iNked God Not-Rotated 45, falling back to Sans Not-Rotated
45, expect ugly output.
 
 So, all the examples I've been able to compile seem to run perfectly, 
 both in debug and release, on Windows. I think that's pretty cool. :-)
 
 As soon as you can integrate these changes, I'll re-update at work 
 (where I have the osgWidget branch compiling regularly) and try out the 
 other things.
 
 Good night,
 
 J-S
 plain text document attachment (osgCairo.patch)
 Index: CMakeLists.txt
 ===
 --- CMakeLists.txt(revision 26)
 +++ CMakeLists.txt(working copy)
 @@ -4,6 +4,12 @@
  
  SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/etc/)
  
 +# Use a debug postfix to distinguish build products. Mostly important on
 +# Windows, because linking a debug library into a release executable (or
 +# vice-versa, or just mixing C++ runtime versions) on Windows will lead
 +# to crashes if the libraries use the C++ runtime.
 +SET(CMAKE_DEBUG_POSTFIX d CACHE STRING Add a postfix, usually d on 
 windows)
 +
  # On GCC, we need to set these compiler flags.
  IF(NOT WIN32)
   SET(CMAKE_CXX_FLAGS -W -Wall -Wno-unused)
 @@ -27,6 +33,7 @@
  )
  
  SET(HEADER_FILES
 + ${osgCairo_SOURCE_DIR}/include/osgCairo/Export
   ${osgCairo_SOURCE_DIR}/include/osgCairo/Glyph
   ${osgCairo_SOURCE_DIR}/include/osgCairo/Image
   ${osgCairo_SOURCE_DIR}/include/osgCairo/Matrix
 @@ -55,9 +62,28 @@
  
  ADD_LIBRARY(osgCairo SHARED ${SRC_FILES} ${HEADER_FILES})
  
 -TARGET_LINK_LIBRARIES(osgCairo osg osgUtil osgViewer cairo)
 +# Add debug postfix to OSG libraries so we link to the right ones in debug.
 +# Cairo is a C-only library so the same one (release) can be linked to both
 +# debug and release without problems.
 +TARGET_LINK_LIBRARIES(osgCairo
 +  debug OpenThreads${CMAKE_DEBUG_POSTFIX}
 +  optimized OpenThreads
 +  debug osg${CMAKE_DEBUG_POSTFIX}
 +  optimized osg
 +  

Re: [osg-users] osgCairo and osgPango on Windows : some progress

2008-11-10 Thread Jean-Sébastien Guay

Hi Jeremy,


So, are you able to notice any difference in font quality under Windows?


Versus what, normal osgText? Or the osgfont example?

I'll check that out when I get home tonight (unless you've already 
merged my changes? :-) )



Each glyph should be sharp and crisp, with absolutely not visual
anomalies of any sort. This is harder to do than you might think, so it
was always the most important (and the reason for writing the kit in the
first place!)


Oh, I believe you! If it were easy, osgText would do it by default I 
imagine...



Also, add:

--cache outline 2

...as an arg, or:

--cache shadowOffset 1

...or something like that. :)


OK, once again I'll check that out tonight.

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgCairo and osgPango on Windows : some progress

2008-11-10 Thread Jean-Sébastien Guay

Hi Jeremy,


So, are you able to notice any difference in font quality under Windows?
Each glyph should be sharp and crisp, with absolutely not visual
anomalies of any sort. This is harder to do than you might think, so it
was always the most important (and the reason for writing the kit in the
first place!)


Yep, looks great, much better than normal osgText output (which has 
blurry characters at some sizes and characters that seem clipped one or 
two columns sometimes).



Also, add:

--cache outline 2

...as an arg, or:

--cache shadowOffset 1

...or something like that. :)


Heh, looks great too!

So, when are you going to merge my changes? :-)

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgCairo and osgPango on Windows : some progress

2008-11-09 Thread Jean-Sébastien Guay

Hi Robert,


Getting
this libs working under a Linux distribution will be trivial as most
modern distributions will have them all precompiled with dev headers
in the repositories only a click away, for Windows and OSX we'll have
to explore how easy it is to build.  J-S's work on getting osgPango
and osgCairo compiling all good prep for this ;-)


Thanks, always glad to help open up new paths. :-)

Just for reference, gtk provides a binaries bundle for Win32 which 
includes everything needed, even pkg-config, prebuilt. I would not 
really have liked to have to build all the libs needed myself, so I was 
glad they provided this, even if it does include some unneeded libs as 
extra baggage...


I'm working on packing up my changes for osgCairo and osgPango now. Will 
send soon.


J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgCairo and osgPango on Windows : some progress

2008-11-08 Thread Jean-Sébastien Guay

Hi Jeremy,


Hey, I can't e-mail through work on the weekends, so I have to use gmail
off lists. :) Feel free to forward this back to the lists for
archival...


Done, see below :)

I'll probably end up sending you the changes tomorrow instead of today. 
Sorry about that, but since nobody uses it on Windows yet, it shouldn't 
be much of a problem...


J-S


The following random bytes came from Cubicool's keyboard :

On Sat, 2008-11-08 at 00:20 -0500, Jean-Sébastien Guay wrote:

Hi all, Hi Jeremy,


Hey, I can't e-mail through work on the weekends, so I have to use gmail
off lists. :) Feel free to forward this back to the lists for
archival...

As I mentioned a little while ago, I stopped trying to get osgCairo and 
osgPango working on Windows because of time constraints (it was just for 
a personal project, so it didn't have much priority)... Well I've gone 
back to it tonight, and have some progress to report.


First of all, there were some things missing for it to compile as a DLL 
on Windows, first and foremost an Export header where the correct symbol 
  for _dllexport and _dllimport was defined depending on whether you're 
compiling or using the DLL respectively. I added that, so now the libs 
(both osgCairo and osgPango) compile correctly as DLLs.


Along the way I also added a few things I consider important to the 
CMake config, like the d suffix for side-by-side debug and release 
builds, and fields in osgPango's config to specify where to find 
osgCairo's includes and libs.


I had to add a few libraries to get things to link, like osgDB for 
osgCairo and cairo, gobject and glib for osgPango (it's looking for 
_g_free, _g_object_ref, etc for some reason).


I also had to make a few fixes to files that seem to me like they 
wouldn't compile without the fixes, even on Linux... Which seems weird. 
I updated earlier tonight from the googlecode SVN for the respective 
projects, but perhaps there's some code in flux.


Also, the osgpangoanimation example looks for osgAnimation (which isn't 
in OSG yet, so there should be a CMake option to compile that example or 
not and fields to specify where osgAnimation is) and the 
osgpangoguiviewer example seems to use methods and data members in 
osgWidget which don't exist (or is it that they're on the osgWidget 
branch but not in the main OSG SVN yet?).


Yeah, these are built against the trunk Cedric and I use. :)

Note that at this point I'm just getting things to compile. I haven't 
actually run anything yet. Status report would read as follows:


osgCairo:
   * lib compiles100%
   * all examples compile100%

osgPango:
   * lib compiles100%
   * 3/5 examples compile 60%

I'll send all my changes tomorrow (I'm too tired to package that all up 
right now - it's past Midnight, and I've got swimming classes with my 
youngest very early tomorrow morning... :-) ). Jeremy, I seem to 
remember you prefer SVN diffs, contrary to OSG's standard policy, is 
that right? I'll send the changes in whatever format you prefer tomorrow.


Yes, please! :)

I'll also test some executions tomorrow, can you please give me a few 
command lines that would be good tests? I've seen some data in the SVN 
working copy, but I don't know how to use it.


Sure! osgcairoviewer will throw up a few Image surfaces demonstrating
various surface formats and what-have-you. osgpangoviewer has a lot of
arguments, but there's a very simple function in the source that handles
this and could probably explain it all pretty easy. Also, make sure you
run osgpangofonts first to see what Windows XP calls the installed
fonts. :)

What sets osgPango apart is that it's designed from step one to be
optimized and positioned for 2D display; that is, a glyph will never
occur at any kind of non-pixel-aligned coordinate. Furthermore, full
subpixel hinting is supported and the rendering backend is pluggable!
Basically, any way you can imagine a font being decorated can be
accomplished--or rather, anything you could do with 2 passes in
Cairo. :)

P. S. If I'm real lucky, Robert has expressed a VERY slight interest in
merging some small part of osgCairo into OSG itself, but we'll have to
see. At any rate, to know it works on Windows would help no matter
what. :)


Thanks,

J-S






--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgCairo and osgPango on Windows : some progress

2008-11-08 Thread Robert Osfield
Hi Guys,

On Sat, Nov 8, 2008 at 12:24 PM, Jean-Sébastien Guay
[EMAIL PROTECTED] wrote:
 P. S. If I'm real lucky, Robert has expressed a VERY slight interest in
 merging some small part of osgCairo into OSG itself, but we'll have to
 see. At any rate, to know it works on Windows would help no matter
 what. :)

Just for clarification, last week I began looking at svg, pdf and
webkit integration with via Cairo, and osgCairo being the vehicle that
I used for much of this investigation work.  Offline I've been
discussing with Jeremy the various possibilities for Cairo integration
with the OSG.

After dabbling over the past week I'm still not sure of the best way
to progress, but am inclined towards just providing a light weight
CarioImage class in osgWidget.  The CairoImage class would provide the
glue between the cairo context, cairo surface and osg::Image, and then
have osgPlugins for pdf, svg and webkit extend this to provide the
advanced feature integration.

Cairo itself is useful beyond the needs of pdf, svg and webkit
integration, as osgPango illustrates, it's usefulness for certain
types of apps is pretty compelling, but as yet I'm not sure about
whether providing our own C++ wrappers for Cairo is the right
approach, or whether we should defer this to other libraries such as
the existing C++ wrappers for Cairo and just provide the minimal glue
required such as CairoImage.

In terms of porting the CairoImage class would be just be a non op if
users don't have Cairo installed on their machines, and the plugins
would be optional built as well, so you'll only need Cairo, WebKit,
Poppler, rsvg libs if you want the associated functionality.  Getting
this libs working under a Linux distribution will be trivial as most
modern distributions will have them all precompiled with dev headers
in the repositories only a click away, for Windows and OSX we'll have
to explore how easy it is to build.  J-S's work on getting osgPango
and osgCairo compiling all good prep for this ;-)

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


Re: [osg-users] osgCairo and osgPango on Windows : some progress

2008-11-08 Thread Cedric Pinson

Hi Jean-Sebastien,

It's really great, i would love to see osgCairo and osgPango in osg.
nice work

Cheers,
Cedric

Jean-Sébastien Guay wrote:

Hi all, Hi Jeremy,

As I mentioned a little while ago, I stopped trying to get osgCairo 
and osgPango working on Windows because of time constraints (it was 
just for a personal project, so it didn't have much priority)... Well 
I've gone back to it tonight, and have some progress to report.


First of all, there were some things missing for it to compile as a 
DLL on Windows, first and foremost an Export header where the correct 
symbol  for _dllexport and _dllimport was defined depending on whether 
you're compiling or using the DLL respectively. I added that, so now 
the libs (both osgCairo and osgPango) compile correctly as DLLs.


Along the way I also added a few things I consider important to the 
CMake config, like the d suffix for side-by-side debug and release 
builds, and fields in osgPango's config to specify where to find 
osgCairo's includes and libs.


I had to add a few libraries to get things to link, like osgDB for 
osgCairo and cairo, gobject and glib for osgPango (it's looking for 
_g_free, _g_object_ref, etc for some reason).


I also had to make a few fixes to files that seem to me like they 
wouldn't compile without the fixes, even on Linux... Which seems 
weird. I updated earlier tonight from the googlecode SVN for the 
respective projects, but perhaps there's some code in flux.


Also, the osgpangoanimation example looks for osgAnimation (which 
isn't in OSG yet, so there should be a CMake option to compile that 
example or not and fields to specify where osgAnimation is) and the 
osgpangoguiviewer example seems to use methods and data members in 
osgWidget which don't exist (or is it that they're on the osgWidget 
branch but not in the main OSG SVN yet?).


Note that at this point I'm just getting things to compile. I haven't 
actually run anything yet. Status report would read as follows:


osgCairo:
  * lib compiles100%
  * all examples compile100%

osgPango:
  * lib compiles100%
  * 3/5 examples compile 60%

I'll send all my changes tomorrow (I'm too tired to package that all 
up right now - it's past Midnight, and I've got swimming classes with 
my youngest very early tomorrow morning... :-) ). Jeremy, I seem to 
remember you prefer SVN diffs, contrary to OSG's standard policy, is 
that right? I'll send the changes in whatever format you prefer tomorrow.


I'll also test some executions tomorrow, can you please give me a few 
command lines that would be good tests? I've seen some data in the SVN 
working copy, but I don't know how to use it.


Thanks,

J-S


--
+33 (0) 6 63 20 03 56  Cedric Pinson mailto:[EMAIL PROTECTED] 
http://www.plopbyte.net


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


[osg-users] osgCairo and osgPango on Windows : some progress

2008-11-07 Thread Jean-Sébastien Guay

Hi all, Hi Jeremy,

As I mentioned a little while ago, I stopped trying to get osgCairo and 
osgPango working on Windows because of time constraints (it was just for 
a personal project, so it didn't have much priority)... Well I've gone 
back to it tonight, and have some progress to report.


First of all, there were some things missing for it to compile as a DLL 
on Windows, first and foremost an Export header where the correct symbol 
 for _dllexport and _dllimport was defined depending on whether you're 
compiling or using the DLL respectively. I added that, so now the libs 
(both osgCairo and osgPango) compile correctly as DLLs.


Along the way I also added a few things I consider important to the 
CMake config, like the d suffix for side-by-side debug and release 
builds, and fields in osgPango's config to specify where to find 
osgCairo's includes and libs.


I had to add a few libraries to get things to link, like osgDB for 
osgCairo and cairo, gobject and glib for osgPango (it's looking for 
_g_free, _g_object_ref, etc for some reason).


I also had to make a few fixes to files that seem to me like they 
wouldn't compile without the fixes, even on Linux... Which seems weird. 
I updated earlier tonight from the googlecode SVN for the respective 
projects, but perhaps there's some code in flux.


Also, the osgpangoanimation example looks for osgAnimation (which isn't 
in OSG yet, so there should be a CMake option to compile that example or 
not and fields to specify where osgAnimation is) and the 
osgpangoguiviewer example seems to use methods and data members in 
osgWidget which don't exist (or is it that they're on the osgWidget 
branch but not in the main OSG SVN yet?).


Note that at this point I'm just getting things to compile. I haven't 
actually run anything yet. Status report would read as follows:


osgCairo:
  * lib compiles100%
  * all examples compile100%

osgPango:
  * lib compiles100%
  * 3/5 examples compile 60%

I'll send all my changes tomorrow (I'm too tired to package that all up 
right now - it's past Midnight, and I've got swimming classes with my 
youngest very early tomorrow morning... :-) ). Jeremy, I seem to 
remember you prefer SVN diffs, contrary to OSG's standard policy, is 
that right? I'll send the changes in whatever format you prefer tomorrow.


I'll also test some executions tomorrow, can you please give me a few 
command lines that would be good tests? I've seen some data in the SVN 
working copy, but I don't know how to use it.


Thanks,

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org