{"id":23086242,"url":"https://github.com/alexandersilvab/basicgl","last_synced_at":"2026-05-01T14:33:18.482Z","repository":{"id":126210850,"uuid":"160000627","full_name":"AlexanderSilvaB/BasicGL","owner":"AlexanderSilvaB","description":"This is a simple framework which allows to create simple OpenGL apps without much code ","archived":false,"fork":false,"pushed_at":"2022-05-02T03:55:50.000Z","size":2132,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T15:48:03.124Z","etag":null,"topics":["cpp","drawing","glut","opengl","opengl-viewer","plot"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlexanderSilvaB.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-02T00:43:16.000Z","updated_at":"2023-11-15T01:50:00.000Z","dependencies_parsed_at":"2023-08-14T13:48:55.456Z","dependency_job_id":null,"html_url":"https://github.com/AlexanderSilvaB/BasicGL","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AlexanderSilvaB/BasicGL","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexanderSilvaB%2FBasicGL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexanderSilvaB%2FBasicGL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexanderSilvaB%2FBasicGL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexanderSilvaB%2FBasicGL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexanderSilvaB","download_url":"https://codeload.github.com/AlexanderSilvaB/BasicGL/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexanderSilvaB%2FBasicGL/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32501399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cpp","drawing","glut","opengl","opengl-viewer","plot"],"created_at":"2024-12-16T18:42:37.902Z","updated_at":"2026-05-01T14:33:18.463Z","avatar_url":"https://github.com/AlexanderSilvaB.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BasicGL\n[![Build Status](https://travis-ci.com/AlexanderSilvaB/BasicGL.svg?branch=master)](https://travis-ci.com/AlexanderSilvaB/BasicGL)\n\nThis is a simple framework which allows to create simple OpenGL apps without much code \n\n## Examples\n| | |\n|-|-|\n| Creates a simple triangle: [triangle.cpp](src/examples/triangle.cpp) | Creates an arbitrary shape: [heart.cpp](src/examples/heart.cpp) |\n| ![Triangle example](docs/images/triangle.PNG?raw=true \"Triangle\") | ![Heart example](docs/images/heart.PNG?raw=true \"Heart\") |\n| Uses the plotting capabilities: [plot.cpp](src/examples/plot.cpp) | Container element: [snowman.cpp](src/examples/snowman.cpp) |\n| ![Plot example](docs/images/plot.PNG?raw=true \"Plot\") | ![Snowman example](docs/images/snowman.PNG?raw=true \"Snowman\") |\n| Draw with mouse and keyboard: [paint.cpp](src/examples/paint.cpp) | OBJ files viewer: [viewer.cpp](src/examples/viewer.cpp) |\n| ![Paint example](docs/images/paint.PNG?raw=true \"Paint\") | ![Viewer example](docs/images/viewer.PNG?raw=true \"Viewer\") |\n\n## Features\n* Windows\n* Camera control\n* Cartesian and OpenGL modes (Y inverted)\n* Keyboard and Mouse support\n* 2D and 3D modes\n* Basic shapes (point, line, triangle, rectangle, circle, sphere, cone, cube, cylinder)\n* Complex 2D shapes (polygon, sequence, loop, connected triangles, connected rectangles, radial triangles )\n* Complex 3D shapes (polygon, teapot)\n* Container elements\n* Lighting\n* Text support\n* True Type fonts support\n* Data plotting\n* Automatic rainbow colors generation\n* Animations\n* Textures\n* Webcam/video to texture\n* Automatic texture maps generation\n* OBJ files\n* Rotate, translate and scale any element\n* Screen image/video capture\n\n\n## To-do\n- [ ] Android and iOS support\n- [ ] Better plot features\n\n## Example code\nThis simple code creates a rotating teapot\n```cpp\n// Includes the BasicGL library and the C++ standard math library (for M_PI)\n#include \u003cbasicgl/Manager.hpp\u003e\n#include \u003ccmath\u003e\n\n// Prevents from using BasicGL::\nusing namespace BasicGL;\n\n/** \n    Rotates the teapot at 2 x PI radians per second\n    @param elements: The list of elements of the current window\n    @param window: A pointer to the current window\n    @param ellapsedTime: The amount of seconds since the last call to this funcion \n*/\nvoid rotate(ElementsList elements, WindowPtr window, float ellasedTime)\n{\n    /* \n        Select the first element of the window.\n        As there's just one element (teapot), it will be the element of index = 0\n        The element can also be selected using the elements parameter (elements[0]) \n        or the find function of the window (window-\u003efind(\"teapot\"))\n    */\n    ElementPtr teapot = window-\u003eget(0);\n\n    // Rotates the teapot element around the Y axis (speed x time)\n    teapot-\u003erotate( 0, 2 * M_PI * ellasedTime, 0 );\n}\n\n\n// The begin of the program\nint main(int argc, char *argv[])\n{\n    // Initialize the BasicGL library\n    Manager::Init(argc, argv);\n\n    // Creates a new window in 3D mode named Teapot\n    Manager::CreateWindow(\"Teapot\", MODE_3D);\n\n    // Sets the rotate function as the animation function for the window\n    Manager::SetAnimationFunction(rotate);\n\n    // Creates a new element of type TEAPOT and also named teapot\n    Manager::CreateElement(TEAPOT, \"teapot\");\n\n    // Shows the window\n    Manager::Show();\n    \n    // Destroys all BasicGL resources\n    Manager::Destroy();\n\n    return 0;\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandersilvab%2Fbasicgl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexandersilvab%2Fbasicgl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandersilvab%2Fbasicgl/lists"}