Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function configure()
- {
- }
- function initialize()
- {
- global Window1 = SS_CreateWindow( "Direct3D Window (hopefully)", 32, 32, 128, 128 );
- Window1.initRenderer( SS_RENDERER_DONTCARE, SS_RENDERER_DONTCARE, SS_RENDERER_VSYNC );
- global Window2 = SS_CreateWindow( "OpenGL Window", 192, 32, 128, 128 );
- Window2.initRenderer( SS_RENDERER_OPENGL, SS_RENDERER_DONTCARE, SS_RENDERER_VSYNC );
- }
- function update()
- {
- if( Window1 )
- {
- Window1.makeCurrent();
- SS_Clear( color(0.1,0.2,0.4) );
- SS_Present();
- }
- if( Window2 )
- {
- Window2.makeCurrent();
- SS_Clear( color(0.2,0.3,0.4) );
- SS_Present();
- }
- }
- function on_event( e )
- {
- if( e.type == SDL_QUIT )
- global sys_exit = true;
- if( e.type == SDL_WINDOWEVENT && e.event == SDL_WINDOWEVENT_CLOSE )
- {
- win = SS_GetWindowFromID( e.windowID );
- if( win == Window1 )
- global Window1 = null;
- if( win == Window2 )
- global Window2 = null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement