So...tested with Catalyst 8.12 - didn't solve the problem.
Here are 2 images to show u what happens:
Example11:
Irrlicht-Log:
I'm using a ATI Radeon HD 4850 with Driver-Version 8.561.0.0.
Today i'll test it with Irrlicht 1.4.2 - but as far as i remember there was no error like this (started my project with 1.4).
Here's some source:
Code: Select all
/* <CMainMenu->Init()> */
void CMainMenu::Init( void )
{
// Lokale Variablen
string<c8> Buffer; // String-Puffer
string<c8> TexturePath; // Pfad zu den passenden Texturen
// Irrlicht-Pointer holen und speichern
m_IrrDevicePtr = CGameManager::GetIrrDevice();
m_IrrDriver = m_IrrDevicePtr->getVideoDriver();
m_IrrSceneManager = m_IrrDevicePtr->getSceneManager();
m_IrrGUIEnv = m_IrrDevicePtr->getGUIEnvironment();
m_IrrTimer = m_IrrDevicePtr->getTimer();
// CEGUI-Scheme laden
SchemeManager::getSingleton().loadScheme(MAINMENU_SCHEME);
// CEGUI-Root erstellen, Menülayout laden und dem Root zuweisen
m_MenuLayout = WindowManager::getSingleton().loadWindowLayout("MainMenu.layout");
CGameManager::GetCEGUISystem()->setGUISheet(m_MenuLayout);
// Aktuelle Gameconfig holen
m_GameConfig = CGameManager::GetInstance()->GetGameConfig();
// Bildschirmauflösung speichern
m_ScreenSize = m_IrrDriver->getScreenSize();
// Passenden Texturpfad setzen
TexturePath = GAME_TEXTURE_PATH;
switch (m_GameConfig->TextureQuality)
{
// Niedrige Texturauflösung
case TEXQUALITY_LOW:
{
TexturePath.append("Lowres/");
}
break;
// Mittlere Texturauflösung
case TEXQUALITY_MID:
{
TexturePath.append("Midres/");
}
break;
// Niedrige Texturauflösung
case TEXQUALITY_HIGH:
{
TexturePath.append("Hires/");
}
break;
}
// Immer 32-Bit-Texturen erstellen
m_IrrDriver->setTextureCreationFlag(ETCF_ALWAYS_32_BIT, true);
// Hintergrund-Textur laden
m_BackgroundTexture = m_IrrDriver->getTexture("data/textures/StarBackground1.png");
// Kamera erstellen
m_SceneCamera = m_IrrSceneManager->addCameraSceneNode();
m_SceneCamera->setAspectRatio((5.0f/4.0f));
m_SceneCamera->setFOV(PI/6);
// Prüfen, ob Bumpmapping eingestellt ist
if (m_GameConfig->BumpMapping)
{
// Ja: Bumpmappingunterstützung abfragen
IMaterialRenderer* renderer;
renderer = m_IrrDriver->getMaterialRenderer(EMT_NORMAL_MAP_SOLID);
if (renderer && renderer->getRenderCapability() == 0)
{
m_EarthMaterial = EMT_NORMAL_MAP_SOLID;
}
else
{
// Keine Bumpmap-Unterstützung
m_EarthMaterial = EMT_SOLID;
// Gameconfig aktualisieren
m_GameConfig->BumpMapping = false;
CGameManager::GetInstance()->SetGameConfig(m_GameConfig);
}
}
// Earth-Texturen laden
// Textur 1 - ColorMap | Textur 2 - HeightMap | Textur 3 - CloudMap
Buffer = TexturePath;
Buffer.append(MAINMENU_SPHERE_SURFACE);
m_EarthTexture[0] = m_IrrDriver->getTexture(Buffer.c_str());
Buffer = TexturePath;
// Heightmap nur laden, wenn Bumpmapping unterstützt wird
if (m_GameConfig->BumpMapping)
{
Buffer.append(MAINMENU_SPHERE_HEIGHT);
m_EarthTexture[1] = m_IrrDriver->getTexture(Buffer.c_str());
m_IrrDriver->makeNormalMapTexture(m_EarthTexture[1], 9.0f);
}
Buffer = TexturePath;
Buffer.append(MAINMENU_SPHERE_CLOUDS);
m_EarthTexture[2] = m_IrrDriver->getTexture(Buffer.c_str());
// Star Tycoon-Logo laden
m_LogoNode = m_IrrSceneManager->addMeshSceneNode(m_IrrSceneManager->getMesh("data/meshes/STLogo.b3d"));
m_LogoNode->setPosition(vector3df(0,2.25f,10.5f));
m_LogoNode->setMaterialType(EMT_SOLID);
m_LogoNode->setMaterialFlag(EMF_LIGHTING, false);
// Earth-Sphere laden und auf Position setzen
IAnimatedMesh* SphereMesh = m_IrrSceneManager->getMesh("data/meshes/sphere.b3d");
IMesh* TangentMesh = m_IrrSceneManager->getMeshManipulator()->createMeshWithTangents(SphereMesh);
m_EarthNode = m_IrrSceneManager->addMeshSceneNode(TangentMesh, 0, -1, vector3df(-1.5f,0,3.5f));
TangentMesh->drop();
// Texturen und Materialtyp für Earth setzen
m_EarthNode->setMaterialTexture(0, m_EarthTexture[0]);
if (m_GameConfig->BumpMapping)
{
m_EarthNode->setMaterialTexture(1, m_EarthTexture[1]);
}
m_EarthNode->setMaterialType(m_EarthMaterial);
m_EarthNode->setMaterialFlag(EMF_LIGHTING, true);
m_EarthNode->getMaterial(0).SpecularColor = SColor(0,0,0,0);
CGameManager::SetNodeTextureFilter(m_EarthNode);
// Erde rotieren lassen
ISceneNodeAnimator* anim = m_IrrSceneManager->createRotationAnimator(vector3df(0.0f,0.1f,0.0f));
m_EarthNode->addAnimator(anim);
anim->drop();
// Cloud-Sphere erstellen
m_CloudNode = m_IrrSceneManager->addSphereSceneNode(1.01f, 64, 0, -1,vector3df(-1.5f, 0, 3.5f));
m_CloudNode->setMaterialTexture(0, m_EarthTexture[2]);
m_CloudNode->setMaterialType(EMT_TRANSPARENT_ADD_COLOR);
CGameManager::SetNodeTextureFilter(m_CloudNode);
m_CloudNode->setMaterialFlag(EMF_LIGHTING, false);
// Clouds rotieren lassen
anim = m_IrrSceneManager->createRotationAnimator(vector3df(0.0f,0.05f,0.0f));
m_CloudNode->addAnimator(anim);
anim->drop();
// Lichter erstellen
m_IrrSceneManager->addLightSceneNode(0, vector3df(50.0f,0.0f,7.0f), SColorf(0.5f,0.5f,0.5f,0.5f), 100.0f);
m_IrrSceneManager->addLightSceneNode(0, vector3df(50.0f,0.0f,0.0f), SColorf(0.5f,0.5f,0.5f,0.5f), 100.0f);
return;
}
/* </CMainMenu->Init()> */
/* <CMainMenu->Cleanup()> */
void CMainMenu::Cleanup( void )
{
// Alle Scene-Objekte freigeben
m_IrrSceneManager->clear();
// Alle Texturen freigeben
m_IrrDriver->removeAllTextures();
// Scheme wieder freigeben
SchemeManager::getSingleton().unloadAllSchemes();
return;
}
/* </CMainMenu->Cleanup()> */
/* <CMainMenu->Update()> */
void CMainMenu::Update( void )
{
return;
}
/* </CMainMenu->Update()> */
/* <CMainMenu->Draw()> */
void CMainMenu::Draw( void )
{
// Ist das Spiel aktiv?
if (CGameManager::GetInstance()->IsActive())
{
// Ja: Bildschirm schwarz löschen und alles rendern
m_IrrDriver->beginScene(true, true, SColor(255,0,0,0));
m_IrrDriver->draw2DImage( m_BackgroundTexture, rect<s32>(0,0,m_ScreenSize.Width-1, m_ScreenSize.Height-1),
rect<s32>(0,0,1023,1023) );
m_IrrSceneManager->drawAll();
CEGUI::System::getSingleton().renderGUI();
m_IrrDriver->endScene();
}
return;
}
/* </CMainMenu->Draw()> */
Probably there's a bug in 1.5-OpenGL-Driver? Was there made any changes to the driver?