Why? Seriously, why do you need to do that?
we need to go back and forth between these 2 video modes:!!!
oviously the video mode switch at the bigining and at end of the movie… not
all the time!
the reason im trying this is for playing quicktime in a 3d opengl engine…
would be nice to have sdl doing it… it does… but with side effecs!
heres a sample:
as is… the cursor disapear!
take out one l_screen = … and u get the cursor back…
#include <sdl.h>
#pragma comment(lib, “SDLmain.lib”)
#pragma comment(lib, “SDL.lib”)
int main(int in_argc, char **in_argv)
{
SDL_Init(SDL_INIT_VIDEO);
SDL_WM_SetCaption(“SDL Test”, NULL);
SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 32);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_Surface *l_screen;
l_screen = SDL_SetVideoMode(640, 480, 32, SDL_HWSURFACE |
SDL_FULLSCREEN);
l_screen = SDL_SetVideoMode(640, 480, 32, SDL_OPENGL | SDL_FULLSCREEN);
SDL_Event l_event;
l_event.type = SDL_NOEVENT;
while (l_event.type != SDL_QUIT)
{
while(SDL_PollEvent(&l_event))
{
switch (l_event.type)
{
case SDL_KEYDOWN:
{
switch (l_event.key.keysym.sym)
{
case SDLK_ESCAPE:
{
fclose(l_file);
SDL_Quit();
return 0;
}
break;
}
}
break;
}
}
}
SDL_Quit();
return 0;
}
maybe there is a simplier way to play back video with sdl… but when i play
quictime video with SDL_OPENGL it turns out all black… sounds is audible tho.
thx