From: <au...@us...> - 2009-12-30 21:07:45
|
Revision: 4377 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4377&view=rev Author: auria Date: 2009-12-30 21:07:38 +0000 (Wed, 30 Dec 2009) Log Message: ----------- Fixed hiding cursor (responsible was copy and paste) Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2009-12-30 20:59:56 UTC (rev 4376) +++ main/trunk/src/graphics/irr_driver.cpp 2009-12-30 21:07:38 UTC (rev 4377) @@ -232,7 +232,7 @@ //----------------------------------------------------------------------------- void IrrDriver::hidePointer() { - this->getDevice()->getCursorControl()->setVisible(true); + this->getDevice()->getCursorControl()->setVisible(false); } // hidePointer //----------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-01-02 16:29:01
|
Revision: 4384 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4384&view=rev Author: auria Date: 2010-01-02 16:28:55 +0000 (Sat, 02 Jan 2010) Log Message: ----------- Gracefully exit when closing window Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-01-02 02:11:15 UTC (rev 4383) +++ main/trunk/src/graphics/irr_driver.cpp 2010-01-02 16:28:55 UTC (rev 4384) @@ -33,14 +33,15 @@ #include "guiengine/engine.hpp" #include "guiengine/modaldialog.hpp" #include "guiengine/screen.hpp" -#include "states_screens/state_manager.hpp" #include "io/file_manager.hpp" #include "items/item_manager.hpp" #include "items/powerup_manager.hpp" #include "items/attachment_manager.hpp" #include "items/projectile_manager.hpp" #include "karts/kart_properties_manager.hpp" +#include "main_loop.hpp" #include "modes/world.hpp" +#include "states_screens/state_manager.hpp" #include "utils/constants.hpp" using namespace irr::core; @@ -687,7 +688,10 @@ */ void IrrDriver::update(float dt) { - if(!m_device->run()) return; + if (!m_device->run()) + { + main_loop->abort(); + } m_device->getVideoDriver()->beginScene(false, true, video::SColor(255,100,101,140)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-01-07 23:05:10
|
Revision: 4407 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4407&view=rev Author: auria Date: 2010-01-07 23:04:59 +0000 (Thu, 07 Jan 2010) Log Message: ----------- Use texture clamping to enhance GUI look Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-01-07 22:55:38 UTC (rev 4406) +++ main/trunk/src/graphics/irr_driver.cpp 2010-01-07 23:04:59 UTC (rev 4407) @@ -177,7 +177,13 @@ #if (IRRLICHT_VERSION_MAJOR == 1) && (IRRLICHT_VERSION_MINOR >= 7) video::SMaterial& material2D = m_video_driver->getMaterial2D(); - material2D.TextureLayer[0].BilinearFilter=true; + for (int n=0; n<MATERIAL_MAX_TEXTURES; n++) + { + material2D.TextureLayer[n].BilinearFilter = true; + //material2D.TextureLayer[n].TextureWrap = ETC_CLAMP_TO_EDGE; + material2D.TextureLayer[n].TextureWrapU = ETC_CLAMP_TO_EDGE; + material2D.TextureLayer[n].TextureWrapV = ETC_CLAMP_TO_EDGE; + } material2D.AntiAliasing=video::EAAM_FULL_BASIC; //m_video_driver->enableMaterial2D(); #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-01-07 23:05:52
|
Revision: 4408 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4408&view=rev Author: auria Date: 2010-01-07 23:05:43 +0000 (Thu, 07 Jan 2010) Log Message: ----------- Fixed compile warning Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-01-07 23:04:59 UTC (rev 4407) +++ main/trunk/src/graphics/irr_driver.cpp 2010-01-07 23:05:43 UTC (rev 4408) @@ -177,7 +177,7 @@ #if (IRRLICHT_VERSION_MAJOR == 1) && (IRRLICHT_VERSION_MINOR >= 7) video::SMaterial& material2D = m_video_driver->getMaterial2D(); - for (int n=0; n<MATERIAL_MAX_TEXTURES; n++) + for (unsigned int n=0; n<MATERIAL_MAX_TEXTURES; n++) { material2D.TextureLayer[n].BilinearFilter = true; //material2D.TextureLayer[n].TextureWrap = ETC_CLAMP_TO_EDGE; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-01-28 11:54:10
|
Revision: 4551 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4551&view=rev Author: hikerstk Date: 2010-01-28 11:54:01 +0000 (Thu, 28 Jan 2010) Log Message: ----------- Missing file in previous commit. Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-01-28 11:50:47 UTC (rev 4550) +++ main/trunk/src/graphics/irr_driver.cpp 2010-01-28 11:54:01 UTC (rev 4551) @@ -293,6 +293,27 @@ } // changeResolution // ---------------------------------------------------------------------------- +/** Prints statistics about rendering, e.g. number of drawn and culled + * triangles etc. Note that printing this information will also slow + * down STK. + */ +void IrrDriver::printRenderStats() +{ + io::IAttributes * attr = m_scene_manager->getParameters(); + printf("[%ls], FPS:%03d Tri:%.03fm Cull %d/%d nodes (%d,%d,%d)\n, + m_video_driver->getName(), + m_video_driver->getFPS (), + (f32) m_video_driver->getPrimitiveCountDrawn( 0 ) * ( 1.f / 1000000.f ), + attr->getAttributeAsInt ( "culled" ), + attr->getAttributeAsInt ( "calls" ), + attr->getAttributeAsInt ( "drawn_solid" ), + attr->getAttributeAsInt ( "drawn_transparent" ), + attr->getAttributeAsInt ( "drawn_transparent_effect" ) + ); + +} // printRenderStats + +// ---------------------------------------------------------------------------- /** Loads an animated mesh and returns a pointer to it. * \param filename File to load. */ @@ -780,7 +801,9 @@ } // just to makr the begin/end scene block m_device->getVideoDriver()->endScene(); - + // Enable this next print statement to get render information printed + // E.g. number of triangles rendered, culled etc. + //printRenderStats(); } // update // ---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-01-28 12:01:35
|
Revision: 4552 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4552&view=rev Author: hikerstk Date: 2010-01-28 12:01:28 +0000 (Thu, 28 Jan 2010) Log Message: ----------- Fixedc typo in previous commits. Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-01-28 11:54:01 UTC (rev 4551) +++ main/trunk/src/graphics/irr_driver.cpp 2010-01-28 12:01:28 UTC (rev 4552) @@ -300,7 +300,7 @@ void IrrDriver::printRenderStats() { io::IAttributes * attr = m_scene_manager->getParameters(); - printf("[%ls], FPS:%03d Tri:%.03fm Cull %d/%d nodes (%d,%d,%d)\n, + printf("[%ls], FPS:%03d Tri:%.03fm Cull %d/%d nodes (%d,%d,%d)\n", m_video_driver->getName(), m_video_driver->getFPS (), (f32) m_video_driver->getPrimitiveCountDrawn( 0 ) * ( 1.f / 1000000.f ), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mbj...@us...> - 2010-01-29 01:13:56
|
Revision: 4554 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4554&view=rev Author: mbjornstk Date: 2010-01-29 00:38:40 +0000 (Fri, 29 Jan 2010) Log Message: ----------- Ignore FPS values at start, too many times they are misleading. Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-01-29 00:19:17 UTC (rev 4553) +++ main/trunk/src/graphics/irr_driver.cpp 2010-01-29 00:38:40 UTC (rev 4554) @@ -707,6 +707,16 @@ gui::IGUIFont* font = GUIEngine::getFont(); const int fps = m_device->getVideoDriver()->getFPS(); + // We will let pass some time to let things settle before trusting FPS counter + // even if we also ignore fps = 1 which tends to happen in first checks +#define NOTRUST 20 + static int notrust = NOTRUST; + + if(notrust) { + notrust--; + return; + } + // Min and max info tracking, per mode, so user can check game vs menus bool current_state = StateManager::get()->getGameState() == GUIEngine::GAME; static bool prev_state = false; @@ -718,10 +728,11 @@ { min = 999; max = 0; + notrust = NOTRUST; prev_state = current_state; } - if (min > fps && fps > 1) min = fps; // Start moments always give useless 1 + if (min > fps && fps > 1) min = fps; // Start moments sometimes give useless 1 if (max < fps) max = fps; static char buffer[32]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mbj...@us...> - 2010-01-29 02:04:13
|
Revision: 4555 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4555&view=rev Author: mbjornstk Date: 2010-01-29 02:03:45 +0000 (Fri, 29 Jan 2010) Log Message: ----------- Better var names and make obvious that until counter expires FPS will not show. Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-01-29 00:38:40 UTC (rev 4554) +++ main/trunk/src/graphics/irr_driver.cpp 2010-01-29 02:03:45 UTC (rev 4555) @@ -704,19 +704,19 @@ */ void IrrDriver::displayFPS() { - gui::IGUIFont* font = GUIEngine::getFont(); - const int fps = m_device->getVideoDriver()->getFPS(); - // We will let pass some time to let things settle before trusting FPS counter - // even if we also ignore fps = 1 which tends to happen in first checks -#define NOTRUST 20 - static int notrust = NOTRUST; + // even if we also ignore fps = 1, which tends to happen in first checks +#define NO_TRUST_COUNT 25 + static int no_trust = NO_TRUST_COUNT; - if(notrust) { - notrust--; + if(no_trust) { + no_trust--; return; } + gui::IGUIFont* font = GUIEngine::getFont(); + const int fps = m_device->getVideoDriver()->getFPS(); + // Min and max info tracking, per mode, so user can check game vs menus bool current_state = StateManager::get()->getGameState() == GUIEngine::GAME; static bool prev_state = false; @@ -728,7 +728,7 @@ { min = 999; max = 0; - notrust = NOTRUST; + no_trust = NO_TRUST_COUNT; prev_state = current_state; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-01-31 23:08:31
|
Revision: 4593 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4593&view=rev Author: hikerstk Date: 2010-01-31 23:08:23 +0000 (Sun, 31 Jan 2010) Log Message: ----------- Fixed bullet debug view. Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-01-31 21:27:50 UTC (rev 4592) +++ main/trunk/src/graphics/irr_driver.cpp 2010-01-31 23:08:23 UTC (rev 4593) @@ -767,9 +767,14 @@ main_loop->abort(); } - m_device->getVideoDriver()->beginScene(false, true, video::SColor(255,100,101,140)); + const bool inRace = race_manager->raceIsActive(); + // With bullet debug view we have to clear the back buffer, but + // that's not necessary for non-debug + bool back_buffer_clear = inRace && UserConfigParams::m_bullet_debug; + m_device->getVideoDriver()->beginScene(back_buffer_clear, + true, video::SColor(255,100,101,140)); - { // Just to mark the beding/end scene block + { // Just to mark the begin/end scene block GUIEngine::GameState state = StateManager::get()->getGameState(); if (state != GUIEngine::GAME) { @@ -782,10 +787,9 @@ } } - const bool inRace = race_manager->raceIsActive(); if (inRace) { - if (UserConfigParams::m_bullet_debug) + if (UserConfigParams::m_bullet_debug) { renderBulletDebugView(); } @@ -816,13 +820,18 @@ m_scene_manager->drawAll(); } - // Either render the gui, or the global elements of the race gui. - GUIEngine::render(dt); + // The render and displayFPS calls interfere with bullet debug + // rendering, so they can not be called. + if(!inRace || !UserConfigParams::m_bullet_debug) + { + // Either render the gui, or the global elements of the race gui. + GUIEngine::render(dt); - // draw FPS if enabled - if ( UserConfigParams::m_display_fps ) displayFPS(); + // draw FPS if enabled + if ( UserConfigParams::m_display_fps ) displayFPS(); + } - } // just to makr the begin/end scene block + } // just to mark the begin/end scene block m_device->getVideoDriver()->endScene(); // Enable this next print statement to get render information printed // E.g. number of triangles rendered, culled etc. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-03-05 23:42:50
|
Revision: 4939 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=4939&view=rev Author: auria Date: 2010-03-05 23:42:44 +0000 (Fri, 05 Mar 2010) Log Message: ----------- Fixed track screenshot being flipped when coming out of chest Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-03-05 23:38:27 UTC (rev 4938) +++ main/trunk/src/graphics/irr_driver.cpp 2010-03-05 23:42:44 UTC (rev 4939) @@ -530,22 +530,22 @@ video::S3DVertex v1; v1.Pos = core::vector3df(-w_2,-h_2,0); v1.Normal = core::vector3df(0, 0, -1.0f); - v1.TCoords = core::vector2d<f32>(0,1); + v1.TCoords = core::vector2d<f32>(1,1); video::S3DVertex v2; v2.Pos = core::vector3df(w_2,-h_2,0); v2.Normal = core::vector3df(0, 0, -1.0f); - v2.TCoords = core::vector2d<f32>(1,1); + v2.TCoords = core::vector2d<f32>(0,1); video::S3DVertex v3; v3.Pos = core::vector3df(w_2,h_2,0); v3.Normal = core::vector3df(0, 0, -1.0f); - v3.TCoords = core::vector2d<f32>(1,0); + v3.TCoords = core::vector2d<f32>(0,0); video::S3DVertex v4; v4.Pos = core::vector3df(-w_2,h_2,0); v4.Normal = core::vector3df(0, 0, -1.0f); - v4.TCoords = core::vector2d<f32>(0,0); + v4.TCoords = core::vector2d<f32>(1,0); // Add the vertices This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mbj...@us...> - 2010-03-25 00:03:45
|
Revision: 5066 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5066&view=rev Author: mbjornstk Date: 2010-03-25 00:03:37 +0000 (Thu, 25 Mar 2010) Log Message: ----------- Add triangle count (in thousands) to the on screen FPS reporting. Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-03-25 00:01:29 UTC (rev 5065) +++ main/trunk/src/graphics/irr_driver.cpp 2010-03-25 00:03:37 UTC (rev 5066) @@ -720,8 +720,10 @@ return; } + // Ask for current frames per second and last number of triangles processed (trimed to thousands) gui::IGUIFont* font = GUIEngine::getFont(); const int fps = m_device->getVideoDriver()->getFPS(); + const int kilotris = m_device->getVideoDriver()->getPrimitiveCountDrawn(0) * (1.f / 1000.f); // Min and max info tracking, per mode, so user can check game vs menus bool current_state = StateManager::get()->getGameState() == GUIEngine::GAME; @@ -742,7 +744,7 @@ if (max < fps) max = fps; static char buffer[32]; - sprintf(buffer, "FPS : %i/%i/%i", min, fps, max); + sprintf(buffer, "FPS: %i/%i/%i - %i KTris", min, fps, max, kilotris); core::stringw fpsString = buffer; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-03-25 05:19:08
|
Revision: 5069 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5069&view=rev Author: hikerstk Date: 2010-03-25 05:19:00 +0000 (Thu, 25 Mar 2010) Log Message: ----------- Fixed compiler warning. Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-03-25 01:05:08 UTC (rev 5068) +++ main/trunk/src/graphics/irr_driver.cpp 2010-03-25 05:19:00 UTC (rev 5069) @@ -723,7 +723,8 @@ // Ask for current frames per second and last number of triangles processed (trimed to thousands) gui::IGUIFont* font = GUIEngine::getFont(); const int fps = m_device->getVideoDriver()->getFPS(); - const int kilotris = m_device->getVideoDriver()->getPrimitiveCountDrawn(0) * (1.f / 1000.f); + const int kilotris = (int)(m_device->getVideoDriver()->getPrimitiveCountDrawn(0) + * (1.f / 1000.f) ); // Min and max info tracking, per mode, so user can check game vs menus bool current_state = StateManager::get()->getGameState() == GUIEngine::GAME; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-03-31 23:54:26
|
Revision: 5108 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5108&view=rev Author: auria Date: 2010-03-31 23:54:18 +0000 (Wed, 31 Mar 2010) Log Message: ----------- Minor change to resolution switch code, so that my work around what seems a bug in the mac version of irrlicht doesn't introduce issues where this bug doesn't manifest Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-03-31 23:49:42 UTC (rev 5107) +++ main/trunk/src/graphics/irr_driver.cpp 2010-03-31 23:54:18 UTC (rev 5108) @@ -765,6 +765,11 @@ if (m_res_switching) m_res_switching = false; else main_loop->abort(); } + else if (m_res_switching) + { + m_res_switching = false; + } + World *world = World::getWorld(); const bool inRace = world!=NULL; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-04-15 23:54:24
|
Revision: 5201 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5201&view=rev Author: hikerstk Date: 2010-04-15 23:54:18 +0000 (Thu, 15 Apr 2010) Log Message: ----------- Removed unsupported texture warning. Feel free to change the type to a more appropriate type if necessary. Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-04-15 23:53:31 UTC (rev 5200) +++ main/trunk/src/graphics/irr_driver.cpp 2010-04-15 23:54:18 UTC (rev 5201) @@ -909,7 +909,8 @@ m_video_driver = irr_driver->getVideoDriver(); m_render_target_texture = m_video_driver->addRenderTargetTexture(dimension, - name.c_str()); + name.c_str(), + video::ECF_A8R8G8B8); m_video_driver->setRenderTarget(m_render_target_texture); m_rtt_main_node = NULL; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-04-22 13:19:30
|
Revision: 5238 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5238&view=rev Author: hikerstk Date: 2010-04-22 13:19:24 +0000 (Thu, 22 Apr 2010) Log Message: ----------- Added better debug output for missing textures. Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-04-22 13:18:11 UTC (rev 5237) +++ main/trunk/src/graphics/irr_driver.cpp 2010-04-22 13:19:24 UTC (rev 5238) @@ -688,6 +688,7 @@ #ifndef NDEBUG if (out == NULL) { + printf("Texture '%s' not found.\n", filename.c_str()); printf("Put a breakpoint at line %s:%i to debug!\n", __FILE__, __LINE__ ); } #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-05-11 12:49:39
|
Revision: 5429 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5429&view=rev Author: hikerstk Date: 2010-05-11 12:49:32 +0000 (Tue, 11 May 2010) Log Message: ----------- Some bugfixes to resolution changing. Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-05-11 01:15:43 UTC (rev 5428) +++ main/trunk/src/graphics/irr_driver.cpp 2010-05-11 12:49:32 UTC (rev 5429) @@ -327,9 +327,19 @@ material_manager->reInit(); - powerup_manager -> loadAllPowerups(); + file_manager->pushTextureSearchPath(file_manager->getModelFile("")); + const std::string materials_file = file_manager->getModelFile("materials.xml"); + if(materials_file!="") + material_manager->pushTempMaterial(materials_file); + { + powerup_manager -> loadAllPowerups (); + item_manager -> loadDefaultItems(); + } + if(materials_file!="") + material_manager->popTempMaterial(); + file_manager->popTextureSearchPath(); + kart_properties_manager -> loadAllKarts(); - item_manager -> loadDefaultItems(); projectile_manager -> loadData(); attachment_manager -> loadModels(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-07-17 15:18:31
|
Revision: 5684 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5684&view=rev Author: auria Date: 2010-07-17 15:18:23 +0000 (Sat, 17 Jul 2010) Log Message: ----------- Explicitely tell irrlicht that we do not support resizing the frame Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-07-16 22:48:31 UTC (rev 5683) +++ main/trunk/src/graphics/irr_driver.cpp 2010-07-17 15:18:23 UTC (rev 5684) @@ -161,8 +161,9 @@ fprintf(stderr, "Couldn't initialise irrlicht device. Quitting.\n"); exit(-1); } - - + + m_device->setResizable(false); + // Stores the new file system pointer. file_manager->setDevice(m_device); m_device->setWindowCaption(L"SuperTuxKart"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-08-10 01:15:59
|
Revision: 5734 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=5734&view=rev Author: hikerstk Date: 2010-08-10 01:15:53 +0000 (Tue, 10 Aug 2010) Log Message: ----------- Fixed rare bug in which stk aborts (because it receives a WM_QUIT message) immediately after start (after closing the null device and opening the actual screen). Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-08-10 00:25:38 UTC (rev 5733) +++ main/trunk/src/graphics/irr_driver.cpp 2010-08-10 01:15:53 UTC (rev 5734) @@ -106,7 +106,16 @@ } //std::cout << "^^^^^^^^ Closing m_device ^^^^^^^^\n"; m_device->closeDevice(); - + // In some circumstances it would happen that a WM_QUIT message + // (apparently sent for this NULL device) is later received by + // the actual window, causing it to immediately quit. + // Following advise on the irrlicht forums I added the following + // two calles - the first one didn't make a difference (but + // certainly can't hurt), but the second one apparenlty solved + // the problem for now. + m_device->clearSystemMessages(); + m_device->run(); + firstTime = false; } // end if firstTime This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-10-31 15:26:31
|
Revision: 6372 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=6372&view=rev Author: auria Date: 2010-10-31 15:26:25 +0000 (Sun, 31 Oct 2010) Log Message: ----------- Yet improve handling of bad resolutions in config file Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-10-29 17:10:12 UTC (rev 6371) +++ main/trunk/src/graphics/irr_driver.cpp 2010-10-31 15:26:25 UTC (rev 6372) @@ -166,8 +166,31 @@ } // for bits=24, 16 if(m_device) break; } // for edt_types + + // if still no device, try with a standard 800x600 window size, maybe + // size is the problem if(!m_device) { + UserConfigParams::m_width = 800; + UserConfigParams::m_height = 600; + + m_device = createDevice(video::EDT_OPENGL, + core::dimension2d<u32>(UserConfigParams::m_width, + UserConfigParams::m_height ), + 32, //bits per pixel + UserConfigParams::m_fullscreen, + false, // stencil buffers + false, // vsync + this // event receiver + ); + if (m_device) + { + fprintf(stderr, "An invalid resolution was set in the config file, reverting to saner values\n"); + } + } + + if(!m_device) + { fprintf(stderr, "Couldn't initialise irrlicht device. Quitting.\n"); exit(-1); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2010-11-23 00:14:20
|
Revision: 6697 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=6697&view=rev Author: hikerstk Date: 2010-11-23 00:14:13 +0000 (Tue, 23 Nov 2010) Log Message: ----------- Added calls when switching resolutions (based on http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=39342&highlight=fullscreen run() needs to be called). Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-11-22 20:48:59 UTC (rev 6696) +++ main/trunk/src/graphics/irr_driver.cpp 2010-11-23 00:14:13 UTC (rev 6697) @@ -347,6 +347,8 @@ //std::cout << "^^^^^^^^ Closing m_device ^^^^^^^^\n"; m_device->closeDevice(); + m_device->clearSystemMessages(); + m_device->run(); //std::cout << "^^^^^^^^ Dropping m_device ^^^^^^^^\n"; m_device->drop(); m_device = NULL; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-12-08 23:42:16
|
Revision: 6905 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=6905&view=rev Author: auria Date: 2010-12-08 23:42:10 +0000 (Wed, 08 Dec 2010) Log Message: ----------- Fixed gamepad input after changing resolutions Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-12-08 23:41:56 UTC (rev 6904) +++ main/trunk/src/graphics/irr_driver.cpp 2010-12-08 23:42:10 UTC (rev 6905) @@ -345,6 +345,7 @@ item_manager -> removeTextures(); kart_properties_manager -> unloadAllKarts(); powerup_manager -> unloadPowerups(); + delete input_manager; GUIEngine::clear(); GUIEngine::cleanUp(); @@ -371,8 +372,11 @@ // Re-init GUI engine GUIEngine::init(m_device, m_video_driver, StateManager::get()); - + material_manager->reInit(); + input_manager = new InputManager (); + input_manager->setMode(InputManager::MENU); + GUIEngine::addLoadingIcon( irr_driver->getTexture(file_manager->getGUIDir() + "/options_video.png") ); file_manager->pushTextureSearchPath(file_manager->getModelFile("")); @@ -398,7 +402,7 @@ attachment_manager -> loadModels(); GUIEngine::addLoadingIcon( irr_driver->getTexture(file_manager->getGUIDir() + "/banana.png") ); - + GUIEngine::reshowCurrentScreen(); } // changeResolution This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <au...@us...> - 2010-12-21 21:30:34
|
Revision: 7133 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=7133&view=rev Author: auria Date: 2010-12-21 21:30:28 +0000 (Tue, 21 Dec 2010) Log Message: ----------- Fix typo Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2010-12-21 20:21:06 UTC (rev 7132) +++ main/trunk/src/graphics/irr_driver.cpp 2010-12-21 21:30:28 UTC (rev 7133) @@ -147,7 +147,7 @@ // Try 32 and, upon failure, 24 then 16 bit per pixels for (int bits=32; bits>15; bits -=8) { - std::cout << "[IrrDriver] Tring to create device with " << bits << " bits\n"; + std::cout << "[IrrDriver] Trying to create device with " << bits << " bits\n"; m_device = createDevice(type, core::dimension2d<u32>(UserConfigParams::m_width, UserConfigParams::m_height ), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mbj...@us...> - 2011-01-26 22:45:14
|
Revision: 7549 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=7549&view=rev Author: mbjornstk Date: 2011-01-26 22:45:08 +0000 (Wed, 26 Jan 2011) Log Message: ----------- Increase ignored FPS reports, otherwise minFPS is useless in slow computers. What matters is the min and max FPS while gaming, start up is not so important. Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2011-01-26 10:57:55 UTC (rev 7548) +++ main/trunk/src/graphics/irr_driver.cpp 2011-01-26 22:45:08 UTC (rev 7549) @@ -786,7 +786,7 @@ { // We will let pass some time to let things settle before trusting FPS counter // even if we also ignore fps = 1, which tends to happen in first checks - const int NO_TRUST_COUNT = 25; + const int NO_TRUST_COUNT = 200; static int no_trust = NO_TRUST_COUNT; if (no_trust) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mbj...@us...> - 2011-02-09 01:38:33
|
Revision: 7661 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=7661&view=rev Author: mbjornstk Date: 2011-02-09 01:38:27 +0000 (Wed, 09 Feb 2011) Log Message: ----------- Add premultiply (tested) and de-premultiply (untested) code in texture loader. All disabled and requiring integration with a setting in materials.xml (rgba-transform, eg). Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2011-02-09 00:51:17 UTC (rev 7660) +++ main/trunk/src/graphics/irr_driver.cpp 2011-02-09 01:38:27 UTC (rev 7661) @@ -756,7 +756,65 @@ */ video::ITexture *IrrDriver::getTexture(const std::string &filename) { +#undef PREMULPNGS +#ifndef PREMULPNGS video::ITexture* out = m_scene_manager->getVideoDriver()->getTexture(filename.c_str()); +#else + video::IImage* img = m_scene_manager->getVideoDriver()->createImageFromFile(filename.c_str()); + // PNGs are non premul, but some are used for premul tasks, so convert + // http://home.comcast.net/~tom_forsyth/blog.wiki.html#[[Premultiplied%20alpha]] + if(StringUtils::hasSuffix(filename.c_str(), ".png")) // FIXME check param, not name + { + if ((img->getColorFormat() == irr::video::ECF_A8R8G8B8) && img->lock()) + { + core::dimension2d<u32> dim = img->getDimension(); + for(uint x = 0; x < dim.Width; x++) + { + for(uint y = 0; y < dim.Height; y++) + { + video::SColor col = img->getPixel(x, y); + uint alpha = col.getAlpha(); + uint red = alpha * col.getRed() / 255; + uint blue = alpha * col.getBlue() / 255; + uint green = alpha * col.getGreen() / 255; + col.set(alpha, red, green, blue); + img->setPixel(x, y, col, false); + } + } + img->unlock(); + } + } + /* + // Other formats can be premul, but the tasks can be non premul + // So divide to get the separate RGBA (only possible if alpha!=0) + else if() // FIXME, use param "DE-PREMUL requested" to match above + { + if ((img->getColorFormat() == irr::video::ECF_A8R8G8B8) && img->lock()) + { + core::dimension2d<u32> dim = img->getDimension(); + for(uint x = 0; x < dim.Width; x++) + { + for(uint y = 0; y < dim.Height; y++) + { + video::SColor col = img->getPixel(x, y); + uint alpha = col.getAlpha(); + // Avoid divide by zero + if (alpha) { + uint red = 255 * col.getRed() / alpha ; + uint blue = 255 * col.getBlue() / alpha; + uint green = 255 * col.getGreen() / alpha; + col.set(alpha, red, green, blue); + img->setPixel(x, y, col, false); + } + } + } + img->unlock(); + } + } + */ + video::ITexture* out = m_scene_manager->getVideoDriver()->addTexture(filename.c_str(), + img, NULL); +#endif #ifndef NDEBUG if (out == NULL) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hik...@us...> - 2011-03-16 21:04:32
|
Revision: 7953 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=7953&view=rev Author: hikerstk Date: 2011-03-16 21:04:26 +0000 (Wed, 16 Mar 2011) Log Message: ----------- Used proper base class for setAllMaterialFlags. Modified Paths: -------------- main/trunk/src/graphics/irr_driver.cpp Modified: main/trunk/src/graphics/irr_driver.cpp =================================================================== --- main/trunk/src/graphics/irr_driver.cpp 2011-03-16 21:03:23 UTC (rev 7952) +++ main/trunk/src/graphics/irr_driver.cpp 2011-03-16 21:04:26 UTC (rev 7953) @@ -478,7 +478,7 @@ * material_manager. * \param mesh The mesh to change the settings in. */ -void IrrDriver::setAllMaterialFlags(scene::IAnimatedMesh *mesh) const +void IrrDriver::setAllMaterialFlags(scene::IMesh *mesh) const { unsigned int n=mesh->getMeshBufferCount(); for(unsigned int i=0; i<n; i++) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |