{"id":21417239,"url":"https://github.com/galaco/gosigl","last_synced_at":"2025-07-14T04:32:49.007Z","repository":{"id":45488235,"uuid":"163434664","full_name":"Galaco/gosigl","owner":"Galaco","description":"Slightly opinionated Go module wrapper to simplify basic OpenGL usage","archived":false,"fork":false,"pushed_at":"2024-05-21T12:19:25.000Z","size":21,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-21T03:33:44.977Z","etag":null,"topics":["golang","opengl","texture2d","wrapper"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Galaco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-28T17:32:26.000Z","updated_at":"2023-11-05T10:27:18.000Z","dependencies_parsed_at":"2024-05-01T11:59:37.505Z","dependency_job_id":"8fc862b3-4171-4a24-b187-19ade4991884","html_url":"https://github.com/Galaco/gosigl","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Galaco%2Fgosigl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Galaco%2Fgosigl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Galaco%2Fgosigl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Galaco%2Fgosigl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Galaco","download_url":"https://codeload.github.com/Galaco/gosigl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225950756,"owners_count":17550309,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","opengl","texture2d","wrapper"],"created_at":"2024-11-22T19:14:07.415Z","updated_at":"2024-11-22T19:14:07.980Z","avatar_url":"https://github.com/Galaco.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gosigl\n\nGosigl (Go SImple openGL) is an somewhat opinionated Go wrapper for OpenGL with emphasis on simple. It's purpose is to make creating simple OpenGL programs really goddamn\neasy. It doesn't provide a whole lot of functionality, but it's really quick and simple to get a basic renderable\nworld up and running.\n\nIt provides simplified functions for creating textures, VAO and VBOs, and shader objects.\n\n\n#### Texture\nProvides functions for creating and binding Texture2D and Cube_Map_Textures.\nCreating and binding a Texture2D can be done as follows:\n```go\nbuf := gosigl.CreateTexture2D(\n\t\tgosigl.TextureSlot(0),   // Assign texture slot\n\t\twidth,                  // texture width\n\t\theight,                 // texture height\n\t\tpixelData,              // []byte raw colour data\n\t\tgosigl.RGB,              // colour data format\n\t\tfalse)                  // true = clamp to edge, false = repeat\ngosigl.BindTexture2D(gosigl.TextureSlot(0), buf)\n```\nCubemaps are very similar:\n```go\nbuf := gosigl.CreateTextureCubemap(\n\tgosigl.TextureSlot(0),   // Assign texture slot\n\twidth,                  // texture width\n    height,                 // texture height\n    pixelData,              // [6][]byte raw colour data\n    gosigl.RGB,              // colour data format\n\ttrue)\ngosigl.BindTextureCubemap(gosigl.TextureSlot(0), buf)\n```\n\n#### Mesh\nSimple methods are available for VBO and VAO generation, as follows:\n```go\nmesh := gosigl.NewMesh(vertices) // vertices = []float32\ngosigl.CreateVertexAttribute(mesh, uvs, 2) // uvs = []float32, 2 = numPerVertex\ngosigl.CreateVertexAttribute(mesh, normals, 3)\ngosigl.FinishMesh()\n```\n\nTo draw:\n```go\ngosigl.BindMesh(mesh)            // bind vbo\ngosigl.DrawArray(offset, length) // draw from bound\n```\n\nTo delete:\n```go\ngosigl.DeleteMesh(mesh)\n```\n\n#### Shader\n@Incomplete\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgalaco%2Fgosigl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgalaco%2Fgosigl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgalaco%2Fgosigl/lists"}