diff --git a/plugins/GSdx/GLLoader.cpp b/plugins/GSdx/GLLoader.cpp index 46825cc2c7..7f5badecf7 100644 --- a/plugins/GSdx/GLLoader.cpp +++ b/plugins/GSdx/GLLoader.cpp @@ -184,7 +184,7 @@ namespace ReplaceGL { void APIENTRY ViewportIndexedf(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h) { - glViewport(x, y, w, h); + glViewport(GLint(x), GLint(y), GLsizei(w), GLsizei(h)); } } diff --git a/plugins/GSdx/GSDeviceOGL.cpp b/plugins/GSdx/GSDeviceOGL.cpp index f83c944bc0..31e6367005 100644 --- a/plugins/GSdx/GSDeviceOGL.cpp +++ b/plugins/GSdx/GSDeviceOGL.cpp @@ -163,7 +163,7 @@ void GSDeviceOGL::GenerateProfilerData() double ms = 0.000001; float replay = (float)(theApp.GetConfigI("linux_replay")); - int first_query = (float)m_profiler.last_query / replay; + int first_query = static_cast((float)m_profiler.last_query / replay); glGetQueryObjectui64v(m_profiler.timer_query[first_query], GL_QUERY_RESULT, &time_start); for (uint32 q = first_query + 1; q < m_profiler.last_query; q++) { @@ -1658,7 +1658,7 @@ void GSDeviceOGL::OMSetRenderTargets(GSTexture* rt, GSTexture* ds, const GSVecto { GLState::viewport = size; // FIXME ViewportIndexedf or ViewportIndexedfv (GL4.1) - glViewportIndexedf(0, 0, 0, size.x, size.y); + glViewportIndexedf(0, 0, 0, GLfloat(size.x), GLfloat(size.y)); } GSVector4i r = scissor ? *scissor : GSVector4i(size).zwxy(); diff --git a/plugins/GSdx/GSRendererOGL.cpp b/plugins/GSdx/GSRendererOGL.cpp index bb5c86c345..4470ff2409 100644 --- a/plugins/GSdx/GSRendererOGL.cpp +++ b/plugins/GSdx/GSRendererOGL.cpp @@ -612,7 +612,7 @@ void GSRendererOGL::EmulateTextureSampler(const GSTextureCache::Source* tex) const uint8 wms = m_context->CLAMP.WMS; const uint8 wmt = m_context->CLAMP.WMT; - bool complex_wms_wmt = (wms | wmt) & 2; + bool complex_wms_wmt = !!((wms | wmt) & 2); bool bilinear = m_filter == 2 ? m_vt.IsLinear() : m_filter != 0; bool simple_sample = !tex->m_palette && cpsm.fmt == 0 && !complex_wms_wmt && !psm.depth; @@ -998,15 +998,15 @@ void GSRendererOGL::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sour // Replace all sprite with a single fullscreen sprite. GSVertex* s = &m_vertex.buff[0]; - s[0].XYZ.X = (16.0f * m_vt.m_min.p.x) + m_context->XYOFFSET.OFX; - s[1].XYZ.X = (16.0f * m_vt.m_max.p.x) + m_context->XYOFFSET.OFX; - s[0].XYZ.Y = (16.0f * m_vt.m_min.p.y) + m_context->XYOFFSET.OFY; - s[1].XYZ.Y = (16.0f * m_vt.m_max.p.y) + m_context->XYOFFSET.OFY; + s[0].XYZ.X = static_cast((16.0f * m_vt.m_min.p.x) + m_context->XYOFFSET.OFX); + s[1].XYZ.X = static_cast((16.0f * m_vt.m_max.p.x) + m_context->XYOFFSET.OFX); + s[0].XYZ.Y = static_cast((16.0f * m_vt.m_min.p.y) + m_context->XYOFFSET.OFY); + s[1].XYZ.Y = static_cast((16.0f * m_vt.m_max.p.y) + m_context->XYOFFSET.OFY); - s[0].U = 16.0f * m_vt.m_min.t.x; - s[0].V = 16.0f * m_vt.m_min.t.y; - s[1].U = 16.0f * m_vt.m_max.t.x; - s[1].V = 16.0f * m_vt.m_max.t.y; + s[0].U = static_cast(16.0f * m_vt.m_min.t.x); + s[0].V = static_cast(16.0f * m_vt.m_min.t.y); + s[1].U = static_cast(16.0f * m_vt.m_max.t.x); + s[1].V = static_cast(16.0f * m_vt.m_max.t.y); m_vertex.head = m_vertex.tail = m_vertex.next = 2; m_index.tail = 2;