Fixed compiler warnings.
This commit is contained in:
parent
63bbf6e092
commit
36cbb18e27
@ -353,10 +353,10 @@ void compressTexture(irr::video::ITexture *tex, bool srgb, bool premul_alpha)
|
||||
{
|
||||
float alpha = data[4 * i + 3];
|
||||
if (alpha > 0.)
|
||||
alpha = pow(alpha / 255., 1. / 2.2);
|
||||
data[4 * i] *= alpha;
|
||||
data[4 * i + 1] *= alpha;
|
||||
data[4 * i + 2] *= alpha;
|
||||
alpha = pow(alpha / 255.f, 1.f / 2.2f);
|
||||
data[4 * i ] = unsigned char(data[4 * i ] * alpha);
|
||||
data[4 * i + 1] = unsigned char(data[4 * i + 1] * alpha);
|
||||
data[4 * i + 2] = unsigned char(data[4 * i + 2] * alpha);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -473,7 +473,9 @@ void PostProcessing::renderSSAO()
|
||||
glGenerateMipmap(GL_TEXTURE_2D);
|
||||
setTexture(1, getTextureGLuint(noise_tex), GL_LINEAR, GL_LINEAR);
|
||||
|
||||
FullScreenShader::SSAOShader::setUniforms(core::vector2df(UserConfigParams::m_width, UserConfigParams::m_height), 0, 1);
|
||||
FullScreenShader::SSAOShader::setUniforms(core::vector2df(float(UserConfigParams::m_width),
|
||||
float(UserConfigParams::m_height)),
|
||||
0, 1);
|
||||
|
||||
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
||||
}
|
||||
|
@ -170,7 +170,7 @@ void IrrDriver::renderGLSL(float dt)
|
||||
UtilShader::ColoredLine::setUniforms(it->first);
|
||||
const std::vector<float> &vertex = it->second;
|
||||
const float *tmp = vertex.data();
|
||||
for (int i = 0; i < vertex.size(); i += 1024 * 6)
|
||||
for (unsigned int i = 0; i < vertex.size(); i += 1024 * 6)
|
||||
{
|
||||
unsigned count = MIN2(vertex.size() - i, 1024 * 6);
|
||||
glBufferSubData(GL_ARRAY_BUFFER, 0, count * sizeof(float), &tmp[i]);
|
||||
@ -723,8 +723,8 @@ void IrrDriver::computeCameraMatrix(scene::ICameraSceneNode * const camnode, siz
|
||||
size_t size = irr_driver->getShadowViewProj().size();
|
||||
for (unsigned i = 0; i < size; i++)
|
||||
memcpy(&tmp[16 * i + 64], irr_driver->getShadowViewProj()[i].pointer(), 16 * sizeof(float));
|
||||
tmp[128] = width;
|
||||
tmp[129] = height;
|
||||
tmp[128] = float(width);
|
||||
tmp[129] = float(height);
|
||||
|
||||
glBindBuffer(GL_UNIFORM_BUFFER, SharedObject::ViewProjectionMatrixesUBO);
|
||||
glBufferSubData(GL_UNIFORM_BUFFER, 0, (16 * 8 + 2) * sizeof(float), tmp);
|
||||
|
@ -179,7 +179,6 @@ GLMesh allocateMeshBuffer(scene::IMeshBuffer* mb)
|
||||
case scene::EPT_QUADS:
|
||||
assert(0 && "Unsupported primitive type");
|
||||
}
|
||||
ITexture *tex;
|
||||
for (unsigned i = 0; i < 6; i++)
|
||||
result.textures[i] = mb->getMaterial().getTexture(i);
|
||||
result.TextureMatrix = 0;
|
||||
|
@ -698,7 +698,7 @@ TrackObjectPresentationLight::TrackObjectPresentationLight(const XMLNode& xml_no
|
||||
m_energy = 1.0f;
|
||||
xml_node.get("energy", &m_energy);
|
||||
|
||||
m_distance = 20. * m_energy;
|
||||
m_distance = 20.f * m_energy;
|
||||
xml_node.get("distance", &m_distance);
|
||||
|
||||
if (irr_driver->isGLSL())
|
||||
|
@ -320,7 +320,7 @@ void Profiler::draw()
|
||||
long hovered_gpu_marker_elapsed = 0;
|
||||
if (hovered_markers.size() == 0)
|
||||
{
|
||||
int gpu_y = y_offset + nb_thread_infos*line_height + line_height/2;
|
||||
int gpu_y = int(y_offset + nb_thread_infos*line_height + line_height/2);
|
||||
float total = 0;
|
||||
for (unsigned i = 0; i < Q_LAST; i++)
|
||||
{
|
||||
@ -341,7 +341,7 @@ void Profiler::draw()
|
||||
{
|
||||
//Log::info("GPU Perf", "Phase %d : %d us\n", i, irr_driver->getGPUTimer(i).elapsedTimeus());
|
||||
|
||||
float elapsed = irr_driver->getGPUTimer(i).elapsedTimeus();
|
||||
float elapsed = float(irr_driver->getGPUTimer(i).elapsedTimeus());
|
||||
core::rect<s32> pos((s32)(x_offset + (curr_val / total)*profiler_width),
|
||||
(s32)(y_offset + gpu_y),
|
||||
(s32)(x_offset + ((curr_val + elapsed) / total)*profiler_width),
|
||||
|
Loading…
Reference in New Issue
Block a user