Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 21, 2011, 6:16:24 AM (14 years ago)
Author:
rgrieder
Message:

Dropped support for OGRE v1.4 and removed the remaining workarounds.

Location:
code/branches/kicklib/src
Files:
2 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib/src/external/ogreceguirenderer/OgreCEGUIRenderer.cpp

    r5781 r7948  
    455455        d_render_sys->_setTextureAddressingMode(0, d_uvwAddressMode);
    456456        d_render_sys->_setTextureMatrix(0, Matrix4::IDENTITY);
    457 #if OGRE_VERSION >= 0x010600
    458457        d_render_sys->_setAlphaRejectSettings(CMPF_ALWAYS_PASS, 0, false);
    459 #else
    460         d_render_sys->_setAlphaRejectSettings(CMPF_ALWAYS_PASS, 0);
    461 #endif
    462458        d_render_sys->_setTextureBlendMode(0, d_colourBlendMode);
    463459        d_render_sys->_setTextureBlendMode(0, d_alphaBlendMode);
  • code/branches/kicklib/src/external/ogreceguirenderer/VERSION

    r5781 r7948  
    1 This library is part of the OGRE v1.6.1 source.
     1This library is part of the OGRE v1.6.5 source.
    22
    33-----
  • code/branches/kicklib/src/external/ogreceguirenderer/changes_orxonox.diff

    r7163 r7948  
    1818 #include "OgreCEGUIRenderer.h"
    1919 #include "OgreCEGUITexture.h"
    20 @@ -454,7 +454,11 @@
    21         d_render_sys->_setTextureUnitFiltering(0, FO_LINEAR, FO_LINEAR, FO_POINT);
    22         d_render_sys->_setTextureAddressingMode(0, d_uvwAddressMode);
    23         d_render_sys->_setTextureMatrix(0, Matrix4::IDENTITY);
    24 +#if OGRE_VERSION >= 0x010600
    25 +       d_render_sys->_setAlphaRejectSettings(CMPF_ALWAYS_PASS, 0, false);
    26 +#else
    27         d_render_sys->_setAlphaRejectSettings(CMPF_ALWAYS_PASS, 0);
    28 +#endif
    29         d_render_sys->_setTextureBlendMode(0, d_colourBlendMode);
    30         d_render_sys->_setTextureBlendMode(0, d_alphaBlendMode);
    31         d_render_sys->_disableTextureUnitsFrom(1);
    3220--- OgreCEGUIRenderer.h Wed Jan 28 21:14:09 2009
    3321+++ OgreCEGUIRenderer.h Wed Jan 28 21:06:46 2009
  • code/branches/kicklib/src/libraries/core/CMakeLists.txt

    r7944 r7948  
    5454  command/ArgumentCompletionFunctions.cc
    5555  ConfigFileManager.cc
    56   MemoryArchive.cc
    5756  PathConfig.cc
    5857COMPILATION_END
  • code/branches/kicklib/src/libraries/core/GraphicsManager.cc

    r7874 r7948  
    3535#include <boost/shared_array.hpp>
    3636
    37 #include <OgreArchiveFactory.h>
    38 #include <OgreArchiveManager.h>
    3937#include <OgreFrameListener.h>
    4038#include <OgreRoot.h>
     
    5856#include "GameMode.h"
    5957#include "Loader.h"
    60 #include "MemoryArchive.h"
    6158#include "PathConfig.h"
    6259#include "WindowEventListener.h"
     
    9087    GraphicsManager::GraphicsManager(bool bLoadRenderer)
    9188        : ogreWindowEventListener_(new OgreWindowEventListener())
    92 #if OGRE_VERSION < 0x010600
    93         , memoryArchiveFactory_(new MemoryArchiveFactory())
    94 #endif
    9589        , renderWindow_(0)
    9690        , viewport_(0)
     
    178172
    179173        this->loadRenderer();
    180 
    181 #if OGRE_VERSION < 0x010600
    182         // WORKAROUND: There is an incompatibility for particle scripts when trying
    183         // to support both Ogre 1.4 and 1.6. The hacky solution is to create
    184         // scripts for the 1.6 version and then remove the inserted "particle_system"
    185         // keyword. But we need to supply these new scripts as well, which is why
    186         // there is an extra Ogre::Archive dealing with it in the memory.
    187         using namespace Ogre;
    188         ArchiveManager::getSingleton().addArchiveFactory(memoryArchiveFactory_.get());
    189         const StringVector& groups = ResourceGroupManager::getSingleton().getResourceGroups();
    190         // Travers all groups
    191         for (StringVector::const_iterator itGroup = groups.begin(); itGroup != groups.end(); ++itGroup)
    192         {
    193             FileInfoListPtr files = ResourceGroupManager::getSingleton().findResourceFileInfo(*itGroup, "*.particle");
    194             for (FileInfoList::const_iterator itFile = files->begin(); itFile != files->end(); ++itFile)
    195             {
    196                 // open file
    197                 Ogre::DataStreamPtr input = ResourceGroupManager::getSingleton().openResource(itFile->filename, *itGroup, false);
    198                 std::stringstream output;
    199                 // Parse file and replace "particle_system" with nothing
    200                 while (!input->eof())
    201                 {
    202                     std::string line = input->getLine();
    203                     size_t pos = line.find("particle_system");
    204                     if (pos != std::string::npos)
    205                     {
    206                         // 15 is the length of "particle_system"
    207                         line.replace(pos, 15, "");
    208                     }
    209                     output << line << std::endl;
    210                 }
    211                 // Add file to the memory archive
    212                 shared_array<char> data(new char[output.str().size()]);
    213                 // Debug optimisations
    214                 const std::string& outputStr = output.str();
    215                 char* rawData = data.get();
    216                 for (unsigned i = 0; i < outputStr.size(); ++i)
    217                     rawData[i] = outputStr[i];
    218                 MemoryArchive::addFile("particle_scripts_ogre_1.4_" + *itGroup, itFile->filename, data, output.str().size());
    219             }
    220             if (!files->empty())
    221             {
    222                 // Declare the files, but using a new group
    223                 ResourceGroupManager::getSingleton().addResourceLocation("particle_scripts_ogre_1.4_" + *itGroup,
    224                     "Memory", "particle_scripts_ogre_1.4_" + *itGroup);
    225             }
    226         }
    227 #endif
    228174
    229175        // Initialise all resources (do this AFTER the renderer has been loaded!)
  • code/branches/kicklib/src/libraries/core/GraphicsManager.h

    r7401 r7948  
    9898
    9999        scoped_ptr<OgreWindowEventListener> ogreWindowEventListener_; //!< Pimpl to hide OgreWindowUtilities.h
    100 #if OGRE_VERSION < 0x010600
    101         scoped_ptr<MemoryArchiveFactory>    memoryArchiveFactory_;    //!< Stores the modified particle scripts
    102 #endif
    103100        scoped_ptr<Ogre::LogManager>        ogreLogger_;
    104101        scoped_ptr<Ogre::Root>              ogreRoot_;                //!< Ogre's root
  • code/branches/kicklib/src/libraries/tools/Mesh.cc

    r6417 r7948  
    6969                this->entity_ = this->scenemanager_->createEntity("Mesh" + multi_cast<std::string>(Mesh::meshCounter_s++), meshsource);
    7070                this->entity_->setCastShadows(this->bCastShadows_);
    71 
    72 #if OGRE_VERSION < 0x010600
    73                 this->entity_->setNormaliseNormals(true);
    74                 /*
    75                     Excerpt from Ogre forum:
    76                     "Note that the above is only for the fixed function pipeline.
    77                     If/when you get into shaders, you'll need to manually normalize() the normal inside the vertex or pixel shader."
    78 
    79                     I don't know exactly what this means, but I put this here if there will be problems with shaders.
    80                 */
    81 #endif
    8271            }
    8372            catch (...)
Note: See TracChangeset for help on using the changeset viewer.