Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions demos/ansi.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,10 @@ ansi_to_markup( char *sequence, size_t length, markup_t *markup )
else if( (set_fg == 0) && (code == 5) )
{
set_fg = 1;
code = 0;
}
else if( (set_bg == 0) && (code == 5) )
{
set_bg = 1;
code = 0;
}
/* Set fg color (30 + x, where x is the index of the color) */
else if( (code >= 30) && (code < 38 ) )
Expand Down Expand Up @@ -210,7 +208,6 @@ print( text_buffer_t * buffer, vec2 * pen,
{
char *seq_start = text, *seq_end = text;
char *p;
size_t i;
for( p=text; p<(text+strlen(text)); ++p )
{
char *start = strstr( p, "\033[" );
Expand Down
4 changes: 3 additions & 1 deletion demos/distance-field-3.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,15 +305,17 @@ void display( GLFWwindow* window )
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );

texture_glyph_t * glyph = texture_font_get_glyph( font, "@");
/* texture_glyph_t * glyph = texture_font_get_glyph( font, "@"); */

int width, height;
glfwGetFramebufferSize( window, &width, &height );

/*
float glyph_height = glyph->height * width/(float)glyph->width;
float glyph_width = glyph->width * height/(float)glyph->height;
int x = -glyph_width/2 + width/2.;
int y = -glyph_height/2 + height/2.;
*/

float s = .025+.975*(1+cos(angle/100.0))/2.;

Expand Down
2 changes: 1 addition & 1 deletion demos/shader.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ shader_read( const char *filename )
fseek( file, 0, SEEK_END );
size = ftell( file );
fseek(file, 0, SEEK_SET );
buffer = (char *) malloc( (size+1) * sizeof( char *) );
buffer = (char *) malloc( (size+1) * sizeof( char ) );
fread( buffer, sizeof(char), size, file );
buffer[size] = 0;
fclose( file );
Expand Down
4 changes: 2 additions & 2 deletions edtaa3func.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
*/
void computegradient(double *img, int w, int h, double *gx, double *gy)
{
int i,j,k,p,q;
double glength, phi, phiscaled, ascaled, errsign, pfrac, qfrac, err0, err1, err;
int i,j,k;
double glength;
#define SQRT2 1.4142136
for(i = 1; i < h-1; i++) { // Avoid edges where the kernels would spill over
for(j = 1; j < w-1; j++) {
Expand Down
2 changes: 2 additions & 0 deletions opengl.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
# else
# include <GLES2/gl2.h>
# endif
#elif defined(FREETYPE_GL_ES2_HEADER_ONLY)
# include <GLES2/gl2.h>
#else
#if defined(FREETYPE_GL_USE_GLEW)
# include <GL/glew.h>
Expand Down
1 change: 0 additions & 1 deletion texture-atlas.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ texture_atlas_fit( texture_atlas_t * self,
{
return -1;
}
y = node->y;
while( width_left > 0 )
{
node = (ivec3 *) (vector_get( self->nodes, i ));
Expand Down
2 changes: 0 additions & 2 deletions texture-font.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,6 @@ texture_font_load_glyph_gi( texture_font_t * self,
size_t i, x, y;

FT_Error error;
FT_Face face;
FT_Glyph ft_glyph = NULL;
FT_GlyphSlot slot;
FT_Bitmap ft_bitmap;
Expand All @@ -826,7 +825,6 @@ texture_font_load_glyph_gi( texture_font_t * self,
int ft_glyph_left = 0;

ivec4 region;
size_t missed = 0;

/* Check if codepoint has been already loaded */
if (texture_font_find_glyph_gi(self, ucodepoint)) {
Expand Down
2 changes: 1 addition & 1 deletion vertex-buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ vertex_buffer_print( vertex_buffer_t * self )

assert(self);

log_error( "%ld vertices, %ld indices\n",
log_error( "%zd vertices, %zd indices\n",
vector_size( self->vertices ), vector_size( self->indices ) );
while( self->attributes[i] )
{
Expand Down