daokoder / daographics Goto Github PK
View Code? Open in Web Editor NEWDao Graphics Engine
License: Other
Dao Graphics Engine
License: Other
The following popped in my mind when I saw the comment rendering cubic bezier curves
in the source code. There are running projects for low-level graphical pipeline optimization and high-performance vector graphics computation on CPU.
http://kobalicek.com/cpp.html
https://github.com/kobalicek/asmjit
https://github.com/blend2d
Both are written in C++ and the developer is really eager to work on them already few years. The performance and quality results are quite stunning. It might be worth taking a look at or even start using it. Btw once these projects get reasonably stable, he'll finally continue his work on SVG rendering library and a multiplatform GUI library (see http://kobalicek.com/ for more information).
In void DaoxRenderer_DrawTask( DaoxRenderer *self, DaoxDrawTask *drawtask )
, the variable j
is only declared, but not used.
The declaration of void DaoxPathStyle_Convert( DaoxPathStyle *self, int buffer[DAOX_MAX_DASH+4] )
, should be changed to void DaoxPathStyle_Convert( DaoxPathStyle *self, int buffer[DAOX_MAX_DASH+5] )
as everywhere else 5
is used for buffer size increase (in the function body, but also in the caller functions).
In source/dao_animation.c:53
, the variables scale
, rotate
, and translate
are unused.
In DaoxParticle* DaoxEmitter_AddParticle(...)
, there is
...
if( lifeSpan < 0.5*self->lifeSpan ) lifeSpan = 0.5*self->lifeSpan;
if( lifeSpan < 2.0*self->lifeSpan ) lifeSpan = 2.0*self->lifeSpan;
...
but it's semantically the same as the following (saving few instructions ;)):
...
if( lifeSpan < 2.0*self->lifeSpan ) lifeSpan = 2.0*self->lifeSpan;
...
or there is a typo and the line if( lifeSpan < 2.0*self->lifeSpan ) lifeSpan = 2.0*self->lifeSpan;
should become if( lifeSpan > 2.0*self->lifeSpan ) lifeSpan = 2.0*self->lifeSpan;
.
Just to make a public note.
cd DaoGraphics && make -f Makefile
make[3]: Entering directory '/home/test/dao/modules/DaoGraphics'
cd deps/glfw && make -f Makefile
make[4]: Entering directory '/home/test/dao/modules/DaoGraphics/deps/glfw'
cc -ggdb -O0 -DDEBUG -D_GLFW_HAS_DLOPEN=1 -D_GLFW_X11=1 -D_GLFW_GLX=1 -D_GLFW_USE_OPENGL=1 -Iinclude/ -Isrc/ -I/usr/include/GL/ -I/usr/include/GL/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -fPIC -c src/context.c -o DaoMake.Objs/context.c.33B2.o
cc -ggdb -O0 -DDEBUG -D_GLFW_HAS_DLOPEN=1 -D_GLFW_X11=1 -D_GLFW_GLX=1 -D_GLFW_USE_OPENGL=1 -Iinclude/ -Isrc/ -I/usr/include/GL/ -I/usr/include/GL/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -fPIC -c src/init.c -o DaoMake.Objs/init.c.33B2.o
cc -ggdb -O0 -DDEBUG -D_GLFW_HAS_DLOPEN=1 -D_GLFW_X11=1 -D_GLFW_GLX=1 -D_GLFW_USE_OPENGL=1 -Iinclude/ -Isrc/ -I/usr/include/GL/ -I/usr/include/GL/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -fPIC -c src/input.c -o DaoMake.Objs/input.c.33B2.o
cc -ggdb -O0 -DDEBUG -D_GLFW_HAS_DLOPEN=1 -D_GLFW_X11=1 -D_GLFW_GLX=1 -D_GLFW_USE_OPENGL=1 -Iinclude/ -Isrc/ -I/usr/include/GL/ -I/usr/include/GL/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -fPIC -c src/monitor.c -o DaoMake.Objs/monitor.c.33B2.o
cc -ggdb -O0 -DDEBUG -D_GLFW_HAS_DLOPEN=1 -D_GLFW_X11=1 -D_GLFW_GLX=1 -D_GLFW_USE_OPENGL=1 -Iinclude/ -Isrc/ -I/usr/include/GL/ -I/usr/include/GL/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -fPIC -c src/window.c -o DaoMake.Objs/window.c.33B2.o
cc -ggdb -O0 -DDEBUG -D_GLFW_HAS_DLOPEN=1 -D_GLFW_X11=1 -D_GLFW_GLX=1 -D_GLFW_USE_OPENGL=1 -Iinclude/ -Isrc/ -I/usr/include/GL/ -I/usr/include/GL/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -fPIC -c src/x11_init.c -o DaoMake.Objs/x11_init.c.33B2.o
cc -ggdb -O0 -DDEBUG -D_GLFW_HAS_DLOPEN=1 -D_GLFW_X11=1 -D_GLFW_GLX=1 -D_GLFW_USE_OPENGL=1 -Iinclude/ -Isrc/ -I/usr/include/GL/ -I/usr/include/GL/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -fPIC -c src/x11_monitor.c -o DaoMake.Objs/x11_monitor.c.33B2.o
cc -ggdb -O0 -DDEBUG -D_GLFW_HAS_DLOPEN=1 -D_GLFW_X11=1 -D_GLFW_GLX=1 -D_GLFW_USE_OPENGL=1 -Iinclude/ -Isrc/ -I/usr/include/GL/ -I/usr/include/GL/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -fPIC -c src/x11_window.c -o DaoMake.Objs/x11_window.c.33B2.o
cc -ggdb -O0 -DDEBUG -D_GLFW_HAS_DLOPEN=1 -D_GLFW_X11=1 -D_GLFW_GLX=1 -D_GLFW_USE_OPENGL=1 -Iinclude/ -Isrc/ -I/usr/include/GL/ -I/usr/include/GL/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -fPIC -c src/xkb_unicode.c -o DaoMake.Objs/xkb_unicode.c.33B2.o
cc -ggdb -O0 -DDEBUG -D_GLFW_HAS_DLOPEN=1 -D_GLFW_X11=1 -D_GLFW_GLX=1 -D_GLFW_USE_OPENGL=1 -Iinclude/ -Isrc/ -I/usr/include/GL/ -I/usr/include/GL/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -fPIC -c src/linux_joystick.c -o DaoMake.Objs/linux_joystick.c.33B2.o
cc -ggdb -O0 -DDEBUG -D_GLFW_HAS_DLOPEN=1 -D_GLFW_X11=1 -D_GLFW_GLX=1 -D_GLFW_USE_OPENGL=1 -Iinclude/ -Isrc/ -I/usr/include/GL/ -I/usr/include/GL/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -fPIC -c src/posix_time.c -o DaoMake.Objs/posix_time.c.33B2.o
cc -ggdb -O0 -DDEBUG -D_GLFW_HAS_DLOPEN=1 -D_GLFW_X11=1 -D_GLFW_GLX=1 -D_GLFW_USE_OPENGL=1 -Iinclude/ -Isrc/ -I/usr/include/GL/ -I/usr/include/GL/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -fPIC -c src/posix_tls.c -o DaoMake.Objs/posix_tls.c.33B2.o
cc -ggdb -O0 -DDEBUG -D_GLFW_HAS_DLOPEN=1 -D_GLFW_X11=1 -D_GLFW_GLX=1 -D_GLFW_USE_OPENGL=1 -Iinclude/ -Isrc/ -I/usr/include/GL/ -I/usr/include/GL/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -fPIC -c src/glx_context.c -o DaoMake.Objs/glx_context.c.33B2.o
ar rcs libglfw.a DaoMake.Objs/context.c.33B2.o DaoMake.Objs/init.c.33B2.o DaoMake.Objs/input.c.33B2.o DaoMake.Objs/monitor.c.33B2.o DaoMake.Objs/window.c.33B2.o DaoMake.Objs/x11_init.c.33B2.o DaoMake.Objs/x11_monitor.c.33B2.o DaoMake.Objs/x11_window.c.33B2.o DaoMake.Objs/xkb_unicode.c.33B2.o DaoMake.Objs/linux_joystick.c.33B2.o DaoMake.Objs/posix_time.c.33B2.o DaoMake.Objs/posix_tls.c.33B2.o DaoMake.Objs/glx_context.c.33B2.o
make[4]: Leaving directory '/home/test/dao/modules/DaoGraphics/deps/glfw'
cc -ggdb -O0 -DDEBUG -DDAO_WITH_NUMARRAY -DDAO_WITH_DECORATOR -DDAO_WITH_THREAD -DDAO_WITH_CONCURRENT -DTARGET_PLAT=\"linux\" -DLINUX=2 -DUNIX=1 -D_GLFW_HAS_DLOPEN=1 -D_GLFW_X11=1 -D_GLFW_GLX=1 -D_GLFW_USE_OPENGL=1 -I../../kernel/ -Ideps/glfw/include/ -Ideps/glfw/src/ -I/usr/include/GL/ -I/usr/include/GL/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/GL/ -I../image/source/ -Ideps/glfw/include/ -fPIC -fPIC -c source/dao_common.c -o DaoMake.Objs/dao_common.c.7662.o
cc -ggdb -O0 -DDEBUG -DDAO_WITH_NUMARRAY -DDAO_WITH_DECORATOR -DDAO_WITH_THREAD -DDAO_WITH_CONCURRENT -DTARGET_PLAT=\"linux\" -DLINUX=2 -DUNIX=1 -D_GLFW_HAS_DLOPEN=1 -D_GLFW_X11=1 -D_GLFW_GLX=1 -D_GLFW_USE_OPENGL=1 -I../../kernel/ -Ideps/glfw/include/ -Ideps/glfw/src/ -I/usr/include/GL/ -I/usr/include/GL/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/GL/ -I../image/source/ -Ideps/glfw/include/ -fPIC -fPIC -c source/dao_font.c -o DaoMake.Objs/dao_font.c.7662.o
cc -ggdb -O0 -DDEBUG -DDAO_WITH_NUMARRAY -DDAO_WITH_DECORATOR -DDAO_WITH_THREAD -DDAO_WITH_CONCURRENT -DTARGET_PLAT=\"linux\" -DLINUX=2 -DUNIX=1 -D_GLFW_HAS_DLOPEN=1 -D_GLFW_X11=1 -D_GLFW_GLX=1 -D_GLFW_USE_OPENGL=1 -I../../kernel/ -Ideps/glfw/include/ -Ideps/glfw/src/ -I/usr/include/GL/ -I/usr/include/GL/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/X11/ -I/usr/include/GL/ -I../image/source/ -Ideps/glfw/include/ -fPIC -fPIC -c source/dao_path.c -o DaoMake.Objs/dao_path.c.7662.o
In file included from source/dao_canvas.h:45:0,
from source/dao_path.c:32:
source/dao_scene.h:341:2: error: unknown type name ‘DaoRandGenerator’
DaoRandGenerator *randGenerator;
^
Makefile:66: recipe for target 'DaoMake.Objs/dao_path.c.7662.o' failed
make[3]: *** [DaoMake.Objs/dao_path.c.7662.o] Error 1
make[3]: Leaving directory '/home/test/dao/modules/DaoGraphics'
Makefile:121: recipe for target 'Graphics' failed
make[2]: *** [Graphics] Error 2
make[2]: Leaving directory '/home/test/dao/modules'
Makefile:177: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
make[1]: Leaving directory '/home/test/dao'
Makefile.daomake:45: recipe for target 'linux' failed
make: *** [linux] Error 2
==> ERROR: A failure occurred in build().
Aborting...
...
source/dao_opengl.c: In function ‘DaoxBuffer_MapVertices’:
source/dao_opengl.c:1207:2: warning: return makes pointer from integer without a cast
return glMapBufferRange( GL_ARRAY_BUFFER, self->vertexOffset*self->vertexSize, dataSize, GL_MAP_WRITE_BIT|GL_MAP_UNSYNCHRONIZED_BIT|GL_MAP_INVALIDATE_BUFFER_BIT );
^
source/dao_opengl.c: In function ‘DaoxBuffer_MapTriangles’:
source/dao_opengl.c:1230:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
return (DaoGLTriangle*) glMapBufferRange( GL_ELEMENT_ARRAY_BUFFER, self->triangleOffset*self->triangleSize, dataSize, GL_MAP_WRITE_BIT|GL_MAP_UNSYNCHRONIZED_BIT|GL_MAP_INVALIDATE_BUFFER_BIT );
^
...
make[3]: Leaving directory '/home/test/dao/modules/DaoGraphics'
cd DaoOpenGL && make -f Makefile
...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.