Resource merge: CVS HEAD will be unstable for a while!

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Post Reply
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 2
Contact:

Resource merge: CVS HEAD will be unstable for a while!

Post by sinbad » Mon Dec 20, 2004 12:47 am

Beware, cvs will be unstable for the next few days since I'm about to merge the resource-unstable branch into the HEAD. This means very big, interface breaking changes to the resource management, and whilst most of it is working now, there are still some issues to iron out. I would not recommend using CVS HEAD for a little while unless you're curious as to the resource changes which are incoming. For all production work you should remain on the Hastur branch, here's a reminder of how to get it:

Code: Select all

cvs -z3 up -Pd -A -r Hastur

You have been warned! :)
Last edited by sinbad on Tue Dec 21, 2004 3:48 pm, edited 1 time in total.
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 2
Contact:

Post by sinbad » Mon Dec 20, 2004 1:09 am

Oh, another thing to mention, CVS HEAD will require different dependencies from this point onwards. You will need zziplib (I use 0.12.83) for one, and I've also updated to freetype 2.1.9 and the newest version of zlib which creates zlib1.dll.

If you build these dependencies yourself on Windows, it's extremely important that you:

1. Make sure that the libs are built using /MD[d]
2. Make sure '_MT' is defined

Failure to do this will result in extremely random, highly frustrating crashes (I know, I've been there). I will of course be releasing an updated dependencies archive forthwith, but I want to finish all the testing first so I can be sure everything really is ok.
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 2
Contact:

Post by sinbad » Tue Dec 21, 2004 3:52 pm

RC1 of the VC++ dependencies for 1.0.0 have been released, for those who want to start playing with the unstable version.

Includes DevIL, Cg, Freetype, Ode, OpCode, zziplib and zlib, all built using MSVCRT runtime libraries with _MT enabled, but without STLport. Since no STL-related classes are passed across the interfaces the non-STLport build will work with any setup, STLport or otherwise.
0 x

User avatar
_mental_
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 419
Joined: Mon Jan 27, 2003 11:51 pm
Location: The Woodlands, TX
Contact:

Post by _mental_ » Tue Dec 21, 2004 4:37 pm

Linux (and probably OSX) users should note that CVS HEAD doesn't currently work for them though. This should be rectified soon and I will post back when it is
0 x

User avatar
cTh
Halfling
Posts: 81
Joined: Wed Dec 11, 2002 10:47 am
Location: Moscow/Russia

Post by cTh » Wed Dec 29, 2004 1:30 pm

While porting my libs to the 1.0 HEAD CVS branch version I found a nast BUG wich I suppose is one of those hard to track ;)

In OgreMaterial.cpp the method Material::applyDefaults first save the name and handle of the material, copy to it the defaulMaterial and then restore the name and handle...and you loose the group ;), groupName should also be stored and after copying restored to mGroup, after that the new resource system works like a charm ;)

And BTW, the new resource system is perfect, just what Ogre was missing ;)

HtH, cTh
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 2
Contact:

Post by sinbad » Wed Dec 29, 2004 4:16 pm

Hey cTh, welcome back! :)

Yeah, tuan kuranes found this bug a few days back, it's already fixed in CVS (along with a lot of other things), you'll want to update.

Glad you like what you see, I'm still tinkering a little (I need to do some progress bar examples and a few things might change depending on my experience with that) but mostly everything is working how I expected.
0 x

User avatar
cTh
Halfling
Posts: 81
Joined: Wed Dec 11, 2002 10:47 am
Location: Moscow/Russia

Post by cTh » Wed Dec 29, 2004 4:21 pm

sinbad wrote: Hey cTh, welcome back! :)
Thnx, it's been a long time without developing nothing ;)
sinbad wrote: Yeah, tuan kuranes found this bug a few days back, it's already fixed in CVS (along with a lot of other things), you'll want to update.
woops, I updated today but did not notice that...sorry...
0 x
HtH, cTh

User avatar
cTh
Halfling
Posts: 81
Joined: Wed Dec 11, 2002 10:47 am
Location: Moscow/Russia

Post by cTh » Thu Dec 30, 2004 12:21 pm

Sorry to bother again but I updated today to the last CVS HEAD branch and Material does not handle the group persistence correctly, applyDefaults and copyDetailsTo loose the mGroup member, only clone works right, please have a look at this Sinbad in OgreMaterial.cpp.
0 x
HtH, cTh

User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
Contact:

Post by tuan kuranes » Thu Dec 30, 2004 2:31 pm

About material::clone :

Seems that TextureUnitState of a Pass of a Technique of a Material do not have his mParent updated when cloned to a new group.

Techniques and pass does reference the good cloned material in mParent, but not the TUS::load calling mParent->getResourceGroup() returns the original Material and therefore group.

About Material creation :

I confirm Cth problem for materials. (all materials gets mgroup "general" whatever group it is in cause of material::applydefault overridding mgroup.)

Code: Select all

//-----------------------------------------------------------------------
  void Material::copyDetailsTo(MaterialPtr& mat) const
  {
    // Keep handle (see below, copy overrides everything)
    ResourceHandle savedHandle = mat->mHandle;
    String savedName = mat->mName;
    String savedGroup = mat->mGroup;
    // Assign values from this
    *mat = *this;
    // Correct the name & handle, they get copied too
    mat->mName = savedName;
    mat->mHandle = savedHandle;
    mat->mGroup = savedGroup;
  }
  //-----------------------------------------------------------------------
  void Material::applyDefaults(void)
  {
    MaterialPtr defaults = MaterialManager::getSingleton().getDefaultSettings();

    if (!defaults.isNull())
  {
     // save name & handle & group
      String savedName = mName;
      ResourceHandle savedHandle = mHandle;
      String savedGroup = mGroup;
      *this = *defaults;
      // restore name & handle & group
      mName = savedName;
      mHandle = savedHandle;
      mGroup = savedGroup;
    }
    mCompilationRequired = true;
  }
That fix the bad original group bug. (and therefore my code doesn't need anymore to clone, so I avoid the clone bug, but it still exists...)
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 2
Contact:

Post by sinbad » Thu Dec 30, 2004 5:01 pm

Sorry, I didn't realise it existed in those places too, I should have checked. I'll fix it.
0 x

ruprechtthemonkeyboy
Gnoblar
Posts: 2
Joined: Mon Sep 20, 2004 3:07 pm
Location: Palmdale
Contact:

OS X build

Post by ruprechtthemonkeyboy » Thu Feb 03, 2005 5:55 pm

_mental_ wrote:Linux (and probably OSX) users should note that CVS HEAD doesn't currently work for them though. This should be rectified soon and I will post back when it is
Yes, the OS X build in HEAD has been broken for quite some time. Is there any ETA on when it will be fixed?
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 2
Contact:

Post by sinbad » Thu Feb 03, 2005 6:50 pm

temas is working on it right now.
0 x

ruprechtthemonkeyboy
Gnoblar
Posts: 2
Joined: Mon Sep 20, 2004 3:07 pm
Location: Palmdale
Contact:

Post by ruprechtthemonkeyboy » Thu Feb 03, 2005 7:54 pm

Excellent! :D
0 x

User avatar
_mental_
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 419
Joined: Mon Jan 27, 2003 11:51 pm
Location: The Woodlands, TX
Contact:

Post by _mental_ » Thu Feb 03, 2005 11:58 pm

I should point out that the Linux version has been working for quite a while, but I forgot to post back here.
0 x

Post Reply