[MPlayer-cvslog] r36341 - in trunk/libvo: matrixview.c matrixview_font.h
reimar
subversion at mplayerhq.hu
Wed Jun 12 20:54:19 CEST 2013
Author: reimar
Date: Wed Jun 12 20:54:19 2013
New Revision: 36341
Log:
Use only one single texture.
Modified:
trunk/libvo/matrixview.c
trunk/libvo/matrixview_font.h
Modified: trunk/libvo/matrixview.c
==============================================================================
--- trunk/libvo/matrixview.c Wed Jun 12 20:54:18 2013 (r36340)
+++ trunk/libvo/matrixview.c Wed Jun 12 20:54:19 2013 (r36341)
@@ -34,13 +34,6 @@
static float matrix_contrast = 1.5;
static float matrix_brightness = 1.0;
-static const uint8_t flare[4][4] = {
- { 0, 0, 0, 0},
- { 0, 180, 0, 0},
- { 0, 0, 0, 0},
- { 0, 0, 0, 0}
-};
-
#define MAX_TEXT_X 0x4000
#define MAX_TEXT_Y 0x4000
static int text_x = 0;
@@ -109,13 +102,13 @@ static void draw_flare(float x, float y,
{
mpglColor4ub(204, 204, 204, 255); // Basic polygon color
- mpglTexCoord2f(0, 0);
+ mpglTexCoord2f(1.0 - 4.0/128, 1.0 - 4.0/64);
mpglVertex3f(x - 1, y + 1, z);
- mpglTexCoord2f(0.75, 0);
+ mpglTexCoord2f(1.0 - 1.0/128, 1.0 - 4.0/64);
mpglVertex3f(x + 2, y + 1, z);
- mpglTexCoord2f(0.75, 0.75);
+ mpglTexCoord2f(1.0 - 1.0/128, 1.0 - 1.0/64);
mpglVertex3f(x + 2, y - 2, z);
- mpglTexCoord2f(0, 0.75);
+ mpglTexCoord2f(1.0 - 4.0/128, 1.0 - 1.0/64);
mpglVertex3f(x - 1, y - 2, z);
}
@@ -248,17 +241,6 @@ static void ourBuildTextures(void)
font_texture);
mpglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
mpglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-
- mpglBindTexture(GL_TEXTURE_2D, 1);
- mpglTexImage2D(GL_TEXTURE_2D, 0, 1, 4, 4, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE,
- flare);
- mpglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- mpglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-
- // Some pretty standard settings for wrapping and filtering.
- mpglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- mpglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
- mpglBindTexture(GL_TEXTURE_2D, 0);
}
void matrixview_init(int w, int h)
@@ -308,13 +290,8 @@ void matrixview_draw(double currentTime,
// OK, let's start drawing our planer quads.
mpglBegin(GL_QUADS);
draw_text(data);
- mpglEnd();
-
- mpglBindTexture(GL_TEXTURE_2D, 1);
- mpglBegin(GL_QUADS);
draw_flares();
mpglEnd();
- mpglBindTexture(GL_TEXTURE_2D, 0);
make_change(currentTime);
}
Modified: trunk/libvo/matrixview_font.h
==============================================================================
--- trunk/libvo/matrixview_font.h Wed Jun 12 20:54:18 2013 (r36340)
+++ trunk/libvo/matrixview_font.h Wed Jun 12 20:54:19 2013 (r36341)
@@ -563,7 +563,7 @@ static const uint8_t font_texture[FONT_T
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0
}, {
6, 25, 191, 220, 242, 255, 243, 222, 220, 221, 139, 5, 5, 5, 64, 246,
244, 63, 7, 7, 6, 7, 6, 6, 8, 6, 6, 7, 6, 26, 211, 255,
@@ -572,7 +572,7 @@ static const uint8_t font_texture[FONT_T
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0
}, {
5, 9, 23, 27, 165, 255, 140, 26, 26, 26, 18, 5, 5, 5, 8, 111,
245, 219, 57, 6, 6, 6, 5, 7, 7, 6, 6, 6, 6, 6, 52, 211,
@@ -581,7 +581,7 @@ static const uint8_t font_texture[FONT_T
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 180, 0, 0
}, {
6, 6, 6, 6, 186, 255, 95, 5, 5, 5, 5, 5, 5, 5, 5, 8,
73, 197, 236, 155, 88, 82, 44, 7, 6, 6, 7, 7, 6, 7, 6, 31,
@@ -590,7 +590,7 @@ static const uint8_t font_texture[FONT_T
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0
}, {
5, 6, 5, 8, 84, 107, 28, 5, 5, 5, 5, 5, 5, 5, 5, 6,
5, 17, 52, 99, 103, 90, 35, 6, 5, 5, 6, 5, 6, 6, 6, 5,
@@ -599,7 +599,7 @@ static const uint8_t font_texture[FONT_T
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0
}
};
More information about the MPlayer-cvslog
mailing list