Skip Menu |

This queue is for tickets about the Ogre CPAN distribution.

Report information
The Basics
Id: 94066
Status: open
Priority: 0/
Queue: Ogre

People
Owner: slanning [...] cpan.org
Requestors: dam [...] cpan.org
Cc: gregoa [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.60
Fixed in: (no value)



Subject: Support for ogre 1.9
Hi, I tried to port Ogre to ogre 1.9, because the Debian maintainers of the ogre library want to drop 1.8 from the distribution. The patch I came with is attached. It reduced the multi-page error list to only two errors, which have too much C++ in them for me :) ------------------------------------------------------- g++ -c -pthread -I/usr/include/OGRE -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/libdrm -I/usr/include/harfbuzz -Wno-write-strings -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -DVERSION=\"0.60\" -DXS_VERSION=\"0.60\" -fPIC "-I/usr/lib/perl/5.18/CORE" -DPERLOGRE_HAS_GTK2 Ogre.c In file included from /usr/include/OGRE/OgreAnimable.h:37:0, from /usr/include/OGRE/OgreAnimation.h:35, from /usr/include/OGRE/Ogre.h:33, from Ogre.xs:1: /usr/include/OGRE/OgreSharedPtr.h: In instantiation of 'Ogre::SharedPtr<T>::SharedPtr(const Ogre::SharedPtr<Y>&) [with Y = Ogre::Resource; T = Ogre::Skeleton]': ./xs/SkeletonManager.xs:11:64: required from here /usr/include/OGRE/OgreSharedPtr.h:202:28: error: invalid conversion from 'Ogre::Resource*' to 'Ogre::Skeleton*' [-fpermissive] , pInfo(r.pInfo) ^ /usr/include/OGRE/OgreSharedPtr.h: In instantiation of 'Ogre::SharedPtr<T>::SharedPtr(const Ogre::SharedPtr<Y>&) [with Y = Ogre::Resource; T = Ogre::Material]': ./xs/MaterialManager.xs:11:63: required from here /usr/include/OGRE/OgreSharedPtr.h:202:28: error: invalid conversion from 'Ogre::Resource*' to 'Ogre::Material*' [-fpermissive] make[1]: *** [Ogre.o] Error 1 ------------------------------------------------------- Any clues? The Debian ticket about the migration of the perl bindings to Ogre 1.9 is at https://bugs.debian.org/732725 Cheers, dam Debian Perl Group
Subject: ogre-1.9.patch
--- a/Ogre/RenderWindow.pm +++ b/Ogre/RenderWindow.pm @@ -149,15 +149,7 @@ I<Returns> =back -=head2 $obj->swapBuffers($waitForVSync=true) - -I<Parameter types> - -=over - -=item $waitForVSync=true : bool - -=back +=head2 $obj->swapBuffers() I<Returns> --- a/xs/RenderWindow.xs +++ b/xs/RenderWindow.xs @@ -39,8 +39,7 @@ bool RenderWindow::isClosed() void -RenderWindow::swapBuffers(waitForVSync=true) - bool waitForVSync +RenderWindow::swapBuffers() # two versions, one in RenderTarget --- a/xs/ResourceManager.xs +++ b/xs/ResourceManager.xs @@ -4,7 +4,7 @@ MODULE = Ogre PACKAGE = Ogre::Resour Resource * ResourceManager::create(String name, String group, bool isManual=false, ManualResourceLoader *loader=0) CODE: - RETVAL = THIS->create(name, group, isManual, loader).getPointer(); + RETVAL = THIS->createResource(name, group, isManual, loader).getPointer(); OUTPUT: RETVAL @@ -67,7 +67,7 @@ ResourceManager::removeAll() Resource * ResourceManager::getByName(String name) CODE: - RETVAL = THIS->getByName(name).getPointer(); + RETVAL = THIS->getResourceByName(name).getPointer(); OUTPUT: RETVAL --- a/xs/RenderSystem.xs +++ b/xs/RenderSystem.xs @@ -80,12 +80,6 @@ RenderSystem::detachRenderTarget(name) String RenderSystem::getErrorDescription(long errorNumber) -void -RenderSystem::setWaitForVerticalBlank(bool enabled) - -bool -RenderSystem::getWaitForVerticalBlank() - ## void RenderSystem::convertColourValue(const ColourValue &colour, uint32 *pDest) int @@ -95,9 +89,9 @@ void RenderSystem::setStencilCheckEnabled(bool enabled) void -RenderSystem::setStencilBufferParams(int func=CMPF_ALWAYS_PASS, uint32 refValue, uint32 mask=0xFFFFFFFF, int stencilFailOp=SOP_KEEP, int depthFailOp=SOP_KEEP, int passOp=SOP_KEEP, bool twoSidedOperation=false) +RenderSystem::setStencilBufferParams(CompareFunction func=CMPF_ALWAYS_PASS, uint32 refValue=0, uint32 compareMask=0xFFFFFFFF, uint32 writeMask=0xFFFFFFFF, StencilOperation stencilFailOp=SOP_KEEP, StencilOperation depthFailOp=SOP_KEEP, StencilOperation passOp=SOP_KEEP, bool twoSidedOperation=false) C_ARGS: - (CompareFunction)func, refValue, mask, (StencilOperation)stencilFailOp, (StencilOperation)depthFailOp, (StencilOperation)passOp, twoSidedOperation + (CompareFunction)func, refValue, compareMask, writeMask, (StencilOperation)stencilFailOp, (StencilOperation)depthFailOp, (StencilOperation)passOp, twoSidedOperation void RenderSystem::setVertexDeclaration(VertexDeclaration *decl) --- a/typemap +++ b/typemap @@ -195,6 +195,8 @@ const WorldFragment * S_WORLDFRAGMENT ManualObjectSection * S_MANUALOBJECTSECTION const ManualObjectSection * S_MANUALOBJECTSECTION NameValuePairList T_MAPSTRSTR +CompareFunction T_ENUM +StencilOperation T_ENUM INPUT --- a/Ogre.xs +++ b/Ogre.xs @@ -1,4 +1,5 @@ #include <Ogre.h> +#include <OGRE/Overlay/OgreOverlayManager.h> #include <string> #include <set> #include <vector>
On Thu Mar 20 16:01:27 2014, DAM wrote: Show quoted text
> Hi, > > I tried to port Ogre to ogre 1.9, because the Debian maintainers of > the ogre library want to drop 1.8 from the distribution. > > The patch I came with is attached. It reduced the multi-page error > list to only two errors, which have too much C++ in them for me :) > > ------------------------------------------------------- > g++ -c -pthread -I/usr/include/OGRE -pthread -I/usr/include/gtk-2.0 > -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 > -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 > -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ > -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64- > linux-gnu/glib-2.0/include -I/usr/include/pixman-1 > -I/usr/include/libpng12 -I/usr/include/libdrm -I/usr/include/harfbuzz > -Wno-write-strings -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack- > protector -fno-strict-aliasing -pipe -I/usr/local/include > -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fstack-protector > --param=ssp-buffer-size=4 -Wformat -Werror=format-security > -D_FORTIFY_SOURCE=2 -DVERSION=\"0.60\" -DXS_VERSION=\"0.60\" -fPIC > "-I/usr/lib/perl/5.18/CORE" -DPERLOGRE_HAS_GTK2 Ogre.c > In file included from /usr/include/OGRE/OgreAnimable.h:37:0, > from /usr/include/OGRE/OgreAnimation.h:35, > from /usr/include/OGRE/Ogre.h:33, > from Ogre.xs:1: > /usr/include/OGRE/OgreSharedPtr.h: In instantiation of > 'Ogre::SharedPtr<T>::SharedPtr(const Ogre::SharedPtr<Y>&) [with Y = > Ogre::Resource; T = Ogre::Skeleton]': > ./xs/SkeletonManager.xs:11:64: required from here > /usr/include/OGRE/OgreSharedPtr.h:202:28: error: invalid conversion > from 'Ogre::Resource*' to 'Ogre::Skeleton*' [-fpermissive] > , pInfo(r.pInfo) > ^ > /usr/include/OGRE/OgreSharedPtr.h: In instantiation of > 'Ogre::SharedPtr<T>::SharedPtr(const Ogre::SharedPtr<Y>&) [with Y = > Ogre::Resource; T = Ogre::Material]': > ./xs/MaterialManager.xs:11:63: required from here > /usr/include/OGRE/OgreSharedPtr.h:202:28: error: invalid conversion > from 'Ogre::Resource*' to 'Ogre::Material*' [-fpermissive] > make[1]: *** [Ogre.o] Error 1 > > ------------------------------------------------------- > > Any clues? > > The Debian ticket about the migration of the perl bindings to Ogre 1.9 > is at https://bugs.debian.org/732725 > > Cheers, > dam > Debian Perl Group
Thanks for the patch. I'll look at it when I get a chance.
Any news? ogre 1.8 is about to be dropped from Debian which will make this distribution unbuildable/uninstallable as well. Cheers, gregor, Debian Perl Group