GSDX: Clean up warnings on MSVC

GLLoader: cast passed parameters to required type.
GSDeviceOGL: cast variables to required type and silence warnings.
GSRendererOGL: cast variables to required type and silence warnings.
This commit is contained in:
Akash 2016-06-29 23:12:05 +05:30
parent 72661e7c16
commit 4cfb2b248e
3 changed files with 12 additions and 12 deletions

View File

@ -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));
}
}

View File

@ -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<int>((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();

View File

@ -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<uint16>((16.0f * m_vt.m_min.p.x) + m_context->XYOFFSET.OFX);
s[1].XYZ.X = static_cast<uint16>((16.0f * m_vt.m_max.p.x) + m_context->XYOFFSET.OFX);
s[0].XYZ.Y = static_cast<uint16>((16.0f * m_vt.m_min.p.y) + m_context->XYOFFSET.OFY);
s[1].XYZ.Y = static_cast<uint16>((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<uint16>(16.0f * m_vt.m_min.t.x);
s[0].V = static_cast<uint16>(16.0f * m_vt.m_min.t.y);
s[1].U = static_cast<uint16>(16.0f * m_vt.m_max.t.x);
s[1].V = static_cast<uint16>(16.0f * m_vt.m_max.t.y);
m_vertex.head = m_vertex.tail = m_vertex.next = 2;
m_index.tail = 2;