Convert printf_* in opengl.h
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
24dd8ee120
commit
d8198926dc
12
src/opengl.h
12
src/opengl.h
|
@ -50,14 +50,14 @@ glx_check_err_(session_t *ps, const char *func, int line) {
|
|||
GLenum err = GL_NO_ERROR;
|
||||
|
||||
while (GL_NO_ERROR != (err = glGetError())) {
|
||||
print_timestamp(ps);
|
||||
printf("%s():%d: GLX error ", func, line);
|
||||
const char *errtext = glx_dump_err_str(err);
|
||||
if (errtext) {
|
||||
printf_dbg("%s\n", errtext);
|
||||
log_printf(tls_logger, LOG_LEVEL_ERROR, func, "GLX error at line %d: %s", line,
|
||||
errtext);
|
||||
}
|
||||
else {
|
||||
printf_dbg("%d\n", err);
|
||||
log_printf(tls_logger, LOG_LEVEL_ERROR, func, "GLX error at line %d: %d", line,
|
||||
err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -114,13 +114,13 @@ static inline bool
|
|||
glx_hasglext(session_t *ps, const char *ext) {
|
||||
const char *gl_exts = (const char *) glGetString(GL_EXTENSIONS);
|
||||
if (!gl_exts) {
|
||||
printf_errf("(): Failed get GL extension list.");
|
||||
log_error("Failed get GL extension list.");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool found = wd_is_in_str(gl_exts, ext);
|
||||
if (!found)
|
||||
printf_errf("(): Missing GL extension %s.", ext);
|
||||
log_info("Missing GL extension %s.", ext);
|
||||
|
||||
return found;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue