Introduction
gbox is a mutli-platform c graphic library.
It is now in the early stages of development only for reference and learning.
If you are interesting to this project, please view the source code.
Features
- Support 2d vector drawing
- Support matrix transform
- Support fill and stroke for solid, gradient and image
- Support custom path and drawing
- Support float and fixed point computation
- Provide custom drawing devices
- Support OpenGL ES 1.0/2.0
- Support soft algorithm for drawing
- Implement mesh structure and algorithm
- Implement complex polygon tessellator and triangulation
- Support odd and nonzero fill
- Implement polygon scanning algorithm
- Provide multi-platform windows(.e.g glut, sdl and x11, framebuffer, ios, android in the feature)
In the plans
- Draw svg images
- Implement anti-aliasing
- More drawing devices and windows
- Draw text
- Development ui and game engine
Build
please install xmake first: xmake
$ cd ./gbox
$ xmake
Run
$ xmake run core
Documents
Contacts
- Email:
- Website:
简介
GBOX是一个用cè¯è¨€å®žçŽ°çš„å¤šå¹³ï¿½?�图形库,支�?windows�?linux�?mac�?ios�?android以�?�其他嵌入�?系统。
现在这个项目,æ£å¤„于早期开�?�阶段,暂�?�??供使用,仅供�?�考å¦ä¹
如果您感兴趣,�?�以阅读�?�?
已实现的功能
- 矢�?2d渲染,支�?矩阵�?��?�,画刷�?画笔的设置和渲染
- 支�?�?�?�矢�?路径渲染和填充
- 支�?纯色填充�?梯度填充�?图�?填充(æ£åœ¨ï¿½?构)
- 支�?全定点或者浮点计算(�?��?置切�?�)
- 实现渲染设备扩展,目�?支�?gpuåŠ é€Ÿçš„opengl es 1.0/2.0设备�?纯算法渲染的bitmap设备
- 实现�?�?�多边形分割(三角形分割�?凸多边形分割),支�?奇�?�填充�?�?�零填充ç‰å¡«å……规则(这个算法花了我一年时间 =。=)
- 实现mesh结构和�?装
- 实现多边形扫�??算法
- 支�?多平�?�窗�?�扩展,目�?支�?glut�?sdl窗�?�,�?�ç»ä¼šæ”¯ï¿½?(x11,framebuffer, ios/android,windowsç‰åŽŸç”Ÿçª—ï¿½?�)
�?�ç»å·¥ä½œ
- svg矢�?图形渲染(之�?的版本实现过一整套,最近æ£åœ¨ï¿½?构,所以暂时移除了)
- �??èµ°æ ·æ”¯ï¿½?
- 实现更多平�?�窗�?�和渲染设备
- 实现å—体渲染
- ui框架的实现
- 有时间的�?,�?整整游�?引擎,当然这个是�?��?,看心情和时间了。
测试效果
- 目�?基于opengl的渲染设备,绘制tiger.svg�?�达到60fps
- 基于bitmap的纯算法渲染设备,绘制tiger.svg�?�达到30-40fps(pc上测试,数�?�仅供�?�考)
编译
请先安装: xmake
cd ./gbox
xmake
�?行
$ xmake run core
文档
�?�系
- Email:
- Website: