{"id":18270666,"url":"https://github.com/antonholmquist/rend-ios","last_synced_at":"2026-01-02T22:26:40.784Z","repository":{"id":3716141,"uuid":"4788242","full_name":"antonholmquist/rend-ios","owner":"antonholmquist","description":"A lightweight OpenGL ES 2.0 framework for iOS","archived":false,"fork":false,"pushed_at":"2013-06-02T12:25:43.000Z","size":608,"stargazers_count":168,"open_issues_count":5,"forks_count":23,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-11-05T11:53:04.691Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://antonholmquist.com","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antonholmquist.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.cocos2d","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-06-25T22:22:45.000Z","updated_at":"2024-03-14T21:06:39.000Z","dependencies_parsed_at":"2022-09-16T02:30:50.750Z","dependency_job_id":null,"html_url":"https://github.com/antonholmquist/rend-ios","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonholmquist%2Frend-ios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonholmquist%2Frend-ios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonholmquist%2Frend-ios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonholmquist%2Frend-ios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antonholmquist","download_url":"https://codeload.github.com/antonholmquist/rend-ios/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276042,"owners_count":20912285,"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-05T11:38:47.818Z","updated_at":"2026-01-02T22:26:40.721Z","avatar_url":"https://github.com/antonholmquist.png","language":"Objective-C","funding_links":[],"categories":["etc"],"sub_categories":[],"readme":"Rend - A lightweight OpenGL ES 2.0 framework for iOS\n====================\nAuthor: Anton Holmquist | http://antonholmquist.com\n\nRend is a very lightweight OpenGL ES 2.0 framework designed for pure rendering and to be easily integrated with UIKit. \n\nWhy another framework?\n--------------------\nRend is similar in some senses to Cocos2d/3d, but it's lighter and very flexible which may suit some kind of projects better. If you're writing a game you should probably look at Cocos or Unity, but if you want to create a rendering or interface component to be integrated into your UIKit-based project, this framework may be well suited!\n\nBackground\n--------------------\n\u003eWhen I was looking for a framework I looked at three existing options, Cocos2d, Cocos3d and Unity. None of those seemed perfect for my needs. Cocos2d obviously doesn’t have very good 3D support, Cocos3d didn't have shader support, and Unity seemed too bloated and hard to integrate with UIKit.\n\nThe full story can be found in [this blog post](http://antonholmquist.com/blog/introducing-rend-a-lightweight-objective-c-opengl-es-2-0-framework-ios/). \n\n\nExample usage\n--------------------\nThe first thing to do is to create a view where we can draw our content.\n\n    REGLView *view = [[REGLView alloc] initWithFrame:CGRectMake(0, 0, 320, 320)];\n    \n\nNext, we create a scene that acts as a root node in our scene graph hierarchy. All content should be added as children to this node.\n\n    REScene *scene = [[REScene alloc] init];\n\nNext, we create a director that is responsible for managing drawing and connecting the view and scene:\n\n    REDirector *director = [[REDirector alloc] init];\n    director.view = view;\n    director.scene = scene;\n    \nWe also need to attach a camera to our scene. The camera  requires some configuration so we place it at (0,0,1) facing at origo. This framework uses math functions from Cocos3d which is why you see the CC3 prefix.\n\n    RECamera *camera = [[RECamera alloc] initWithProjection:kRECameraProjectionPerspective];\n    camera.position = CC3VectorMake(0, 0, 1);\n    camera.upDirection = CC3VectorMake(0, 1, 0);\n    camera.lookDirection = CC3VectorMake(0, 0, -1);\n    camera.frustumLeft = -1;\n    camera.frustumRight = 1;\n    camera.frustumBottom = -1;\n    camera.frustumTop = 1;\n    camera.frustumNear = 0.5;\n    camera.frustumFar = 2;\n\n\nFinally, we add a sprite to our scene, positioning it at origo and setting width and height to 1.0. We also need to select a texture from the app bundle and add the node to our scene.\n\n    RESprite *sprite = [[RESprite alloc] init];\n    sprite.positon = CC3VectorMake(0.0, 0.0, 0.0);\n    sprite.size = CC3VectorMake(1.0, 1.0, 0.0);\n    sprite.texture = [RETexture2D textureNamed:@\"test.png\"];\n    [scene addChild:sprite];\n    \nNow everything is set up. The only thing left is to make the director run.\n\n    director.running = YES;\n    \nSo that's a very basic example on how to draw a sprite. There are some more advanced examples provided with the repository.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonholmquist%2Frend-ios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantonholmquist%2Frend-ios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonholmquist%2Frend-ios/lists"}