(Translated by https://www.hiragana.jp/)
GitHub - tboox/gbox: 🎨 A multi-platform graphic library
Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

tboox/gbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gbox

The Graphic Box Library

No longer maintained

See new project: lanox2d

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

简介

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

ぶん

联系