"*showFPS: False \n" \
"*wireframe: False \n" \
-# define refresh_stream 0
+# define release_stream 0
#undef countof
#define countof(x) (sizeof((x))/sizeof((*x)))
glPixelStorei (GL_UNPACK_ALIGNMENT, 4);
clear_gl_error ();
glTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA, TEX_WIDTH, TEX_HEIGHT,
- 0, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, texture);
+ 0, GL_RGBA, GL_UNSIGNED_BYTE, texture);
check_gl_error ("texture");
/* Texture parameters, LINEAR scaling for better texture quality */
stream_configuration *es;
streamtime current_time;
- if (!ess)
- {
- ess = (stream_configuration *)
- calloc (MI_NUM_SCREENS(mi), sizeof (stream_configuration));
- if (!ess)
- {
- fprintf (stderr, "%s: out of memory\n", progname);
- exit (1);
- }
- }
+ MI_INIT (mi, ess);
es = &ess[MI_SCREEN(mi)];
}
ENTRYPOINT void
-release_stream (ModeInfo * mi)
+free_stream (ModeInfo * mi)
{
- int screen;
+ stream_configuration *es = &ess[MI_SCREEN(mi)];
+ int i;
- for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
- {
- stream_configuration *es = &ess[screen];
- int i;
+ if (es->glx_context) {
+ glXMakeCurrent (MI_DISPLAY(mi), MI_WINDOW(mi), *(es->glx_context));
for (i = 0; i < es->num_streams; i++) {
free (es->streams[i].flares);
free (es->streams);
}
-
- FreeAllGL (mi);
}