{"action":"created","issue":{"url":"https://api.github.com/repos/flyx/OpenGLAda/issues/25","repository_url":"https://api.github.com/repos/flyx/OpenGLAda","labels_url":"https://api.github.com/repos/flyx/OpenGLAda/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/flyx/OpenGLAda/issues/25/comments","events_url":"https://api.github.com/repos/flyx/OpenGLAda/issues/25/events","html_url":"https://github.com/flyx/OpenGLAda/issues/25","id":198207609,"number":25,"title":"Problem with Load_Empty_Texture","user":{"login":"rogermc2","id":12540410,"avatar_url":"https://avatars.githubusercontent.com/u/12540410?v=3","gravatar_id":"","url":"https://api.github.com/users/rogermc2","html_url":"https://github.com/rogermc2","followers_url":"https://api.github.com/users/rogermc2/followers","following_url":"https://api.github.com/users/rogermc2/following{/other_user}","gists_url":"https://api.github.com/users/rogermc2/gists{/gist_id}","starred_url":"https://api.github.com/users/rogermc2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogermc2/subscriptions","organizations_url":"https://api.github.com/users/rogermc2/orgs","repos_url":"https://api.github.com/users/rogermc2/repos","events_url":"https://api.github.com/users/rogermc2/events{/privacy}","received_events_url":"https://api.github.com/users/rogermc2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-31T00:04:59Z","updated_at":"2016-12-31T17:46:47Z","closed_at":null,"body":"I'm trying to implement\r\nglTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 1024, 768, 0, GL_RGB, GL_UNSIGNED_BYTE, 0);\r\nin which GL_UNSIGNED_BYTE specifies the data type of the pixel data (GL_RGB).\r\n\r\nTexture_2D.Load_Empty_Texture\r\n              (Level => 0, Internal_Format => GL.Pixels.RGB,\r\n               Width => 1024, Height => 768);\r\nraised GL.ERRORS.INTERNAL_ERROR : gl-raise_exception_on_opengl_error.adb:30\r\n\r\ngl-raise_exception_on_opengl_error.adb:30 indicates that INTERNAL_ERROR is due to an Invalid_Enum:\r\nwhen Errors.Invalid_Enum => raise Errors.Internal_Error;\r\n\r\nThe pixel data type specified by API.Tex_Image_2D is Pixels.Data_Type'First which appears to me to be Byte not Unsigned_Byte (Pixels.Data_Type second).\r\n\r\nMy investigations indicate that GL_RGB can take that values 0..255 indicating that pixel data type for RGB in this context should be Unsigned_Byte.\r\n\r\nIs this the problem?\r\nProbably not; I tried changing  Pixels.Data_Type'First to Pixels.Unsigned_Byte in GL.Objects.Textures.With_2D_Loader.Load_Empty_Texture's call to API.Tex_Image_2D  but the same error occurred.\r\nAs usual, am I misunderstanding something?"},"comment":{"url":"https://api.github.com/repos/flyx/OpenGLAda/issues/comments/269875303","html_url":"https://github.com/flyx/OpenGLAda/issues/25#issuecomment-269875303","issue_url":"https://api.github.com/repos/flyx/OpenGLAda/issues/25","id":269875303,"user":{"login":"flyx","id":791710,"avatar_url":"https://avatars.githubusercontent.com/u/791710?v=3","gravatar_id":"","url":"https://api.github.com/users/flyx","html_url":"https://github.com/flyx","followers_url":"https://api.github.com/users/flyx/followers","following_url":"https://api.github.com/users/flyx/following{/other_user}","gists_url":"https://api.github.com/users/flyx/gists{/gist_id}","starred_url":"https://api.github.com/users/flyx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flyx/subscriptions","organizations_url":"https://api.github.com/users/flyx/orgs","repos_url":"https://api.github.com/users/flyx/repos","events_url":"https://api.github.com/users/flyx/events{/privacy}","received_events_url":"https://api.github.com/users/flyx/received_events","type":"User","site_admin":false},"created_at":"2016-12-31T17:46:47Z","updated_at":"2016-12-31T17:46:47Z","body":"Yes, `glTexStorage2D` is indeed missing. I will add it after migrating to new runtime loading branch."}}
{"actor":{"display_login":"flyx"}}