"*showFPS: False \n" \
"*wireframe: False \n" \
-# define refresh_matrix 0
+# define free_matrix 0
# define release_matrix 0
#undef countof
#define countof(x) (sizeof((x))/sizeof((*x)))
reshape_matrix (ModeInfo *mi, int width, int height)
{
GLfloat h = (GLfloat) height / (GLfloat) width;
+ int y = 0;
- glViewport (0, 0, (GLint) width, (GLint) height);
+ if (width > height * 5) { /* tiny window: show middle */
+ height = width * 9/16;
+ y = -height/2;
+ h = height / (GLfloat) width;
+ }
+
+ glViewport (0, y, (GLint) width, (GLint) height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
If this hack ever grows into something that displays full Latin1 text,
well then, Something Else Will Need To Be Done.
+
+ Since currently GLMatrix does not run textclient / xscreensaver-text,
+ it's not an issue. (XMatrix does that.)
+
*/
static void
spank_image (matrix_configuration *mp, XImage *xi)
if (wire)
do_texture = False;
- if (!mps) {
- mps = (matrix_configuration *)
- calloc (MI_NUM_SCREENS(mi), sizeof (matrix_configuration));
- if (!mps) {
- fprintf(stderr, "%s: out of memory\n", progname);
- exit(1);
- }
- }
+ MI_INIT (mi, mps);
mp = &mps[MI_SCREEN(mi)];
mp->glx_context = init_GL(mi);