Work around a bug in the Intel driver
[ipdf/code.git] / src / screen.cpp
index 2d63bc9..6d67820 100644 (file)
@@ -309,7 +309,7 @@ void Screen::RenderBMP(const char * filename) const
        int w = bmp->w;
        int h = bmp->h;
 
-       GLenum texture_format
+       GLenum texture_format = GL_RGBA;
        switch (bmp->format->BytesPerPixel)
        {
                case 4: //contains alpha
@@ -425,6 +425,8 @@ void Screen::DebugFontFlush()
 
        glDisable(GL_BLEND);
 
+       m_debug_font_vertices.Invalidate();
+       m_debug_font_indices.Invalidate();
        m_debug_font_vertex_head = 0;
        m_debug_font_index_head = 0;
 }
@@ -451,7 +453,7 @@ void Screen::DebugFontPrint(const char* str)
                        DebugFontPrint(str);
                        return;
                }
-               if (*str >= 32 && *str < 128) {
+               if (*str >= 32 && (unsigned char)(*str) < 128) {
                        stbtt_aligned_quad q;
                        stbtt_GetBakedQuad(m_debug_font_rects, 1024,1024, *str-32, &m_debug_font_x,&m_debug_font_y,&q,1);
                        size_t index = vertexData.Add({q.x0, q.y0, q.s0, q.t0});

UCC git Repository :: git.ucc.asn.au