{"action":"opened","issue":{"url":"https://api.github.com/repos/bkaradzic/bgfx/issues/409","labels_url":"https://api.github.com/repos/bkaradzic/bgfx/issues/409/labels{/name}","comments_url":"https://api.github.com/repos/bkaradzic/bgfx/issues/409/comments","events_url":"https://api.github.com/repos/bkaradzic/bgfx/issues/409/events","html_url":"https://github.com/bkaradzic/bgfx/issues/409","id":82915308,"number":409,"title":"bgfx not rendering anything with OpenGL 2.1+ and GLFW","user":{"login":"UberLambda","id":7994377,"avatar_url":"https://avatars.githubusercontent.com/u/7994377?v=3","gravatar_id":"","url":"https://api.github.com/users/UberLambda","html_url":"https://github.com/UberLambda","followers_url":"https://api.github.com/users/UberLambda/followers","following_url":"https://api.github.com/users/UberLambda/following{/other_user}","gists_url":"https://api.github.com/users/UberLambda/gists{/gist_id}","starred_url":"https://api.github.com/users/UberLambda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UberLambda/subscriptions","organizations_url":"https://api.github.com/users/UberLambda/orgs","repos_url":"https://api.github.com/users/UberLambda/repos","events_url":"https://api.github.com/users/UberLambda/events{/privacy}","received_events_url":"https://api.github.com/users/UberLambda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-30T21:19:08Z","updated_at":"2015-05-30T21:19:08Z","closed_at":null,"body":"The following code opens a GLFW window, but the screen stays black - while I'd think it should display a blueish background with the debug text \"Test text\" over it.\r\n\r\n```C++\r\n#include <GLFW/glfw3.h>\r\n#include <bgfxplatform.h>\r\n#include <bgfx.h>\r\n#include <cstdio>\r\n\r\nstatic GLFWwindow* win = NULL;\r\n\r\nstatic int glfwUpdate() {\r\n    glfwPollEvents();\r\n\r\n    return !glfwWindowShouldClose(win);\r\n}\r\n\r\nstatic void glfwErrorCallback(int error, const char* description) {\r\n    fprintf(stderr, \"GLFW error %i: %s\\n\", error, description);\r\n}\r\n\r\nvoid init() {\r\n\r\n    glfwSetErrorCallback(glfwErrorCallback);\r\n    glfwInit();\r\n\r\n    glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_API);\r\n    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);\r\n    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);\r\n    glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_ANY_PROFILE);\r\n\r\n    win = glfwCreateWindow(800, 600, \"Test application\", NULL, NULL);\r\n    glfwMakeContextCurrent(win);\r\n\r\n    bgfx::glfwSetWindow(win);\r\n\r\n    int width, height;\r\n    glfwGetWindowSize(win, &width, &height);\r\n\r\n    bgfx::init();\r\n    bgfx::reset(width, height, BGFX_RESET_VSYNC);\r\n\r\n    printf(\"bgfx renderer is %s\\n\", bgfx::getRendererName(bgfx::getRendererType()));\r\n\r\n    // Enable debug text.\r\n    bgfx::setDebug(BGFX_DEBUG_TEXT);\r\n\r\n    // Set view 0 clear state.\r\n    bgfx::setViewClear(0, BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH, 0x3070F0FF);\r\n\r\n    printf(\"Starting main loop...\\n\");\r\n\r\n    while(glfwUpdate()) {\r\n\r\n        int width, height;\r\n        glfwGetWindowSize(win, &width, &height);\r\n        bgfx::setViewRect(0, 0, 0, width, height);\r\n\r\n        // Dummy submit call to make sure view 0 is cleared\r\n        bgfx::submit(0);\r\n\r\n        bgfx::dbgTextClear();\r\n        bgfx::dbgTextPrintf(0, 1, 0x4f, \"Test text\");\r\n\r\n        bgfx::frame();\r\n    }\r\n}\r\n\r\nvoid halt() {\r\n\r\n    printf(\"Application halting\\n\");\r\n\r\n    bgfx::shutdown();\r\n    glfwTerminate();\r\n}\r\n```\r\nI'm currently on Linux x64.\r\n\r\nAm I doing something wrong, or is my setup incorrect in any way?"}}