oops fix erro check.

SVN revision: 46234
This commit is contained in:
Carsten Haitzler 2010-02-17 04:30:58 +00:00
parent dc8fdf5e3a
commit c474d55267
2 changed files with 23 additions and 23 deletions

View File

@ -255,7 +255,7 @@ extern Evas_GL_Program_Source shader_yuv_vert_src;
extern Evas_GL_Program_Source shader_tex_frag_src;
extern Evas_GL_Program_Source shader_tex_vert_src;
void glerr(const char *file, const char *func, int line, const char *op);
void glerr(int err, const char *file, const char *func, int line, const char *op);
Evas_GL_Context *evas_gl_common_context_new(void);
void evas_gl_common_context_free(Evas_GL_Context *gc);
@ -343,7 +343,11 @@ void (*glsym_glDeleteFramebuffers) (GLsizei a, const GLuint *b);
#define GL_ERRORS 1
#ifdef GL_ERRORS
# define GLERR(fn, fl, ln, op) if (glGetError()) glerr(fn, fl, ln, op)
# define GLERR(fn, fl, ln, op) \
{ \
int __gl_err = glGetError(); \
if (__gl_err != GL_NO_ERROR) glerr(__gl_err, fn, fl, ln, op); \
}
#else
# define GLERR(fn, fl, ln, op)
#endif

View File

@ -53,10 +53,7 @@ static Evas_GL_Context *_evas_gl_common_context = NULL;
static Evas_GL_Shared *shared = NULL;
void
glerr(const char *file, const char *func, int line, const char *op)
{
GLenum err = glGetError();
if (err != GL_NO_ERROR)
glerr(int err, const char *file, const char *func, int line, const char *op)
{
fprintf(stderr, "GLERR: %s:%i %s(), %s: ", file, line, func, op);
switch (err)
@ -77,7 +74,6 @@ glerr(const char *file, const char *func, int line, const char *op)
fprintf(stderr, "0x%x\n", err);
}
}
}
static void
matrix_ident(GLfloat *m)