{"action":"created","issue":{"url":"https://api.github.com/repos/team-joogl/joogl/issues/6","repository_url":"https://api.github.com/repos/team-joogl/joogl","labels_url":"https://api.github.com/repos/team-joogl/joogl/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/team-joogl/joogl/issues/6/comments","events_url":"https://api.github.com/repos/team-joogl/joogl/issues/6/events","html_url":"https://github.com/team-joogl/joogl/issues/6","id":154812531,"number":6,"title":"Game loop code spams new GLFWWindows","user":{"login":"zgoethel12","id":13502112,"avatar_url":"https://avatars.githubusercontent.com/u/13502112?v=3","gravatar_id":"","url":"https://api.github.com/users/zgoethel12","html_url":"https://github.com/zgoethel12","followers_url":"https://api.github.com/users/zgoethel12/followers","following_url":"https://api.github.com/users/zgoethel12/following{/other_user}","gists_url":"https://api.github.com/users/zgoethel12/gists{/gist_id}","starred_url":"https://api.github.com/users/zgoethel12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zgoethel12/subscriptions","organizations_url":"https://api.github.com/users/zgoethel12/orgs","repos_url":"https://api.github.com/users/zgoethel12/repos","events_url":"https://api.github.com/users/zgoethel12/events{/privacy}","received_events_url":"https://api.github.com/users/zgoethel12/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"ecumene-software","id":6249465,"avatar_url":"https://avatars.githubusercontent.com/u/6249465?v=3","gravatar_id":"","url":"https://api.github.com/users/ecumene-software","html_url":"https://github.com/ecumene-software","followers_url":"https://api.github.com/users/ecumene-software/followers","following_url":"https://api.github.com/users/ecumene-software/following{/other_user}","gists_url":"https://api.github.com/users/ecumene-software/gists{/gist_id}","starred_url":"https://api.github.com/users/ecumene-software/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecumene-software/subscriptions","organizations_url":"https://api.github.com/users/ecumene-software/orgs","repos_url":"https://api.github.com/users/ecumene-software/repos","events_url":"https://api.github.com/users/ecumene-software/events{/privacy}","received_events_url":"https://api.github.com/users/ecumene-software/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2016-05-13T22:29:43Z","updated_at":"2016-05-13T22:58:58Z","closed_at":null,"body":"I have decided to implement joogle into a new project I'm working on, so I have written some basic code to manage a GLFWWindow.  The code is below, and once you start running it GLFWWindows start spamming on the screen.\r\n\r\n\tpackage dungeon;\r\n\t\r\n\timport org.lwjgl.opengl.GLContext;\r\n\t\r\n\timport joogl.SharedLibraryLoader;\r\n\timport joogl.glfw.GLFWWindow;\r\n\timport joogl.glfw.GLFWWindowContainer;\r\n\timport joogl.glfw.GLFWWindows;\r\n\t\r\n\t/**\r\n\t * @author Zach Goethel\r\n\t */\r\n\tpublic class Dungeon\r\n\t{\r\n\t\tpublic GLFWWindow window;\r\n\t\t\r\n\t\tpublic void setup()\r\n\t\t{\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tpublic void update()\r\n\t\t{\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tpublic void render()\r\n\t\t{\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tpublic void destroy()\r\n\t\t{\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tpublic static Dungeon dungeon;\r\n\t\t\r\n\t\tpublic static synchronized void setupGraphicsContext()\r\n\t\t{\r\n\t\t\tSharedLibraryLoader.load();\r\n\t\t\tGLFWWindows.init();\r\n\t\t}\r\n\t\t\r\n\t\tpublic static synchronized void destroyGraphicsContext()\r\n\t\t{\r\n\t\t\tGLFWWindows.terminate();\r\n\t\t}\r\n\t\t\r\n\t\tpublic static synchronized void setupGameLoop(Dungeon dungeon)\r\n\t\t{\r\n\t\t\tdungeon.window = new GLFWWindowContainer(GLFWWindows.createWindow(800, 450, \"Dungeon\", 0L, 0L));\r\n\t\t\tGLFWWindows.makeContextCurrent(dungeon.window);\r\n\t\t\tGLContext.createFromCurrent();\r\n\t\t\tdungeon.setup();\r\n\t\t}\r\n\t\t\r\n\t\tpublic static synchronized void destroyGameLoop(Dungeon dungeon)\r\n\t\t{\r\n\t\t\tdungeon.destroy();\r\n\t\t\t((GLFWWindowContainer)dungeon.window).destroy();\r\n\t\t}\r\n\t\t\r\n\t\tpublic static void beginGameLoop(Dungeon dungeon)\r\n\t\t{\r\n\t\t\tsetupGameLoop(dungeon);\r\n\t\t\t\r\n\t\t\twhile (!((GLFWWindowContainer)dungeon.window).shouldClose())\r\n\t\t\t{\r\n\t\t\t\tdungeon.update();\r\n\t\t\t\tGLFWWindows.makeContextCurrent(dungeon.window);\r\n\t\t\t\tdungeon.render();\r\n\t\t\t\t((GLFWWindowContainer)dungeon.window).swapBuffers();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdestroyGameLoop(dungeon);\r\n\t\t}\r\n\t\t\r\n\t\tpublic static void main(String[] args)\r\n\t\t{\r\n\t\t\tdungeon = new Dungeon();\r\n\t\t\tsetupGraphicsContext();\r\n\t\t\tbeginGameLoop(dungeon);\r\n\t\t\tdestroyGraphicsContext();\r\n\t\t}\r\n\t}\r\n"},"comment":{"url":"https://api.github.com/repos/team-joogl/joogl/issues/comments/219179130","html_url":"https://github.com/team-joogl/joogl/issues/6#issuecomment-219179130","issue_url":"https://api.github.com/repos/team-joogl/joogl/issues/6","id":219179130,"user":{"login":"zgoethel12","id":13502112,"avatar_url":"https://avatars.githubusercontent.com/u/13502112?v=3","gravatar_id":"","url":"https://api.github.com/users/zgoethel12","html_url":"https://github.com/zgoethel12","followers_url":"https://api.github.com/users/zgoethel12/followers","following_url":"https://api.github.com/users/zgoethel12/following{/other_user}","gists_url":"https://api.github.com/users/zgoethel12/gists{/gist_id}","starred_url":"https://api.github.com/users/zgoethel12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zgoethel12/subscriptions","organizations_url":"https://api.github.com/users/zgoethel12/orgs","repos_url":"https://api.github.com/users/zgoethel12/repos","events_url":"https://api.github.com/users/zgoethel12/events{/privacy}","received_events_url":"https://api.github.com/users/zgoethel12/received_events","type":"User","site_admin":false},"created_at":"2016-05-13T22:58:58Z","updated_at":"2016-05-13T22:58:58Z","body":"Adding `GLFWWindows.defaultWindowHints();` directly after `dungeon.window = new GLFWWindowContainer(GLFWWindows.createWindow(800, 450, \"Dungeon\", 0L, 0L));` made no difference.  Perhaps I put it in the wrong place, or I'm missing an element completely, or there is really something wrong with the internals."}}