• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ stringutil::StrStreamType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中stringutil::StrStreamType的典型用法代码示例。如果您正苦于以下问题:C++ StrStreamType类的具体用法?C++ StrStreamType怎么用?C++ StrStreamType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了StrStreamType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ToString

void Version::ToString(String& text) const
{
    StringUtil::StrStreamType versionText;

    //Find the last non-zero component
    int lastNonzeroComponent = -1;
    for (int index = MAX_COMPONENTS - 1; index >= 0; index--)
    {
        if (this->components[index] != 0)
        {
            lastNonzeroComponent = index;
            break;
        }
    }

    //Output everything up to the last non-zero component
    if (lastNonzeroComponent >= 0)
    {
        for (int index = 0; index <= lastNonzeroComponent; index++)
        {
            versionText << this->components[index];
            if (index < lastNonzeroComponent)
                versionText << ".";
        }
    }
    else
    {
        //All components are zero
        versionText << "0";
    }

    text = versionText.str();
}
开发者ID:robinbattle,项目名称:Knockout,代码行数:33,代码来源:Version.cpp


示例2: reportLeaks

	//--------------------------------------------------------------------------
	void MemoryTracker::reportLeaks()
	{
		StringUtil::StrStreamType os;
		
		if (mAllocations.empty())
			os << "No leaks!";
		else
		{
			size_t totalMem = 0;
			os << "Leaks detected:" << std::endl << std::endl;
			for (AllocationMap::const_iterator i = mAllocations.begin(); i != mAllocations.end(); ++i)
			{
				const Alloc& alloc = i->second;
				if (!alloc.filename.empty())
					os << alloc.filename << "(" << alloc.line << ", " << alloc.function << "): ";
				else
					os << "(unknown source): ";
				os << alloc.bytes << " bytes";
				os << std::endl;
				totalMem += alloc.bytes;
			}
			
			os << std::endl;
			os << mAllocations.size() << " leaks detected, " << totalMem << " bytes total";
		}
		
		if (mDumpToStdOut)
			std::cout << os.str();
		
		std::ofstream of;
		of.open(mLeakFileName.c_str());
		of << os.str();
		of.close();
	}
开发者ID:gitrider,项目名称:wxsj2,代码行数:35,代码来源:OgreMemoryTracker.cpp


示例3: _freeUnusedBufferCopies

    //-----------------------------------------------------------------------
    void HardwareBufferManagerBase::_freeUnusedBufferCopies(void)
    {
        OGRE_LOCK_MUTEX(mTempBuffersMutex);
        size_t numFreed = 0;

        // Free unused temporary buffers
        FreeTemporaryVertexBufferMap::iterator i;
        i = mFreeTempVertexBufferMap.begin();
        while (i != mFreeTempVertexBufferMap.end())
        {
            FreeTemporaryVertexBufferMap::iterator icur = i++;
            // Free the temporary buffer that referenced by ourself only.
            // TODO: Some temporary buffers are bound to vertex buffer bindings
            // but not checked out, need to sort out method to unbind them.
            if (icur->second.useCount() <= 1)
            {
                ++numFreed;
                mFreeTempVertexBufferMap.erase(icur);
            }
        }

        StringUtil::StrStreamType str;
        if (numFreed)
        {
            str << "HardwareBufferManager: Freed " << numFreed << " unused temporary vertex buffers.";
        }
        else
        {
            str << "HardwareBufferManager: No unused temporary vertex buffers found.";
        }
        LogManager::getSingleton().logMessage(str.str(), LML_TRIVIAL);
    }
开发者ID:Ali-il,项目名称:gamekit,代码行数:33,代码来源:OgreHardwareBufferManager.cpp


示例4: ParseHardwareBufferUsage

HardwareBuffer::Usage OgreMaxUtilities::ParseHardwareBufferUsage(const String& usage)
{
    String usageLower = usage;
    StringUtil::toLowerCase(usageLower);

    if (usageLower == "static")
        return HardwareBuffer::HBU_STATIC;
    else if (usageLower == "dynamic")
        return HardwareBuffer::HBU_DYNAMIC;
    else if (usageLower == "writeonly")
        return HardwareBuffer::HBU_WRITE_ONLY;
    else if (usageLower == "staticwriteonly")
        return HardwareBuffer::HBU_STATIC_WRITE_ONLY;
    else if (usageLower == "dynamicwriteonly")
        return HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY;
    
    StringUtil::StrStreamType errorMessage;
    errorMessage << "Invalid hardware buffer usage specified: " << usage;

    OGRE_EXCEPT
        (
        Exception::ERR_INVALIDPARAMS,
	    errorMessage.str(), 
	    "OgreMaxUtilities::ParseHardwareBufferUsage"
        );
}
开发者ID:Gachuk,项目名称:Hardwar,代码行数:26,代码来源:OgreMaxUtilities.cpp


示例5: ParseShadowTechnique

ShadowTechnique OgreMaxUtilities::ParseShadowTechnique(const String& technique)
{
    String techniqueLower = technique;
    StringUtil::toLowerCase(techniqueLower);

    if (techniqueLower == "none")
        return SHADOWTYPE_NONE;
    else if (techniqueLower == "stencilmodulative")
        return SHADOWTYPE_STENCIL_MODULATIVE;
    else if (techniqueLower == "stenciladditive")
        return SHADOWTYPE_STENCIL_ADDITIVE;
    else if (techniqueLower == "texturemodulative")
        return SHADOWTYPE_TEXTURE_MODULATIVE;
    else if (techniqueLower == "textureadditive")
        return SHADOWTYPE_TEXTURE_ADDITIVE;
    else if (techniqueLower == "texturemodulativeintegrated")
        return SHADOWTYPE_TEXTURE_MODULATIVE_INTEGRATED;
    else if (techniqueLower == "textureadditiveintegrated")
        return SHADOWTYPE_TEXTURE_ADDITIVE_INTEGRATED;    

    StringUtil::StrStreamType errorMessage;
    errorMessage << "Invalid shadow technique specified: " << technique;

    OGRE_EXCEPT
        (
        Exception::ERR_INVALIDPARAMS,
	    errorMessage.str(), 
	    "OgreMaxUtilities::ParseShadowTechnique"
        );
}
开发者ID:Gachuk,项目名称:Hardwar,代码行数:30,代码来源:OgreMaxUtilities.cpp


示例6: ParseBillboardOrigin

BillboardOrigin OgreMaxUtilities::ParseBillboardOrigin(const String& origin)
{
    String originLower = origin;
    StringUtil::toLowerCase(originLower);

    if (originLower == "topleft")
        return BBO_TOP_LEFT;
    else if (originLower == "topcenter")
        return BBO_TOP_CENTER;
    else if (originLower == "topright")
        return BBO_TOP_RIGHT;
    else if (originLower == "centerleft")
        return BBO_CENTER_LEFT;
    else if (originLower == "center")
        return BBO_CENTER;
    else if (originLower == "centerright")
        return BBO_CENTER_RIGHT;
    else if (originLower == "bottomleft")
        return BBO_BOTTOM_LEFT;
    else if (originLower == "bottomcenter")
        return BBO_BOTTOM_CENTER;
    else if (originLower == "bottomright")
        return BBO_BOTTOM_RIGHT;

    StringUtil::StrStreamType errorMessage;
    errorMessage << "Invalid billboard origin specified: " << origin;

    OGRE_EXCEPT
        (
        Exception::ERR_INVALIDPARAMS,
	    errorMessage.str(), 
	    "OgreMaxUtilities::ParseBillboardOrigin"
        );
}
开发者ID:Gachuk,项目名称:Hardwar,代码行数:34,代码来源:OgreMaxUtilities.cpp


示例7: ParticleAffector

    //-----------------------------------------------------------------------
    ColourInterpolatorAffector::ColourInterpolatorAffector(ParticleSystem* psys)
        : ParticleAffector(psys)
    {
		for (int i=0;i<MAX_STAGES;i++)
		{
			// set default colour to transparent grey, transparent since we might not want to display the particle here
			// grey because when a colour component is 0.5f the maximum difference to another colour component is 0.5f
			mColourAdj[i]	= ColourValue(0.5f, 0.5f, 0.5f, 0.0f);
			mTimeAdj[i]		= 1.0f;
		}

        mType = "ColourInterpolator";

        // Init parameters
        if (createParamDictionary("ColourInterpolatorAffector"))
        {
            ParamDictionary* dict = getParamDictionary();

			for (int i=0;i<MAX_STAGES;i++)
			{
				msColourCmd[i].mIndex	= i;
				msTimeCmd[i].mIndex		= i;

				StringUtil::StrStreamType stage;
				stage << i;
				String	colour_title	= String("colour") + stage.str();
				String	time_title		= String("time") + stage.str();
				String	colour_descr	= String("Stage ") + stage.str() + String(" colour.");
				String	time_descr		= String("Stage ") + stage.str() + String(" time.");

				dict->addParameter(ParameterDef(colour_title, colour_descr, PT_COLOURVALUE), &msColourCmd[i]);
				dict->addParameter(ParameterDef(time_title,   time_descr,   PT_REAL),		 &msTimeCmd[i]);
			}
        }
    }
开发者ID:Anti-Mage,项目名称:ogre,代码行数:36,代码来源:OgreColourInterpolatorAffector.cpp


示例8:

	void Win32GLSupport::setConfigOption(const String &name, const String &value)
	{
		ConfigOptionMap::iterator it = mOptions.find(name);

		// Update
		if(it != mOptions.end())
			it->second.currentValue = value;
		else
		{
            StringUtil::StrStreamType str;
            str << "Option named '" << name << "' does not exist.";
			OGRE_EXCEPT( Exception::ERR_INVALIDPARAMS, str.str(), "Win32GLSupport::setConfigOption" );
		}

		if( name == "Video Mode" )
			refreshConfig();

		if( name == "Full Screen" )
		{
			it = mOptions.find( "Display Frequency" );
			if( value == "No" )
			{
				it->second.currentValue = "N/A";
				it->second.immutable = true;
			}
			else
			{
				if (it->second.currentValue.empty() || it->second.currentValue == "N/A")
					it->second.currentValue = it->second.possibleValues.front();
				it->second.immutable = false;
			}
		}
	}
开发者ID:Ali-il,项目名称:gamekit,代码行数:33,代码来源:OgreWin32GLSupport.cpp


示例9: prepareMaterialInstance

	//------------------------------------------------------
	void MaterialService::prepareMaterialInstance(MaterialPtr& mat, unsigned int idx, int tag) {
		if (tag < 0) // Should not be here if the polygon is sky textured
			OPDE_EXCEPT("Non-instanced material instance requested", "MaterialService::prepareMaterialInstance");

		mat->setReceiveShadows(true);

		StringUtil::StrStreamType lightmapName;
		lightmapName << "@lightmap" << tag;

		Pass *shadPass = mat->getTechnique(0)->getPass(0);

		if (shadPass->getNumTextureUnitStates() <= 1) {
			// Lightmap texture is added here
			TextureUnitState* tex = shadPass->createTextureUnitState(lightmapName.str());


			// Blend
			tex->setColourOperation(LBO_MODULATE);
			// Use 2nd texture co-ordinate set
			tex->setTextureCoordSet(1);

			// Clamp
			tex->setTextureAddressingMode(TextureUnitState::TAM_CLAMP);


			// Switch filtering off to see lmap pixels: TFO_NONE
			tex->setTextureFiltering(TFO_BILINEAR);
		} else {
			// There is a definition of the lightmapping pass already, we only update that definition
			TextureUnitState* tex = shadPass->getTextureUnitState(1);
			tex->setTextureName(lightmapName.str());
			tex->setTextureCoordSet(1);
		}
	}
开发者ID:Painpillow,项目名称:openDarkEngine,代码行数:35,代码来源:MaterialService.cpp


示例10: processResponse

//---------------------------------------------------------------------
void DefaultWorkQueueBase::processResponse(Response* r)
{
    StringUtil::StrStreamType dbgMsg;
    dbgMsg << "thread:" <<
#if OGRE_THREAD_SUPPORT
           OGRE_THREAD_CURRENT_ID
#else
           "main"
#endif
           << "): ID=" << r->getRequest()->getID()
           << " success=" << r->succeeded() << " messages=[" << r->getMessages() << "] channel="
           << r->getRequest()->getChannel() << " requestType=" << r->getRequest()->getType();

    LogManager::getSingleton().stream(LML_TRIVIAL) <<
            "DefaultWorkQueueBase('" << mName << "') - PROCESS_RESPONSE_START(" << dbgMsg.str();

    ResponseHandlerListByChannel::iterator i = mResponseHandlers.find(r->getRequest()->getChannel());
    if (i != mResponseHandlers.end())
    {
        ResponseHandlerList& handlers = i->second;
        for (ResponseHandlerList::reverse_iterator j = handlers.rbegin(); j != handlers.rend(); ++j)
        {
            if ((*j)->canHandleResponse(r, this))
            {
                (*j)->handleResponse(r, this);
            }
        }
    }
    LogManager::getSingleton().stream(LML_TRIVIAL) <<
            "DefaultWorkQueueBase('" << mName << "') - PROCESS_RESPONSE_END(" << dbgMsg.str();

}
开发者ID:JobsSteve,项目名称:gamekit-2,代码行数:33,代码来源:OgreWorkQueue.cpp


示例11: ParseBillboardType

BillboardType OgreMaxUtilities::ParseBillboardType(const String& type)
{
    String typeLower = type;
    StringUtil::toLowerCase(typeLower);

    if (typeLower == "point")
        return BBT_POINT;
    else if (typeLower == "orientedcommon")
        return BBT_ORIENTED_COMMON;
    else if (typeLower == "orientedself")
        return BBT_ORIENTED_SELF;
    else if (typeLower == "perpendicularcommon")
        return BBT_PERPENDICULAR_COMMON;
    else if (typeLower == "perpendicularself")
        return BBT_PERPENDICULAR_SELF;

    StringUtil::StrStreamType errorMessage;
    errorMessage << "Invalid billboard type specified: " << type;

    OGRE_EXCEPT
        (
        Exception::ERR_INVALIDPARAMS,
	    errorMessage.str(), 
	    "OgreMaxUtilities::ParseBillboardType"
        );
}
开发者ID:Gachuk,项目名称:Hardwar,代码行数:26,代码来源:OgreMaxUtilities.cpp


示例12: ParseBoundingVolumeType

BoundingVolume::Type OgreMaxUtilities::ParseBoundingVolumeType(const String& type)
{
    String typeLower = type;
    StringUtil::toLowerCase(typeLower);

    if (typeLower == "sphere")
        return BoundingVolume::SPHERE;
    else if (typeLower == "box")
        return BoundingVolume::BOX;
    else if (typeLower == "cylinder")
        return BoundingVolume::CYLINDER;
    else if (typeLower == "capsule")
        return BoundingVolume::CAPSULE;
    else if (typeLower == "mesh")
        return BoundingVolume::MESH;

    StringUtil::StrStreamType errorMessage;
    errorMessage << "Invalid bounding volume type specified: " << type;

    OGRE_EXCEPT
        (
        Exception::ERR_INVALIDPARAMS,
	    errorMessage.str(),
	    "OgreMaxUtilities::ParseBoundingVolumeType"
        );
}
开发者ID:MuhammadYossry,项目名称:Morph-SDK,代码行数:26,代码来源:OgreMaxUtilities.cpp


示例13: driverDescription

	String D3D9Driver::DriverDescription() const
	{       
		StringUtil::StrStreamType str;
		str << "Monitor-" << (mAdapterNumber+1) << "-" << mAdapterIdentifier.Description;
		String driverDescription(str.str());
		StringUtil::trim(driverDescription);

        return  driverDescription;
	}
开发者ID:Bewolf2,项目名称:LearningGameAI,代码行数:9,代码来源:OgreD3D9Driver.cpp


示例14: ParsePixelFormat

PixelFormat OgreMaxUtilities::ParsePixelFormat(const String& pixelFormat)
{
    static bool initialized = false;
    static std::map<String, PixelFormat> nameToFormat;
    if (!initialized)
    {
        nameToFormat["PF_L8"] = PF_L8;
        nameToFormat["PF_L16"] = PF_L16;
        nameToFormat["PF_A8"] = PF_A8;
        nameToFormat["PF_A4L4"] = PF_A4L4;
        nameToFormat["PF_BYTE_LA"] = PF_BYTE_LA;
        nameToFormat["PF_R5G6B5"] = PF_R5G6B5;
        nameToFormat["PF_B5G6R5"] = PF_B5G6R5;
        nameToFormat["PF_R3G3B2"] = PF_R3G3B2;
        nameToFormat["PF_A4R4G4B4"] = PF_A4R4G4B4;
        nameToFormat["PF_A1R5G5B5"] = PF_A1R5G5B5;
        nameToFormat["PF_R8G8B8"] = PF_R8G8B8;
        nameToFormat["PF_B8G8R8"] = PF_B8G8R8;
        nameToFormat["PF_A8R8G8B8"] = PF_A8R8G8B8;
        nameToFormat["PF_A8B8G8R8"] = PF_A8B8G8R8;
        nameToFormat["PF_B8G8R8A8"] = PF_B8G8R8A8;
        nameToFormat["PF_R8G8B8A8"] = PF_R8G8B8A8;
        nameToFormat["PF_X8R8G8B8"] = PF_X8R8G8B8;
        nameToFormat["PF_X8B8G8R8"] = PF_X8B8G8R8;
        nameToFormat["PF_A2R10G10B10"] = PF_A2R10G10B10;
        nameToFormat["PF_A2B10G10R10"] = PF_A2B10G10R10;
        nameToFormat["PF_FLOAT16_R"] = PF_FLOAT16_R;
        nameToFormat["PF_FLOAT16_RGB"] = PF_FLOAT16_RGB;
        nameToFormat["PF_FLOAT16_RGBA"] = PF_FLOAT16_RGBA;
        nameToFormat["PF_FLOAT32_R"] = PF_FLOAT32_R;
        nameToFormat["PF_FLOAT32_RGB"] = PF_FLOAT32_RGB;
        nameToFormat["PF_FLOAT32_RGBA"] = PF_FLOAT32_RGBA;
        nameToFormat["PF_FLOAT16_GR"] = PF_FLOAT16_GR;
        nameToFormat["PF_FLOAT32_GR"] = PF_FLOAT32_GR;
        nameToFormat["PF_DEPTH"] = PF_DEPTH;
        nameToFormat["PF_SHORT_RGBA"] = PF_SHORT_RGBA;
        nameToFormat["PF_SHORT_GR"] = PF_SHORT_GR;
        nameToFormat["PF_SHORT_RGB"] = PF_SHORT_RGB;        

        initialized = true;
    }

    std::map<String, PixelFormat>::iterator format = nameToFormat.find(pixelFormat);
    if (format != nameToFormat.end())
        return format->second;
    
    StringUtil::StrStreamType errorMessage;
    errorMessage << "Invalid pixel format specified: " << pixelFormat;

    OGRE_EXCEPT
        (
        Exception::ERR_INVALIDPARAMS,
	    errorMessage.str(), 
	    "OgreMaxUtilities::ParsePixelFormat"
        );
}
开发者ID:Gachuk,项目名称:Hardwar,代码行数:56,代码来源:OgreMaxUtilities.cpp


示例15: toString

//-----------------------------------------------------------------------
String StringConverter::toString(unsigned long val,
                                 unsigned short width, char fill, std::ios::fmtflags flags)
{
    StringUtil::StrStreamType stream;
    stream.width(width);
    stream.fill(fill);
    if (flags)
        stream.setf(flags);
    stream << val;
    return stream.str();
}
开发者ID:venkatarajasekhar,项目名称:viper,代码行数:12,代码来源:OgreStringConverter.cpp


示例16: main

int main(char argc, char** argv)
{


	// Try D3D
	try 
	{
		Root root("", "", "OgreCapsReportD3D9.log");
		StringUtil::StrStreamType str;
		str << "RenderSystem_Direct3D9" << LIB_SUFFIX;
		root.loadPlugin(str.str());

		RenderSystem* rs = root.getAvailableRenderers()->at(0);
		ConfigOption& opt = 
			rs->getConfigOptions().find("Rendering Device")->second;
		opt.currentValue = opt.possibleValues[0];
		root.setRenderSystem(rs);
		root.initialise(false);
		root.createRenderWindow("probe", 100, 100, false);

	}
	catch(std::exception&)
	{
		// failed D3D9
		LogManager::getSingleton().logMessage("D3D9 testing failed - perhaps you "
			"don't have the D3D9 runtime installed on this machine?");
	}



	// Try GL
	try 
	{
		Root root("", "", "OgreCapsReportGL.log");
		StringUtil::StrStreamType str;
		str << "RenderSystem_GL" << LIB_SUFFIX;
		root.loadPlugin(str.str());

		RenderSystem* rs = root.getAvailableRenderers()->at(0);
		root.setRenderSystem(rs);
		root.initialise(false);
		root.createRenderWindow("probe", 100, 100, false);
	}
	catch(std::exception&)
	{
		// failed GL
		LogManager::getSingleton().logMessage("GL testing failed - perhaps you "
			"don't have a GL driver installed on this machine?");
	}


}
开发者ID:Anti-Mage,项目名称:ogre,代码行数:52,代码来源:main.cpp


示例17: UnloadMaterials

void UnloadMaterials(const std::string& filename)
{
    if (filename.empty())
    {
        Ogre::LogManager::getSingleton().logMessage("Filename is empty.");
        return;
    }
 
    Ogre::DataStreamPtr stream = Ogre::ResourceGroupManager::getSingleton().openResource(filename);
    if(!stream.isNull())
    {
        try
        {
            while(!stream->eof())
            {
                std::string line = stream->getLine();
                StringUtil::trim(line);
 
                ///
                /// UNLOAD MATERIALS
                ///
                if (StringUtil::startsWith(line, "material"))
                {
                    Ogre::vector<Ogre::String>::type vec = StringUtil::split(line," \t:");
                    bool skipFirst = true;
                    for (Ogre::vector<Ogre::String>::type::iterator it = vec.begin(); it < vec.end(); ++it)
                    {
                        if (skipFirst)
                        {
                            skipFirst = false;
                            continue;
                        }
                        std::string match = (*it);
                        StringUtil::trim(match);
                        if (!match.empty())
                        {
                            UnloadResource(Ogre::MaterialManager::getSingletonPtr(), match);
                            break;
                        }
                    }
                }
            }
        }
        catch (Ogre::Exception &e)
        {
            StringUtil::StrStreamType msg;
            msg << "Exception: FILE: " << __FILE__ << " LINE: " << __LINE__ << " DESC: " << e.getFullDescription() << std::endl;
            Ogre::LogManager::getSingleton().logMessage(msg.str());
        }
    }
    stream->close();
}
开发者ID:rbaravalle,项目名称:Pysys,代码行数:52,代码来源:ReloadMaterial.cpp


示例18: generateEntityKey

String ImpostorBatch::generateEntityKey(Entity *entity)
{
	StringUtil::StrStreamType entityKey;
	entityKey << entity->getMesh()->getName();
	for (uint32 i = 0; i < entity->getNumSubEntities(); ++i){
		entityKey << "-" << entity->getSubEntity(i)->getMaterialName();
	}
	entityKey << "-" << IMPOSTOR_YAW_ANGLES << "_" << IMPOSTOR_PITCH_ANGLES;
#ifdef IMPOSTOR_RENDER_ABOVE_ONLY
	entityKey << "_RAO";
#endif
	return entityKey.str();
}
开发者ID:Arsakes,项目名称:ember,代码行数:13,代码来源:ImpostorPage.cpp


示例19: startup

	//---------------------------------------------------------------------
	void FreeImageCodec::startup(void)
	{
		FreeImage_Initialise(false);

		LogManager::getSingleton().logMessage(
			LML_NORMAL,
			"FreeImage version: " + String(FreeImage_GetVersion()));
		LogManager::getSingleton().logMessage(
			LML_NORMAL,
			FreeImage_GetCopyrightMessage());

		// Register codecs
		StringUtil::StrStreamType strExt;
		strExt << "Supported formats: ";
		bool first = true;
		for (int i = 0; i < FreeImage_GetFIFCount(); ++i)
		{

			// Skip DDS codec since FreeImage does not have the option 
			// to keep DXT data compressed, we'll use our own codec
			if ((FREE_IMAGE_FORMAT)i == FIF_DDS)
				continue;
			
			String exts(FreeImage_GetFIFExtensionList((FREE_IMAGE_FORMAT)i));
			if (!first)
			{
				strExt << ",";
			}
			first = false;
			strExt << exts;
			
			// Pull off individual formats (separated by comma by FI)
			StringVector extsVector = StringUtil::split(exts, ",");
			for (StringVector::iterator v = extsVector.begin(); v != extsVector.end(); ++v)
			{
				ImageCodec* codec = OGRE_NEW FreeImageCodec(*v, i);
				msCodecList.push_back(codec);
				Codec::registerCodec(codec);
			}
		}
		LogManager::getSingleton().logMessage(
			LML_NORMAL,
			strExt.str());

		// Set error handler
		FreeImage_SetOutputMessage(FreeImageErrorHandler);




	}
开发者ID:masonh,项目名称:marblemax,代码行数:52,代码来源:OgreFreeImageCodec.cpp


示例20: MovableObject

    SimpleRenderable::SimpleRenderable()
 	: MovableObject()
 	, mWorldTransform(Matrix4::IDENTITY)
 	, mMatName("BaseWhite")
    , mMaterial(MaterialManager::getSingleton().getByName("BaseWhite"))
 	, mParentSceneManager(NULL)
 	, mCamera(NULL)

    {
        // Generate name
		StringUtil::StrStreamType name;
		name << "SimpleRenderable" << msGenNameCount++;
		mName = name.str();
    }
开发者ID:quinsmpang,项目名称:xsilium-engine,代码行数:14,代码来源:OgreSimpleRenderable.cpp



注:本文中的stringutil::StrStreamType类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ structureddata::Dictionary类代码示例发布时间:2022-05-31
下一篇:
C++ stringmap::const_iterator类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap