{"id":18694707,"url":"https://github.com/resolvedxd/kittylib","last_synced_at":"2025-11-08T11:30:50.213Z","repository":{"id":180337032,"uuid":"562565712","full_name":"resolvedxd/kittylib","owner":"resolvedxd","description":"C++ graphics library with a focus on ease of use for making games","archived":false,"fork":false,"pushed_at":"2022-11-10T00:05:18.000Z","size":149,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-28T03:16:13.256Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/resolvedxd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-11-06T18:34:27.000Z","updated_at":"2023-09-17T20:30:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"427541ca-4385-4a70-b587-567f4e50e607","html_url":"https://github.com/resolvedxd/kittylib","commit_stats":null,"previous_names":["resolvedxd/kittylib"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resolvedxd%2Fkittylib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resolvedxd%2Fkittylib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resolvedxd%2Fkittylib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resolvedxd%2Fkittylib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/resolvedxd","download_url":"https://codeload.github.com/resolvedxd/kittylib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239552609,"owners_count":19657945,"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":[],"created_at":"2024-11-07T11:12:27.915Z","updated_at":"2025-02-18T21:26:36.834Z","avatar_url":"https://github.com/resolvedxd.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kittylib - The cutest C++ graphics library\n**kitty** is a **C++** graphics library that provides a **simple** and **easy to use** API to create and render 2D graphics. The library is ~~cross-platform~~(not yet), **optimized for speed** and **memory efficiency**.\n\n## Examples\n### creating a window and rendering text to it\n```cpp\nkitty::os::create_window(\"Kittylib\", 800, 600);\nrenderer_t* renderer = new d3d9_renderer_t();\nfont_t* font = new font_t(\"C:\\\\Windows\\\\Fonts\\\\arial.ttf\", 25, renderer);\nwhile (kitty::os::should_run()) {\n  font-\u003erender(\"Hello World\", 0, 0, color_t(255, 255, 255, 255));\n}\n```\n### working with the color class\n```cpp\n// every way to initialize a color (conversions back and forth from these color models are supported)\ncolor_t color1(255, 0, 0);\ncolor_t color2 = color_t::red();\ncolor_t color3 = color_t::from_hex_str(\"#FF0000\");\ncolor_t color4 = colot_t::from_hsl(313, 1, 0.81);\ncolor_t color5 = colot_t::from_hsv(313, 0.38, 1.0);\n\n// calculate a color's luma\nchar luma = color1.luma();\n\n// interpolate between two colors\ncolor_t color6 = color2.lerp(color4, 0.5);\n```\n### off-screen rendering\n```cpp\n// create a texture\ntexture_t* texture = new texture_t(100, 100, renderer);\nrenderer-\u003ebegin_texture(texture); \n  // render stuff to the texture\n  renderer-\u003ecircle_filled(0, 0, 100, color_t::white());\n  font-\u003erender(\"Hi\", 50, 50, color_t::white());\nrenderer-\u003eend_texture();\n\n// now we can use the texture we rendered to as a sprite etc.\nrenderer-\u003erect_textured(0, 0, texture);\n```\n### and many more features, such as: \n- **2D shapes** (rectangles, circles, triangles, lines, polygons, etc.)\n- **easy to use vector,matrice classes** and a math namespace for common operations (such as bezier, clamping, mapping, etc.)\n- **image loading** (png, jpg, bmp, etc.)\n- **OS message handling** (keyboard, mouse, etc.)\n- **and more! 🎉**\n\n## Wiki and documentation TBD\n\n# TODO\n- [x] D3D9 Renderer\n- [ ] OpenGL renderer\n- [x] Textures\n- [x] Font renderer\n- [ ] Free color_t conversion to UINT32\n- [x] Fix crashing when alot of frames are being rendered in a short period of time\n- [ ] Look into faster ways to calculate bezier curves\n- [ ] Add bezier function with 1 control point","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresolvedxd%2Fkittylib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fresolvedxd%2Fkittylib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresolvedxd%2Fkittylib/lists"}