success = compile_shader(ctx, &obj, type, &info_log, shader);
- if (success && !info_log.text) {
-#if 0
- slang_create_uniforms(&object->expdata, shader);
- _mesa_print_program(program);
- _mesa_print_program_parameters(ctx, program);
-#endif
- }
- else {
+ if (!success || info_log.error_flag) {
success = GL_FALSE;
- /* XXX more work on info log needed here */
+ /* copy info-log string to shader object */
if (info_log.text) {
if (shader->InfoLog) {
free(shader->InfoLog);
slang_info_log_construct(slang_info_log * log)
{
log->text = NULL;
- log->dont_free_text = 0;
+ log->dont_free_text = GL_FALSE;
+ log->error_flag = GL_FALSE;
}
void
va_start(va, msg);
_mesa_vsprintf(buf, msg, va);
va_end(va);
+ log->error_flag = GL_TRUE;
if (slang_info_log_message(log, "Error", buf))
return 1;
slang_info_log_memory(log);
slang_info_log_memory(slang_info_log * log)
{
if (!slang_info_log_message(log, "Error", "Out of memory.")) {
- log->dont_free_text = 1;
+ log->dont_free_text = GL_TRUE;
+ log->error_flag = GL_TRUE;
log->text = out_of_memory;
}
}