mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 05:00:35 +00:00
helps if I upload the texture in the correct format :)
This commit is contained in:
parent
fa6dd2a9f3
commit
3b7d356416
1 changed files with 7 additions and 6 deletions
|
@ -84,7 +84,7 @@ R_LineGraph (int x, int y, int *h_vals, int count)
|
||||||
|
|
||||||
s = r_graphheight->int_val;
|
s = r_graphheight->int_val;
|
||||||
|
|
||||||
size = 2 * count;
|
size = s * count;
|
||||||
if (size > graph_size[graph_index]) {
|
if (size > graph_size[graph_index]) {
|
||||||
graph_size[graph_index] = size;
|
graph_size[graph_index] = size;
|
||||||
graph_texels[graph_index] = realloc (graph_texels[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]);
|
glBindTexture (GL_TEXTURE_2D, graph_texture[graph_index]);
|
||||||
|
|
||||||
glTexImage2D (GL_TEXTURE_2D, 0, gl_alpha_format,
|
//glTexImage2D (GL_TEXTURE_2D, 0, gl_alpha_format,
|
||||||
graph_width[graph_index], s, 0, GL_RGBA,
|
// graph_width[graph_index], s, 0, GL_RGBA,
|
||||||
GL_UNSIGNED_BYTE, graph_texels[graph_index]);
|
// GL_UNSIGNED_BYTE, graph_texels[graph_index]);
|
||||||
|
|
||||||
glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
//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_MAG_FILTER, GL_LINEAR);
|
||||||
|
GL_Upload8 (graph_texels[graph_index], graph_width[graph_index], s, 0, 1);
|
||||||
|
|
||||||
glBegin (GL_QUADS);
|
glBegin (GL_QUADS);
|
||||||
glTexCoord2f (0, 0);
|
glTexCoord2f (0, 0);
|
||||||
|
|
Loading…
Reference in a new issue