All pastes #83319 Raw Edit

Untitled

public text v1 · immutable
·published 2006-07-09 17:04 UTC
rendered paste body
void OgreCEGUITexture::loadFromMemory(const void* buffPtr, uint buffWidth,
     uint buffHeight, CEGUI::Texture::PixelFormat pixelFormat)
{
	using namespace Ogre;

    Ogre::PixelFormat pf;
    switch (pixelFormat)
	{
	    case PF_RGB:
            pf = PF_R8G8B8;
            break;
        case PF_RGBA:
            pf = PF_A8R8G8B8;
            break;
	    default:
            throw RendererException((utf8*)"Failed to create Texture object from memory:  Unknown pixel format.");
    }