How to do a split screen ? May 18, 2013 10:26PM | Registered: 10 years ago Posts: 6 |
Re: How to do a split screen ? May 19, 2013 12:56PM | Registered: 13 years ago Posts: 58 |
Re: How to do a split screen ? May 19, 2013 04:14PM | Registered: 10 years ago Posts: 6 |
Re: How to do a split screen ? May 20, 2013 02:07AM | Registered: 13 years ago Posts: 363 |
Re: How to do a split screen ? May 20, 2013 11:59AM | Registered: 10 years ago Posts: 6 |
Re: How to do a split screen ? May 20, 2013 03:21PM | Registered: 13 years ago Posts: 363 |
Re: How to do a split screen ? August 12, 2013 10:48PM | Registered: 10 years ago Posts: 6 |
// screen n°1 : left screen GRRLIB_Camera3dSettings(camera1[0],camera1[1],camera1[2], 0.0f,1.0f,0.0f, 0.0f, 0.0f, 0.0f ); GX_SetViewport(0.0f, 0.0f, rmode->fbWidth / 2 , rmode->efbHeight, 0.0f, 1.0f); GX_SetScissor (0, 0, rmode->fbWidth / 2 , rmode->efbHeight); GRRLIB_3dMode(0.1f,1000,45, true, false); Draw_SkyBox(); Texture_Apply(idtexture,true); Draw_Box(); // screen n°2 : right screen GRRLIB_Camera3dSettings(camera2[0],camera2[1],camera2[2],0.0f,1.0f,0.0f,0.0f, 0.0f, 0.0f ); GX_SetViewport(rmode->fbWidth / 2, 0.0f, rmode->fbWidth / 2 , rmode->efbHeight, 0.0f, 1.0f); GX_SetScissor (rmode->fbWidth / 2, 0, rmode->fbWidth / 2 , rmode->efbHeight); GRRLIB_3dMode(0.1f,1000,45, true, false); Draw_SkyBox(); Texture_Apply(idtexture,true); Draw_Box();
Re: How to do a split screen ? August 12, 2013 11:42PM | Registered: 13 years ago Posts: 363 |
Re: How to do a split screen ? August 13, 2013 07:04AM | Registered: 13 years ago Posts: 363 |
guVector center={0,0,0}; float screen_width = rmode->fbWidth; float screen_height = rmode->efbHeight; float screen_center_x = screen_width*0.5f; float screen_center_y = screen_height*0.5f; GRRLIB_texImg *blank_tex, *blank_tex2; //game pattern blank_tex=GRRLIB_CreateEmptyTexture(640,480); blank_tex2=GRRLIB_CreateEmptyTexture(640,480); while(1) { game_updatebuttons(); GRRLIB_Camera3dSettings( -5, 250, 5, 0,1,0, 5, 5, 5 ); draw_circle2( center, colour_alpha(GRRLIB_RED, circle_size), 5 ); //fading center GRRLIB_Screen2Texture( 0,0, blank_tex, false); GRRLIB_Camera3dSettings( -2500, 50, 5, 0,1,0, 5000, 5, 5 ); //does not work draw_circle2( center, colour_alpha(GRRLIB_YELLOW, circle_size), 50 ); GRRLIB_Screen2Texture( 0,0, blank_tex2, false); engine_2d(); //print text GRRLIB_DrawImg(0,0,blank_tex, 0,0.5f,0.5f, GRRLIB_WHITE); GRRLIB_DrawImg(screen_center_x,0,blank_tex2, 0,0.5f,0.5f, GRRLIB_WHITE); engine_2d(); //print text GRRLIB_Render(); }
Re: How to do a split screen ? August 13, 2013 09:17AM | Registered: 13 years ago Posts: 58 |
Quote
owen
It is often faster to hardcode the vertex positions for things you draw often.
Quote
owen
I was experimenting with drawing a view then taking a screenshot, then moving the camera and taking another screen shot but unfortunately you cannot move the camera after you start drawing the frame.
Re: How to do a split screen ? August 13, 2013 02:19PM | Registered: 13 years ago Posts: 363 |
Re: How to do a split screen ? August 14, 2013 10:07AM | Registered: 13 years ago Posts: 58 |
Quote
owen
@antibyte I still have not figured out how that vertex array works!
Quote
owen
I am trying to move the view two times in a single frame. Taking a screen shot each time. That's what the code above is doing but the second screenshot does not receive new camera positions. I am trying to avoid drawing the world twice.
Re: How to do a split screen ? August 14, 2013 05:34PM | Registered: 13 years ago Posts: 363 |
Re: How to do a split screen ? August 15, 2013 12:07AM | Registered: 10 years ago Posts: 6 |
Re: How to do a split screen ? August 15, 2013 12:58AM | Registered: 13 years ago Posts: 363 |