protected override void OnRenderFrame(FrameEventArgs e) { GL.Viewport(0, 0, 1280, 720); GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit); RenderFb(); GL.UseProgram(PrgShaderHandle); Renderer.RunActions(); Renderer.BindTexture(0); Renderer.Render(); SwapBuffers(); }
private void Render() { while (true) { // Update HidControllerKeys CurrentButton = 0; JoystickPosition LeftJoystick; JoystickPosition RightJoystick; int LeftJoystickDX = 0; int LeftJoystickDY = 0; int RightJoystickDX = 0; int RightJoystickDY = 0; LeftJoystick = new JoystickPosition { DX = LeftJoystickDX, DY = LeftJoystickDY }; RightJoystick = new JoystickPosition { DX = RightJoystickDX, DY = RightJoystickDY }; Ns.Hid.SendControllerButtons(HidControllerID.CONTROLLER_HANDHELD, HidControllerLayouts.Main, CurrentButton, LeftJoystick, RightJoystick); // Draw ScreenTex.UploadBitmap(); Renderer.RunActions(); Renderer.BindTexture(0); Renderer.Render(); if (ScreenTex.Pixels != null) { ImageBitmap.CopyPixelsFromBuffer(IntBuffer.Wrap(ScreenTex.Pixels)); } RunOnUiThread(() => ImageView.SetImageBitmap(ImageBitmap)); } }
protected override void OnRenderFrame(FrameEventArgs e) { GL.Viewport(0, 0, 1280, 720); Title = $"Ryujinx Screen - (Vsync: {VSync} - FPS: {1f / e.Time:0})"; GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit); RenderFb(); GL.UseProgram(PrgShaderHandle); Renderer.RunActions(); Renderer.BindTexture(0); Renderer.Render(); SwapBuffers(); }
protected override void OnRenderFrame(FrameEventArgs e) { //TODO: Figure out why we can't render a frame! base.OnRenderFrame(e); GL.Viewport(0, 0, Width, Height); GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit); RenderFb(); GL.UseProgram(PrgShaderHandle); Renderer.RunActions(); Renderer.BindTexture(0); Renderer.Render(); SwapBuffers(); }