Fixed various compiler warnings.
This commit is contained in:
parent
64702d8ada
commit
e18c20db65
@ -367,7 +367,6 @@ void FrameBuffer::Bind()
|
||||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
|
||||
glViewport(0, 0, width, height);
|
||||
irr::video::COpenGLDriver *gl_driver = (irr::video::COpenGLDriver*)irr_driver->getDevice()->getVideoDriver();
|
||||
GLenum bufs[] = { GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1, GL_COLOR_ATTACHMENT2 };
|
||||
glDrawBuffers(RenderTargets.size(), bufs);
|
||||
}
|
||||
@ -1126,4 +1125,4 @@ else \
|
||||
#endif // SDL_VIDEO_DRIVER_X11
|
||||
|
||||
#endif // ifdef XX
|
||||
} // getGLLimits
|
||||
} // getGLLimits
|
||||
|
@ -144,7 +144,7 @@ void LODNode::updateVisibility(bool* shown)
|
||||
if (!isVisible()) return;
|
||||
if (m_nodes.size() == 0) return;
|
||||
|
||||
int level = getLevel();
|
||||
unsigned int level = getLevel();
|
||||
for (size_t i = 0; i < m_nodes.size(); i++)
|
||||
{
|
||||
m_nodes[i]->setVisible(i == level);
|
||||
@ -165,7 +165,6 @@ void LODNode::OnRegisterSceneNode()
|
||||
m_nodes[0]->getType() == scene::ESNT_ANIMATED_MESH) &&
|
||||
now > m_last_tick)
|
||||
{
|
||||
int level = getLevel();
|
||||
if (m_previous_visibility == WAS_HIDDEN && shown)
|
||||
{
|
||||
scene::IMesh* mesh;
|
||||
|
@ -35,7 +35,6 @@
|
||||
/**
|
||||
\page render_geometry Geometry Rendering Overview
|
||||
|
||||
/**
|
||||
\section adding_material Adding a solid material
|
||||
|
||||
You need to consider twice before adding a new material : in the worst case a material requires 8 shaders :
|
||||
|
@ -119,7 +119,6 @@ static void getYml(GLenum face, size_t width, size_t height,
|
||||
static float getTexelValue(unsigned i, unsigned j, size_t width, size_t height, float *Coeff, float *Y00, float *Y1minus1, float *Y10, float *Y11,
|
||||
float *Y2minus2, float * Y2minus1, float * Y20, float *Y21, float *Y22)
|
||||
{
|
||||
float d = sqrt((float)(i * i + j * j + 1));
|
||||
float solidangle = 1.;
|
||||
size_t idx = i * height + j;
|
||||
float reconstructedVal = Y00[idx] * Coeff[0];
|
||||
|
@ -169,7 +169,6 @@ void STKMeshSceneNode::updateGL()
|
||||
|
||||
irr::video::IVideoDriver* driver = irr_driver->getVideoDriver();
|
||||
video::E_MATERIAL_TYPE type = mb->getMaterial().MaterialType;
|
||||
f32 MaterialTypeParam = mb->getMaterial().MaterialTypeParam;
|
||||
video::IMaterialRenderer* rnd = driver->getMaterialRenderer(type);
|
||||
|
||||
|
||||
|
@ -122,6 +122,7 @@ void VAOManager::regenerateVAO(enum VTXTYPE tp)
|
||||
glBindBuffer(GL_ARRAY_BUFFER, vbo[tp]);
|
||||
switch (tp)
|
||||
{
|
||||
case VTXTYPE_COUNT: break; // avoid compiler warning
|
||||
case VTXTYPE_STANDARD:
|
||||
// Position
|
||||
glEnableVertexAttribArray(0);
|
||||
|
@ -575,7 +575,6 @@ void ScalableFont::doDraw(const core::stringw& text,
|
||||
fallback_positions = NULL;
|
||||
}
|
||||
|
||||
video::IVideoDriver* driver = GUIEngine::getDriver();
|
||||
const int spriteAmount = sprites.size();
|
||||
for (int n=0; n<indiceAmount; n++)
|
||||
{
|
||||
@ -707,6 +706,7 @@ void ScalableFont::doDraw(const core::stringw& text,
|
||||
color, true);
|
||||
}
|
||||
#ifdef FONT_DEBUG
|
||||
video::IVideoDriver* driver = GUIEngine::getDriver();
|
||||
driver->draw2DLine(core::position2d<s32>(dest.UpperLeftCorner.X, dest.UpperLeftCorner.Y),
|
||||
core::position2d<s32>(dest.UpperLeftCorner.X, dest.LowerRightCorner.Y),
|
||||
video::SColor(255, 255,0,0));
|
||||
|
@ -194,9 +194,7 @@ void EndController::update(float dt)
|
||||
}
|
||||
/*Get information that is needed by more than 1 of the handling funcs*/
|
||||
//Detect if we are going to crash with the track and/or kart
|
||||
int steps = 0;
|
||||
|
||||
steps = calcSteps();
|
||||
calcSteps();
|
||||
|
||||
/*Response handling functions*/
|
||||
handleSteering(dt);
|
||||
|
@ -572,7 +572,6 @@ void Kart::createPhysics()
|
||||
{
|
||||
// First: Create the chassis of the kart
|
||||
// -------------------------------------
|
||||
float kart_width = getKartWidth();
|
||||
float kart_length = getKartLength();
|
||||
float kart_height = getKartHeight();
|
||||
|
||||
@ -2606,7 +2605,7 @@ void Kart::setOnScreenText(const wchar_t *text)
|
||||
if (irr_driver->isGLSL())
|
||||
{
|
||||
gui::ScalableFont* font = GUIEngine::getFont() ? GUIEngine::getFont() : GUIEngine::getTitleFont();
|
||||
STKTextBillboard* tb = new STKTextBillboard(text, font,
|
||||
new STKTextBillboard(text, font,
|
||||
video::SColor(255, 255, 225, 0),
|
||||
video::SColor(255, 255, 89, 0),
|
||||
getNode(), irr_driver->getSceneManager(), -1,
|
||||
|
@ -438,7 +438,6 @@ void FeatureUnlockedCutScene::onUpdate(float dt)
|
||||
|
||||
if (textureID != previousTextureID)
|
||||
{
|
||||
scene::IMeshSceneNode* node = (scene::IMeshSceneNode*)m_unlocked_stuff[n].m_root_gift_node;
|
||||
scene::IMesh* mesh = m_unlocked_stuff[n].m_side_1->getMesh();
|
||||
|
||||
assert(mesh->getMeshBufferCount() == 1);
|
||||
|
@ -80,7 +80,6 @@ void GPInfoScreen::loadedFromFile()
|
||||
// Only init the number of tracks here, this way the previously selected
|
||||
// number of tracks will be the default.
|
||||
m_num_tracks_spinner->setValue(1);
|
||||
int number_of_tracks = m_num_tracks_spinner->getValue();
|
||||
} // loadedFromFile
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -157,7 +156,6 @@ void GPInfoScreen::init()
|
||||
|
||||
bool random = m_gp.isRandomGP();
|
||||
|
||||
SpinnerWidget *reverse_spinner = getWidget<SpinnerWidget>("reverse-spinner");
|
||||
getWidget<LabelWidget >("track-text" )->setVisible(random);
|
||||
m_num_tracks_spinner->setVisible(random);
|
||||
getWidget<LabelWidget >("group-text" )->setVisible(random);
|
||||
@ -314,8 +312,6 @@ void GPInfoScreen::eventCallback(Widget *, const std::string &name,
|
||||
? track_manager->getNumberOfRaceTracks()
|
||||
: track_manager->getTracksInGroup(m_group_name).size();
|
||||
m_num_tracks_spinner->setMax(max_num_tracks);
|
||||
int number_of_tracks = std::min(max_num_tracks,
|
||||
m_num_tracks_spinner->getValue());
|
||||
if (m_num_tracks_spinner->getValue() > max_num_tracks)
|
||||
m_num_tracks_spinner->setValue(max_num_tracks);
|
||||
// Create a new (i.e. with new tracks) random gp, since the old
|
||||
@ -364,4 +360,4 @@ void GPInfoScreen::onUpdate(float dt)
|
||||
std::string file = track->getScreenshotFile();
|
||||
m_screenshot_widget->setImage(file, IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE);
|
||||
m_screenshot_widget->m_properties[PROP_ICON] = file;
|
||||
} // onUpdate
|
||||
} // onUpdate
|
||||
|
@ -735,7 +735,6 @@ void RaceGUI::drawSpeedEnergyRank(const AbstractKart* kart,
|
||||
if(speed_ratio>1) speed_ratio = 1;
|
||||
|
||||
video::ITexture *bar_texture = m_speed_bar_icon->getTexture();
|
||||
core::dimension2du bar_size = bar_texture->getOriginalSize();
|
||||
video::S3DVertex vertices[5];
|
||||
unsigned int count;
|
||||
|
||||
|
@ -821,7 +821,6 @@ void RaceGUIBase::drawGlobalPlayerIcons(int bottom_margin)
|
||||
|
||||
if (info.special_title.size() > 0)
|
||||
{
|
||||
static video::SColor color = video::SColor(255, 255, 0, 0);
|
||||
core::rect<s32> pos(x+ICON_PLAYER_WIDTH, y+5,
|
||||
x+ICON_PLAYER_WIDTH, y+5);
|
||||
core::stringw s(info.special_title.c_str());
|
||||
|
@ -326,7 +326,6 @@ void TrackInfoScreen::eventCallback(Widget* widget, const std::string& name,
|
||||
}
|
||||
else if (name=="ai-spinner")
|
||||
{
|
||||
SpinnerWidget* w = dynamic_cast<SpinnerWidget*>(widget);
|
||||
const int num_ai = m_ai_kart_spinner->getValue();
|
||||
race_manager->setNumKarts( race_manager->getNumLocalPlayers() + num_ai );
|
||||
UserConfigParams::m_num_karts = race_manager->getNumLocalPlayers() + num_ai;
|
||||
|
@ -725,9 +725,6 @@ void Track::createPhysicsModel(unsigned int main_track_count)
|
||||
*/
|
||||
void Track::convertTrackToBullet(scene::ISceneNode *node)
|
||||
{
|
||||
const core::vector3df &hpr = node->getRotation();
|
||||
const core::vector3df &scale = node->getScale();
|
||||
|
||||
if (node->getType() == scene::ESNT_LOD_NODE)
|
||||
{
|
||||
node = ((LODNode*)node)->getFirstNode();
|
||||
@ -743,8 +740,6 @@ void Track::convertTrackToBullet(scene::ISceneNode *node)
|
||||
std::vector<core::matrix4> matrices;
|
||||
matrices.push_back(node->getAbsoluteTransformation());
|
||||
|
||||
const core::vector3df &pos = node->getAbsolutePosition();
|
||||
|
||||
scene::IMesh *mesh;
|
||||
// In case of readonly materials we have to get the material from
|
||||
// the mesh, otherwise from the node. This is esp. important for
|
||||
|
@ -235,9 +235,6 @@ TrackObjectPresentationMesh::TrackObjectPresentationMesh(
|
||||
m_mesh = NULL;
|
||||
m_node = NULL;
|
||||
|
||||
bool animated = (UserConfigParams::m_graphical_effects ||
|
||||
World::getWorld()->getIdent() == IDENT_CUTSCENE);
|
||||
|
||||
m_mesh = model;
|
||||
init(NULL, NULL, true);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user