{"action":"created","issue":{"url":"https://api.github.com/repos/mono/MonoGame/issues/4488","labels_url":"https://api.github.com/repos/mono/MonoGame/issues/4488/labels{/name}","comments_url":"https://api.github.com/repos/mono/MonoGame/issues/4488/comments","events_url":"https://api.github.com/repos/mono/MonoGame/issues/4488/events","html_url":"https://github.com/mono/MonoGame/pull/4488","id":130525961,"number":4488,"title":"Implement RenderTargetCube for OpenGL","user":{"login":"tgjones","id":102049,"avatar_url":"https://avatars.githubusercontent.com/u/102049?v=3","gravatar_id":"","url":"https://api.github.com/users/tgjones","html_url":"https://github.com/tgjones","followers_url":"https://api.github.com/users/tgjones/followers","following_url":"https://api.github.com/users/tgjones/following{/other_user}","gists_url":"https://api.github.com/users/tgjones/gists{/gist_id}","starred_url":"https://api.github.com/users/tgjones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgjones/subscriptions","organizations_url":"https://api.github.com/users/tgjones/orgs","repos_url":"https://api.github.com/users/tgjones/repos","events_url":"https://api.github.com/users/tgjones/events{/privacy}","received_events_url":"https://api.github.com/users/tgjones/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-02T00:10:21Z","updated_at":"2016-02-02T01:37:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mono/MonoGame/pulls/4488","html_url":"https://github.com/mono/MonoGame/pull/4488","diff_url":"https://github.com/mono/MonoGame/pull/4488.diff","patch_url":"https://github.com/mono/MonoGame/pull/4488.patch"},"body":"Fixes #2411.\r\n\r\nThis PR adds support for RenderTargetCube on OpenGL, with a test.\r\n\r\nA couple of notes:\r\n\r\n* Unfortunately the [new] test doesn't pass on OpenGL :( However, the specific part of the test that renders to a `RenderTargetCube` and then extracts the data and compares it with known-good data, passes. The part that fails is when `PlatformPresent` is subsequently called. That part is not really related to the test. It obviously should pass, but I have no idea why it doesn't. Here's the stack trace; does anyone have any ideas?\r\n\r\n``` csharp\r\nMicrosoft.Xna.Framework.Graphics.MonoGameGLException : GL.GetError() returned InvalidEnum\r\n\r\n   at Microsoft.Xna.Framework.Graphics.GraphicsExtensions.CheckGLError() in C:\\Users\\Tim Jones\\Documents\\GitHub\\MonoGame\\MonoGame.Framework\\Graphics\\GraphicsExtensions.cs:line 919\r\n   at Microsoft.Xna.Framework.Graphics.GraphicsDevice.PlatformPresent() in C:\\Users\\Tim Jones\\Documents\\GitHub\\MonoGame\\MonoGame.Framework\\Graphics\\GraphicsDevice.OpenGL.cs:line 380\r\n   at Microsoft.Xna.Framework.Graphics.GraphicsDevice.Present() in C:\\Users\\Tim Jones\\Documents\\GitHub\\MonoGame\\MonoGame.Framework\\Graphics\\GraphicsDevice.cs:line 509\r\n   at Microsoft.Xna.Framework.OpenTKGamePlatform.Present() in C:\\Users\\Tim Jones\\Documents\\GitHub\\MonoGame\\MonoGame.Framework\\Desktop\\OpenTKGamePlatform.cs:line 292\r\n   at Microsoft.Xna.Framework.Game.EndDraw() in C:\\Users\\Tim Jones\\Documents\\GitHub\\MonoGame\\MonoGame.Framework\\Game.cs:line 526\r\n   at Microsoft.Xna.Framework.Game.DoDraw(GameTime gameTime) in C:\\Users\\Tim Jones\\Documents\\GitHub\\MonoGame\\MonoGame.Framework\\Game.cs:line 684\r\n   at Microsoft.Xna.Framework.Game.Tick() in C:\\Users\\Tim Jones\\Documents\\GitHub\\MonoGame\\MonoGame.Framework\\Game.cs:line 515\r\n   at Microsoft.Xna.Framework.OpenTKGamePlatform.RunLoop() in C:\\Users\\Tim Jones\\Documents\\GitHub\\MonoGame\\MonoGame.Framework\\Desktop\\OpenTKGamePlatform.cs:line 144\r\n   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior) in C:\\Users\\Tim Jones\\Documents\\GitHub\\MonoGame\\MonoGame.Framework\\Game.cs:line 397\r\n   at MonoGame.Tests.TestGameBase.Run(Predicate`1 until) in C:\\Users\\Tim Jones\\Documents\\GitHub\\MonoGame\\Test\\Framework\\TestGameBase.cs:line 185\r\n   at MonoGame.Tests.Visual.RenderTargetCubeTest.ShouldClearRenderTargetAndGetData(Int32 size) in C:\\Users\\Tim Jones\\Documents\\GitHub\\MonoGame\\Test\\Framework\\Visual\\RenderTargetCubeTest.cs:line 50\r\n```\r\n\r\n* In order to avoid duplicating loads of render target-related code (for `RenderTarget2D` and `RenderTargetCube`) in `GraphicsDevice.OpenGL.cs`, I have added some properties and a method to `IRenderTarget`."},"comment":{"url":"https://api.github.com/repos/mono/MonoGame/issues/comments/178299216","html_url":"https://github.com/mono/MonoGame/pull/4488#issuecomment-178299216","issue_url":"https://api.github.com/repos/mono/MonoGame/issues/4488","id":178299216,"user":{"login":"tgjones","id":102049,"avatar_url":"https://avatars.githubusercontent.com/u/102049?v=3","gravatar_id":"","url":"https://api.github.com/users/tgjones","html_url":"https://github.com/tgjones","followers_url":"https://api.github.com/users/tgjones/followers","following_url":"https://api.github.com/users/tgjones/following{/other_user}","gists_url":"https://api.github.com/users/tgjones/gists{/gist_id}","starred_url":"https://api.github.com/users/tgjones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgjones/subscriptions","organizations_url":"https://api.github.com/users/tgjones/orgs","repos_url":"https://api.github.com/users/tgjones/repos","events_url":"https://api.github.com/users/tgjones/events{/privacy}","received_events_url":"https://api.github.com/users/tgjones/received_events","type":"User","site_admin":false},"created_at":"2016-02-02T01:37:00Z","updated_at":"2016-02-02T01:37:00Z","body":"I'm still working through some issues with this, so please don't merge it yet."}}