{"id":18058202,"url":"https://github.com/generaloss/jpize-core","last_synced_at":"2025-08-29T17:38:28.811Z","repository":{"id":258221777,"uuid":"859960282","full_name":"generaloss/jpize-core","owner":"generaloss","description":"OpenGL Graphics Library","archived":false,"fork":false,"pushed_at":"2025-08-10T18:46:05.000Z","size":96693,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-19T02:45:10.775Z","etag":null,"topics":["graphics-library","opengl"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/generaloss.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,"zenodo":null}},"created_at":"2024-09-19T15:14:33.000Z","updated_at":"2025-08-10T18:46:08.000Z","dependencies_parsed_at":"2024-11-09T13:25:21.536Z","dependency_job_id":"576bb8ca-fb5a-4554-81fb-2bdad36c79a0","html_url":"https://github.com/generaloss/jpize-core","commit_stats":null,"previous_names":["generaloss/jpize-core"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/generaloss/jpize-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generaloss%2Fjpize-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generaloss%2Fjpize-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generaloss%2Fjpize-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generaloss%2Fjpize-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/generaloss","download_url":"https://codeload.github.com/generaloss/jpize-core/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/generaloss%2Fjpize-core/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272733231,"owners_count":24984260,"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","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"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":["graphics-library","opengl"],"created_at":"2024-10-31T03:05:34.641Z","updated_at":"2025-08-29T17:38:28.802Z","avatar_url":"https://github.com/generaloss.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Core Module](https://github.com/generaloss/jpize-core)\n![jpize](logo.svg)\n\n[![Maven Central](https://img.shields.io/maven-central/v/io.github.generaloss/jpize-core.svg)](https://mvnrepository.com/artifact/io.github.generaloss/jpize-core)\n\n---\n\nJava version: 17 +\n\n## Examples\n\n#### 1. Application\n``` java\npublic class MyApp extends JpizeApplication {\n\n    public static void main(String[] args) {\n        // create window context\n        Jpize.create(1280, 720, \"Window Title\")\n            .icon(\"/icon.png\")\n            .build().setApp(new MyApp());\n        \n        // run created contexts\n        Jpize.run();\n    }\n    \n    public MyApp() { } // constructor calls before init()\n    \n    @Override\n    public void init() { } // init() calls after Jpize.run();\n    \n    @Override\n    public void update() { } // update loop\n    \n    @Override\n    public void render() { } // render loop\n    \n    @Override\n    public void resize(int width, int height) { } // calls when window resizes\n    \n    @Override\n    public void dispose() { } // exit app\n    \n}\n```\n\n#### 2. 2D Graphics:\n``` java\nTextureBatch batch = new TextureBatch(); // canvas for textures\nTexture2D texture = new Texture2D(\"/texture.png\");\n\nGL.clearColorBuffer();\nbatch.setup();\n\n// rotate, shear and scale for subsequent textures\nbatch.rotate(angle);\nbatch.shear(angle_x, angle_y);\nbatch.scale(scale);\n// draw texture\nbatch.draw(texture, x, y, width, height);\n// draw rectangle\nbatch.drawRect(x, y,  width, height,  color);\nbatch.drawRect(x, y,  width, height,  r, g, b, a);\nbatch.drawRect(x, y,  width, height,  r, g, b);\nbatch.drawRect(x, y,  width, height,  alpha);\n\nbatch.render();\n```\n\n#### 3. Fonts:\n``` java\n// load\nFont font = new Font().loadDefault();\nFont font = new Font().loadFnt(path_or_resource, linearFilter);\nFont font = new Font().loadTrueType(path_or_resource, size, charset, linearFilter);\n\n// options\nFontRenderOptions options = font.getRenderOptions();\n\noptions.enableCullLines(0F, Jpize.getHeight());\noptions.color().set(0.95, 0.95, 0.93);\noptions.scale().set(1.5F);\noptions.setRotation(45F);\noptions.setItalicAngle(15F);\noptions.setInvLineWrap(true);\n\n// bounds\nfloat width = font.getTextWidth(line);\nfloat height = font.getTextHeight(text);\nVec2f bounds = font.getTextBounds(text);\n\n// render\nfont.drawText(text, x, y);\nfont.drawText(batch, text, x, y);\nIterable\u003cGlyphSprite\u003e iterable = font.iterable(text);\n```\n\n#### 4. Input:\n``` java\n// mouse position\nJpize.getX()  \nJpize.getY()\n\n// scrolling\nJpize.getScroll() \n\n// mouse buttons\nMouseBtn.LEFT.down()     \nMouseBtn.RIGHT.pressed()\nMouseBtn.MIDDLE.up()\n\n// keys\nKey.ENTER.pressed()\nKey.ESCAPE.down()\nKey.SPACE.up()\n\n// window\nJpize.getWidth()\nJpize.getHeight()\n\n// FPS \u0026 Delta Time\nJpize.getFPS()\nJpize.getDeltaTime()\n```\n\n---\n\n## Used libs:\n* *[LWJGL3](https://github.com/LWJGL/lwjgl3)* (GLFW, OpenGL, STB)\n* *[Jpize-Utils](https://github.com/generaloss/jpize-utils)*\n\n\n---\n\n## Bugs and Feedback\nFor bugs, questions and discussions please use the [GitHub Issues](https://github.com/generaloss/jpize-core/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeneraloss%2Fjpize-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeneraloss%2Fjpize-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeneraloss%2Fjpize-core/lists"}