ofarukkalkan / powergl Goto Github PK
View Code? Open in Web Editor NEWPowerGL is a graphics engine implemented with C using OpenGL
License: GNU General Public License v3.0
PowerGL is a graphics engine implemented with C using OpenGL
License: GNU General Public License v3.0
STR03-C. Do not inadvertently truncate a string
which is better ?
: eger daha once allocate edilmis boyut yeterliyse yeniden allocation yapilmayacak
PowerGL/src/rendering/object.c
Line 427 in b8fc8c5
}
// merge colors
if(src->triangles.n_color > 0){
assert(src->triangles.color);
if(dest->triangles.n_color > 0 ){
assert(dest->triangles.color);
dest->triangles.color = powergl_resize(dest->triangles.color, src->triangles.n_color + dest->triangles.n_color , sizeof(powergl_vec3));
for(size_t i = dest->triangles.n_color, j = 0; j < src->triangles.n_color; i++, j++){
dest->triangles.color[i] = color;
}
dest->triangles.n_color += src->triangles.n_color;
dest->triangles.color_flag = 1;
} else {
// TODO : eger daha once allocate edilmis boyut yeterliyse yeniden allocation yapilmayacak
dest->triangles.color = powergl_resize(NULL, src->triangles.n_color, sizeof(powergl_vec3));
for(size_t i=0; i < src->triangles.n_color; i++){
dest->triangles.color[i] = color;
}
dest->triangles.n_color = src->triangles.n_color;
dest->triangles.color_flag = 1;
}
} else {
#if DEBUG_OUTPUT
fprintf(stderr, "geometry append failed, because color source is empty");
assert(0);
#endif
}
} else {
#if DEBUG_OUTPUT
fprintf(stderr, "geometry append failed, because vertex source is empty");
assert(0);
#endif
c779c8f66e5f09cf35d742570972975791bf7cec
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.