37#include <OgreBitwise.h>
38#include <boost/algorithm/string.hpp>
58 SWidget::SWidget() : SData(
""), isOverlayed(false), is2DRect(false)
63 SWidget::SWidget(
SScene* targetScene,
const std::string& widgetName,
const int& xPos,
const int& yPos,
const unsigned short& widgetWidth,
const unsigned short& widgetHeight,
SViewPort* targetViewport,
const unsigned int& widgetZOrder,
const std::string& widgetType) :
SData(widgetName), isOverlayed(true), is2DRect(false)
65 StandardConstructor(targetScene, xPos, yPos, widgetWidth, widgetHeight, widgetZOrder, targetViewport, widgetType);
66 if (widgetType !=
"BitmapWidget")
73 SWidget::SWidget(
SScene* targetScene,
const std::string& widgetName,
const int& xPos,
const int& yPos,
const unsigned short& widgetWidth,
const unsigned short& widgetHeight,
SViewPort* targetViewport,
const std::string& widgetType) :
SData(widgetName), isOverlayed(false), is2DRect(true)
75 StandardConstructor(targetScene, xPos, yPos, widgetWidth, widgetHeight, 0, targetViewport, widgetType);
77 if (widgetType !=
"BitmapWidget")
84 SWidget::SWidget(
SScene* targetScene,
const std::string& widgetName,
const unsigned short& widgetWidth,
const unsigned short& widgetHeight,
SMaterial* targetMaterial,
const unsigned short& targetTechnique,
const unsigned short& targetPass,
const unsigned short& targetTextureUnit,
const std::string& widgetType) :
SData(widgetName), isOverlayed(false), is2DRect(false)
86 StandardConstructor(targetScene, 0, 0, widgetWidth, widgetHeight, 0, 0, widgetType);
90 originalMaterial = targetMaterial;
99 ogreTargetMaterialPass = ogreTargetMaterial->getTechnique(targetTechnique)->getPass(targetPass);
100 ogreTargetTextureUnit = ogreTargetMaterialPass->getTextureUnitState(targetTextureUnit);
102 matData.
oSceneBlendingS = ogreTargetMaterialPass->getSourceBlendFactor();
103 matData.
oSceneBlendingD = ogreTargetMaterialPass->getDestBlendFactor();
104 matData.
oDepthWrite = ogreTargetMaterialPass->getDepthWriteEnabled();
106 ogreOriginalTextureUnit = OGRE_NEW Ogre::TextureUnitState(*ogreTargetTextureUnit);
107 renderingTextureUnit = OGRE_NEW Ogre::TextureUnitState(*ogreTargetTextureUnit);
110 if (widgetType !=
"BitmapWidget")
116 void SWidget::StandardConstructor(
SScene* targetScene,
const int& xPos,
const int& yPos,
const unsigned short& widgetWidth,
const unsigned short& widgetHeight,
const unsigned int& widgetZOrder,
SViewPort* targetViewport,
const std::string& widgetType)
130 renderingTextureUnit = 0;
131 ogreOriginalTextureUnit = 0;
135 baseResourceName = std::string(SO3_INTERNAL_RESOURCE_GROUP) +
"/Widgets/" + widgetType;
137 ogreTargetTextureUnit = 0;
138 ogreTargetMaterialPass = 0;
141 originalMaterial = 0;
144 isTransparent =
false;
146 keyboardEnable =
true;
148 transparentIgnorePixels = isOverlayed;
150 updateOnFocusOnly =
false;
161 zOrder = widgetZOrder;
163 ogreOverlayPanel = 0;
164 ogreOverlayMaterial.reset();
183 if (ogreOriginalTextureUnit)
190 Ogre::LayerBlendModeEx bmode = ogreOriginalTextureUnit->getAlphaBlendMode();
191 ogreTargetTextureUnit->setAlphaOperation(bmode.operation, bmode.source1, bmode.source2, bmode.alphaArg1, bmode.alphaArg2, bmode.factor);
192 ogreTargetTextureUnit->setTextureFiltering(ogreOriginalTextureUnit->getTextureFiltering(Ogre::FT_MIN), ogreOriginalTextureUnit->getTextureFiltering(Ogre::FT_MAG), ogreOriginalTextureUnit->getTextureFiltering(Ogre::FT_MIP));
194 ogreTargetTextureUnit->removeAllEffects();
195 Ogre::TextureUnitState::EffectMap effects = ogreOriginalTextureUnit->getEffects();
196 Ogre::TextureUnitState::EffectMap::const_iterator it;
197 for (it = effects.begin(); it != effects.end(); it++)
199 Ogre::TextureUnitState::TextureEffect effect = it->second;
200 ogreTargetTextureUnit->addEffect(effect);
203 ogreTargetMaterialPass->setDepthWriteEnabled(matData.
oDepthWrite);
207 if (!ogreOriginalTextureUnit->_getTexturePtr())
208 ogreTargetTextureUnit->setBlank();
210 ogreTargetTextureUnit->setTexture(ogreOriginalTextureUnit->_getTexturePtr());
212 catch (Ogre::Exception &)
214 ogreTargetTextureUnit->setTextureName(
"blackpix.jpg");
221 OGRE_DELETE(ogreOriginalTextureUnit);
222 OGRE_DELETE(renderingTextureUnit);
284 if (ogreOverlay != 0)
298 Ogre::Real
w = wcoef *
width;
299 Ogre::Real h = hcoef *
height;
300 Ogre::Real l = (wcoef *
leftPos) - 1.0f;
301 Ogre::Real t = 1.0f - (hcoef *
topPos);
302 Ogre::Real r = ((wcoef *
leftPos) +
w) - 1.0f;
303 Ogre::Real b = 1.0f - ((hcoef *
topPos) + h);
314 ogre2dRect->setCorners(l, t, r, b,
false);
316 Ogre::AxisAlignedBox aabInf;
317 aabInf.setInfinite();
318 ogre2dRect->setBoundingBox(aabInf);
324 if ((ogreOverlay != 0) || (ogre2dRect != 0))
352 if (ogreOverlay != 0 || ogre2dRect != 0)
368 if (ogreOverlay != 0 || ogre2dRect != 0)
370 rsize.
x =
static_cast<unsigned short>((float)
width * widthScale);
371 rsize.
y =
static_cast<unsigned short>((float)
height * heightScale);
383 if (ogreOverlay != 0)
387 ogreOverlay->setScale(1.0f, 1.0f);
388 ogreOverlayPanel->_setLeft(0.0f);
389 ogreOverlayPanel->_setTop(0.0f);
390 ogreOverlayPanel->setPosition(
static_cast<Ogre::Real
> (
leftPos),
static_cast<Ogre::Real
> (
topPos));
396 ogreOverlayPanel->_update();
400 Ogre::Real cleft = ogreOverlayPanel->_getLeft();
401 ogreOverlayPanel->_setLeft(cleft +
leftOffset);
406 Ogre::Real ctop = ogreOverlayPanel->_getTop();
407 ogreOverlayPanel->_setTop(ctop +
topOffset);
411 xCoef = Ogre::Vector2(ogreOverlayPanel->getLeft(), ogreOverlayPanel->getWidth());
412 yCoef = Ogre::Vector2(ogreOverlayPanel->getTop(), ogreOverlayPanel->getHeight());
415 ogreOverlay->setScale(widthScale, heightScale);
427 Ogre::Real
w = wcoef *
width;
428 Ogre::Real h = hcoef *
height;
429 Ogre::Real l = (wcoef *
leftPos) - 1.0f;
430 Ogre::Real t = 1.0f - (hcoef *
topPos);
431 Ogre::Real r = ((wcoef *
leftPos) +
w) - 1.0f;
432 Ogre::Real b = 1.0f - ((hcoef *
topPos) + h);
443 ogre2dRect->setCorners(l, t, r, b,
false);
445 Ogre::AxisAlignedBox aabInf;
446 aabInf.setInfinite();
447 ogre2dRect->setBoundingBox(aabInf);
462 if (type !=
"BitmapWidget")
479 if (ogreOverlay != 0)
480 ogreOverlay->setScale(widthScale, heightScale);
481 else if (ogre2dRect != 0)
494 zOrder = newWidgetOrder;
513 if (caps && (!caps->hasCapability(Ogre::RSC_NON_POWER_OF_2_TEXTURES)))
516 if (type !=
"BitmapWidget")
536#if defined(ANDROID) || defined(APPLE_IOS) || defined(RPI)
566 Ogre::PixelFormat format = Ogre::PF_A8R8G8B8;
574 std::string grpName = (ogreTargetTextureUnit != 0) ? ogreTargetTextureUnit->getParent()->getResourceGroup() : SO3_INTERNAL_RESOURCE_GROUP;
577 catch (Ogre::Exception &e)
579 Ogre::LogManager::getSingleton().getDefaultLog()->logMessage(
"An exception has occurred: " + e.getDescription());
586 Ogre::HardwarePixelBufferSharedPtr pixelBuffer =
renderingTexture->getBuffer();
587 pixelBuffer->lock(Ogre::HardwareBuffer::HBL_DISCARD);
588 const Ogre::PixelBox& pixelBox = pixelBuffer->getCurrentLock();
589 unsigned int textureDepth = Ogre::PixelUtil::getNumElemBytes(pixelBox.format);
590 unsigned int texturePitch = (pixelBox.rowPitch*textureDepth);
592 pixelBuffer->unlock();
595 if (ogreTargetTextureUnit != 0)
600 renderingTextureUnit->removeAllEffects();
603 renderingTextureUnit->setTextureAddressingMode(Ogre::TextureUnitState::TAM_WRAP);
605 renderingTextureUnit->setTextureAddressingMode(Ogre::TextureUnitState::TAM_CLAMP);
606 renderingTextureUnit->setTextureFiltering(Ogre::FO_LINEAR, Ogre::FO_LINEAR, Ogre::FO_NONE);
611 ogreTargetTextureUnit->removeAllEffects();
613 ogreTargetTextureUnit->setTextureAddressingMode(Ogre::TextureUnitState::TAM_WRAP);
615 ogreTargetTextureUnit->setTextureAddressingMode(Ogre::TextureUnitState::TAM_CLAMP);
616 ogreTargetTextureUnit->setTextureFiltering(Ogre::FO_LINEAR, Ogre::FO_LINEAR, Ogre::FO_NONE);
619 ogreTargetTextureUnit->setBlank();
628 Ogre::Material* mat = ogreTargetTextureUnit->getParent()->getParent()->getParent();
629 std::vector<Ogre::Technique*> techs = mat->getTechniques();
630 for (
unsigned int i = 0; i < techs.size(); i++)
632 if (techs[i]->getSchemeName().find(
"/Ssao/") != Ogre::String::npos)
633 mat->removeTechnique(i);
638 if (ogreOverlayMaterial)
641 ogreOverlayMaterial->getTechnique(0)->getPass(0)->getTextureUnitState(0)->setBlank();
643 ogreOverlayMaterial->getTechnique(0)->getPass(0)->getTextureUnitState(0)->setTexture(
renderingTexture);
649 void SWidget::DestroyTexture()
662 void SWidget::CreateOverlay()
664 assert(ogreOverlayMaterial);
670 ogreOverlayPanel =
static_cast<Ogre::PanelOverlayElement*
>(Ogre::OverlayManager::getSingleton().createOverlayElement(
"Panel",
baseResourceName +
"/Overlays/Panels/" +
name));
671 ogreOverlayPanel->setMetricsMode(Ogre::GMM_PIXELS);
672 ogreOverlayPanel->setMaterialName(ogreOverlayMaterial->getName());
675 ogreOverlay = Ogre::OverlayManager::getSingleton().create(
baseResourceName +
"/Overlays/" +
name);
676 ogreOverlay->add2D(ogreOverlayPanel);
682 void SWidget::DestroyOverlay()
684 if (ogreOverlayPanel != 0)
686 Ogre::OverlayManager::getSingleton().destroyOverlayElement(ogreOverlayPanel);
687 ogreOverlayPanel = 0;
690 if (ogreOverlay != 0)
692 Ogre::OverlayManager::getSingleton().destroy(ogreOverlay);
697 void SWidget::Create2D()
699 assert(ogreOverlayMaterial);
705 ogre2dRect =
new Ogre::Rectangle2D(
true);
707 ogre2dRect->setMaterial(ogreOverlayMaterial);
708 ogre2dRect->setCastShadows(
false);
711 ogre2dRect->setRenderQueueGroup(Ogre::RENDER_QUEUE_BACKGROUND);
714 Ogre::AxisAlignedBox aabInf;
715 aabInf.setInfinite();
716 ogre2dRect->setBoundingBox(aabInf);
717 ogre2dRect->setVisibilityFlags(1 << 11);
721 ogre2dNode->attachObject(ogre2dRect);
723 ogre2dRect->setRenderingDistance(0.0f);
724 ogre2dRect->setRenderingMinPixelSize(0.0f);
727 void SWidget::Destroy2D()
731 ogre2dRect->detachFromParent();
740 void SWidget::CreateMaterial()
742 assert((isOverlayed ==
true) || (is2DRect ==
true));
748 ogreOverlayMaterial = Ogre::MaterialManager::getSingleton().create(
baseResourceName +
"/Overlays/Panels/Materials/" +
name, SO3_INTERNAL_RESOURCE_GROUP);
749 Ogre::Pass* matPass = ogreOverlayMaterial->getTechnique(0)->getPass(0);
750 renderingTextureUnit = matPass->createTextureUnitState();
753 renderingTextureUnit->setTextureAddressingMode(Ogre::TextureUnitState::TAM_WRAP);
754 renderingTextureUnit->setTextureFiltering(Ogre::TFO_BILINEAR);
756 renderingTextureUnit->setTextureAddressingMode(Ogre::TextureUnitState::TAM_CLAMP);
757 renderingTextureUnit->setTextureFiltering(Ogre::FO_LINEAR, Ogre::FO_LINEAR, Ogre::FO_NONE);
763 matPass->setVertexProgram(
"SO3/VS/OVERLAY",
true);
764 matPass->setFragmentProgram(
"SO3/FP/OVERLAY",
true);
766 catch (Ogre::Exception &e)
768 MMechostr(MSKDEBUG,
"Warning : Overlay programm not found : %s", e.what());
774 renderingTextureUnit->setTextureName(
"blackpix.jpg");
778 renderingTextureUnit->setNumMipmaps(0);
780 catch (Ogre::Exception&)
786 matPass->setDepthCheckEnabled(
false);
787 matPass->setDepthWriteEnabled(
false);
788 matPass->setLightingEnabled(
false);
789 ogreOverlayMaterial->setReceiveShadows(
false);
792 ApplyMaterialParameters(matPass, renderingTextureUnit);
795 void SWidget::DestroyMaterial()
797 if (ogreOverlayMaterial)
803 ogreOverlayMaterial->unload();
804 Ogre::MaterialManager::getSingletonPtr()->remove(ogreOverlayMaterial->getHandle());
805 ogreOverlayMaterial.reset();
806 renderingTextureUnit = 0;
810 void SWidget::ApplyMaterialParameters(Ogre::Pass* materialPassToModify, Ogre::TextureUnitState* materialTextureUnitToModify)
812 assert((materialPassToModify != 0) && (materialTextureUnitToModify != 0));
814 if (isOverlayed || is2DRect || ((isTransparent || (opacity != 1.0f)) && (materialPassToModify->getTextureUnitStateIndex(materialTextureUnitToModify) == 0)))
816 if (mVisible || isOverlayed || is2DRect)
818 materialPassToModify->setSceneBlending(Ogre::SBF_SOURCE_ALPHA, Ogre::SBF_ONE_MINUS_SOURCE_ALPHA);
819 materialPassToModify->setDepthWriteEnabled(
false);
824 if (isOverlayed || is2DRect || mVisible)
825 materialPassToModify->setSceneBlending((isTransparent || (opacity != 1.0f)) ? Ogre::SBT_TRANSPARENT_ALPHA :
Ogre::SBT_REPLACE);
827 if (!isTransparent && (opacity == 1.0f) && (!is2DRect))
828 if (materialPassToModify->getTextureUnitStateIndex(materialTextureUnitToModify) == 0)
830 if (mVisible || isOverlayed)
831 materialPassToModify->setDepthWriteEnabled(
true);
835 if (isOverlayed || is2DRect || mVisible)
838 materialTextureUnitToModify->setTextureAddressingMode(Ogre::TextureUnitState::TAM_WRAP);
839 materialTextureUnitToModify->setTextureFiltering(Ogre::FO_LINEAR, Ogre::FO_LINEAR, Ogre::FO_NONE);
841 materialTextureUnitToModify->setTextureAddressingMode(Ogre::TextureUnitState::TAM_CLAMP);
842 materialTextureUnitToModify->setTextureFiltering(Ogre::FO_LINEAR, Ogre::FO_LINEAR, Ogre::FO_NONE);
846 if (isOverlayed || is2DRect)
850 if (materialPassToModify->hasFragmentProgram())
852 Ogre::GpuProgramParametersSharedPtr fparams = materialPassToModify->getFragmentProgramParameters();
853 fparams->setNamedConstant(
"opacity", opacity);
856 catch (Ogre::Exception &)
865 materialTextureUnitToModify->setAlphaOperation(Ogre::LBX_MODULATE, Ogre::LBS_TEXTURE, Ogre::LBS_CURRENT);
883 void SWidget::_SetOgreOverlayZOrder(
const unsigned short& overlayZOrder)
885 assert(ogreOverlay != 0);
886 ogreOverlay->setZOrder(overlayZOrder);
891 topOnFocus = enableWidgetTopOnFocus;
901 isPriorized = enableWidgetForeground;
937 for (
unsigned int i = 0; i < inputIndexes.size() && !found; i++)
938 found = (inputIndexes[i] ==
id) ? true :
false;
948 inputIndexes.push_back(
id);
953 for (
unsigned int i = 0; i < inputIndexes.size() && !found; i++)
955 found = (inputIndexes[i] == id) ?
true :
false;
957 inputIndexes.erase(inputIndexes.begin() + i);
960 mouseIsOver = (inputIndexes.size() > 0) ?
true :
false;
966 if (widgetOpacity > 1.0f)
968 else if (widgetOpacity < 0)
971 opacity = widgetOpacity;
973 if ((isOverlayed) || (is2DRect))
975 ApplyMaterialParameters(ogreOverlayMaterial->getTechnique(0)->getPass(0), renderingTextureUnit);
979 ApplyMaterialParameters(ogreTargetMaterialPass, ogreTargetTextureUnit);
1003 ogre2dRect->setVisible(
true);
1008 if (ogreOriginalTextureUnit)
1010 if (ogreTargetTextureUnit != 0)
1012 Ogre::LayerBlendModeEx bmode = renderingTextureUnit->getAlphaBlendMode();
1013 ogreTargetTextureUnit->setAlphaOperation(bmode.operation, bmode.source1, bmode.source2, bmode.alphaArg1, bmode.alphaArg2, bmode.factor);
1014 ogreTargetTextureUnit->setTextureFiltering(renderingTextureUnit->getTextureFiltering(Ogre::FT_MIN), renderingTextureUnit->getTextureFiltering(Ogre::FT_MAG), renderingTextureUnit->getTextureFiltering(Ogre::FT_MIP));
1016 ogreTargetTextureUnit->removeAllEffects();
1017 Ogre::TextureUnitState::EffectMap effects = renderingTextureUnit->getEffects();
1018 Ogre::TextureUnitState::EffectMap::const_iterator it;
1019 for (it = effects.begin(); it != effects.end(); it++)
1021 Ogre::TextureUnitState::TextureEffect effect = it->second;
1022 ogreTargetTextureUnit->addEffect(effect);
1025 if (!renderingTextureUnit->_getTexturePtr())
1026 ogreTargetTextureUnit->setBlank();
1028 ogreTargetTextureUnit->setTexture(renderingTextureUnit->_getTexturePtr());
1030 ApplyMaterialParameters(ogreTargetMaterialPass, ogreTargetTextureUnit);
1050 ogreOverlay->hide();
1054 ogre2dRect->setVisible(
false);
1058 if (ogreOriginalTextureUnit)
1060 Ogre::LayerBlendModeEx bmode = ogreOriginalTextureUnit->getAlphaBlendMode();
1061 ogreTargetTextureUnit->setAlphaOperation(bmode.operation, bmode.source1, bmode.source2, bmode.alphaArg1, bmode.alphaArg2, bmode.factor);
1062 ogreTargetTextureUnit->setTextureFiltering(ogreOriginalTextureUnit->getTextureFiltering(Ogre::FT_MIN), ogreOriginalTextureUnit->getTextureFiltering(Ogre::FT_MAG), ogreOriginalTextureUnit->getTextureFiltering(Ogre::FT_MIP));
1064 ogreTargetTextureUnit->removeAllEffects();
1065 Ogre::TextureUnitState::EffectMap effects = ogreOriginalTextureUnit->getEffects();
1066 Ogre::TextureUnitState::EffectMap::const_iterator it;
1067 for (it = effects.begin(); it != effects.end(); it++)
1069 Ogre::TextureUnitState::TextureEffect effect = it->second;
1070 ogreTargetTextureUnit->addEffect(effect);
1074 ogreTargetMaterialPass->setDepthWriteEnabled(matData.
oDepthWrite);
1078 if (!ogreOriginalTextureUnit->_getTexturePtr())
1079 ogreTargetTextureUnit->setBlank();
1081 ogreTargetTextureUnit->setTexture(ogreOriginalTextureUnit->_getTexturePtr());
1083 catch(Ogre::Exception &)
1085 ogreTargetTextureUnit->setTextureName(
"blackpix.jpg");
1102 if (enableTransparency != isTransparent)
1104 isTransparent = enableTransparency;
1107 if ((isOverlayed) || (is2DRect))
1109 ApplyMaterialParameters(ogreOverlayMaterial->getTechnique(0)->getPass(0), renderingTextureUnit);
1113 ApplyMaterialParameters(ogreTargetMaterialPass, ogreTargetTextureUnit);
1122 return isTransparent;
1127 keyboardEnable = enableKeyboardOnWidget;
1133 return keyboardEnable;
1138 mouseEnable = enableMouseOnWidget;
1149 std::string httpPrefix =
"http://";
1150 std::string httpsPrefix =
"https://";
1151 std::string ftpPrefix =
"ftp://";
1152 std::string filePrefix =
"file://";
1154 std::string urlString = url;
1155 boost::to_lower(urlString);
1158 if ((urlString.substr(0, httpPrefix.length()) != httpPrefix)
1159 && (urlString.substr(0, httpsPrefix.length()) != httpsPrefix)
1160 && (urlString.substr(0, ftpPrefix.length()) != ftpPrefix)
1161 && (urlString.substr(0, filePrefix.length()) != filePrefix))
1163 urlString = httpPrefix + url;
1175 transparentIgnorePixels = widgetIgnoreTransparentPixels;
1181 return transparentIgnorePixels;
1191 return updateOnFocusOnly;
1196 updateOnFocusOnly = activate;
1216 if (mStereoMode == state)
1219 mStereoMode = state;
1227 ogreOverlayPanel->setUV(0.0f, 0.0f, 1.0f, 1.0f);
1229 ogre2dRect->setDefaultUVs();
1242 ogreOverlayPanel->setUV(0.0f, 0.0f, 0.5f, 1.0f);
1244 ogreOverlayPanel->setUV(0.5f, 0.0f, 1.0f, 1.0f);
1249 ogre2dRect->setUVs(Ogre::Vector2(0.0f, 0.0f), Ogre::Vector2(0.0f, 1.0f), Ogre::Vector2(0.5f, 0.0f), Ogre::Vector2(0.5f, 1.0f));
1251 ogre2dRect->setUVs(Ogre::Vector2(0.5f, 0.0f), Ogre::Vector2(0.5f, 1.0f), Ogre::Vector2(1.0f, 0.0f), Ogre::Vector2(1.0f, 1.0f));
1259 ogreOverlayPanel->setUV(0.0f, 0.0f, 1.0f, 0.5f);
1261 ogreOverlayPanel->setUV(0.0f, 0.5f, 1.0f, 1.0f);
1266 ogre2dRect->setUVs(Ogre::Vector2(0.0f, 0.0f), Ogre::Vector2(0.0f, 0.5f), Ogre::Vector2(1.0f, 0.0f), Ogre::Vector2(1.0f, 0.5f));
1268 ogre2dRect->setUVs(Ogre::Vector2(0.0f, 0.5f), Ogre::Vector2(0.0f, 1.0f), Ogre::Vector2(1.0f, 0.5f), Ogre::Vector2(1.0f, 1.0f));
1276 ogreOverlayPanel->setUV(0.0f, 0.5f, 1.0f, 1.0f);
1278 ogreOverlayPanel->setUV(0.0f, 0.0f, 1.0f, 0.5f);
1283 ogre2dRect->setUVs(Ogre::Vector2(0.0f, 0.5f), Ogre::Vector2(0.0f, 1.0f), Ogre::Vector2(1.0f, 0.5f), Ogre::Vector2(1.0f, 1.0f));
1285 ogre2dRect->setUVs(Ogre::Vector2(0.0f, 0.0f), Ogre::Vector2(0.0f, 0.5f), Ogre::Vector2(1.0f, 0.0f), Ogre::Vector2(1.0f, 0.5f));
MMechostr(MSKDEBUG, " > Start loading Plugin SO3Engine dll\n")
SCOL_EXPORT int cbmachine w
void SetAssociatedWidget(SWidget *newAssociatedWidget)
void CleanUpGeneratedTechniques()
Ogre::MaterialPtr getOgreMaterialPointer()
bool GetRttPixelFormat(Ogre::PixelFormat &format, bool alpha=false, bool floattex=false)
Ogre::RenderSystem * GetOgreRenderSystem()
void RemoveGeneratedMaterial(Ogre::Material *mat)
static SRoot & getSingleton()
static SRoot * getSingletonPtr()
Ogre::SceneManager * GetOgreScenePointer()
Ogre::Viewport * GetOgreViewPortPointer()
unsigned int prevPOW2(unsigned int x)