Skip to content
master
Go to file
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
doc
Jul 6, 2015
pkg
Aug 21, 2017
src
Aug 25, 2017
Aug 21, 2017

README.md

gbox

The Graphic Box Library

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

文档

�?�系

You can’t perform that action at this time.