helps if I upload the texture in the correct format :)

This commit is contained in:
Bill Currie 2001-05-23 03:31:54 +00:00
parent fa6dd2a9f3
commit 3b7d356416

View file

@ -84,7 +84,7 @@ R_LineGraph (int x, int y, int *h_vals, int count)
s = r_graphheight->int_val;
size = 2 * count;
size = s * count;
if (size > graph_size[graph_index]) {
graph_size[graph_index] = size;
graph_texels[graph_index] = realloc (graph_texels[graph_index], size);
@ -121,12 +121,13 @@ R_LineGraph (int x, int y, int *h_vals, int count)
glBindTexture (GL_TEXTURE_2D, graph_texture[graph_index]);
glTexImage2D (GL_TEXTURE_2D, 0, gl_alpha_format,
graph_width[graph_index], s, 0, GL_RGBA,
GL_UNSIGNED_BYTE, graph_texels[graph_index]);
//glTexImage2D (GL_TEXTURE_2D, 0, gl_alpha_format,
// graph_width[graph_index], s, 0, GL_RGBA,
// GL_UNSIGNED_BYTE, graph_texels[graph_index]);
glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
//glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
//glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
GL_Upload8 (graph_texels[graph_index], graph_width[graph_index], s, 0, 1);
glBegin (GL_QUADS);
glTexCoord2f (0, 0);