From e898c61921de714f54c472d1cffb8ddc46106b51 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 16 Mar 2023 14:46:05 +0100 Subject: [PATCH] improved glhr debugging --- glhr.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/glhr.cpp b/glhr.cpp index 70c409f8..bc577dad 100644 --- a/glhr.cpp +++ b/glhr.cpp @@ -208,6 +208,14 @@ EX glmatrix tmtogl(const transmatrix& T) { return tmp; } +EX transmatrix gltotm(const glmatrix& T) { + transmatrix tmp; + for(int i=0; i<4; i++) + for(int j=0; j<4; j++) + tmp[i][j] = T[i][j]; + return tmp; + } + EX glmatrix tmtogl_transpose(const transmatrix& T) { glmatrix tmp; for(int i=0; i<4; i++) @@ -266,7 +274,7 @@ EX glmatrix translate(ld x, ld y, ld z) { // /* shaders */ -glmatrix projection; +EX glmatrix projection; EX void new_projection() { WITHSHADER({ @@ -319,7 +327,7 @@ EX int compileShader(int type, const string& s) { GLint status; if(debug_gl) { - println(hlog, "===\n"); + println(hlog, "=== ", full_geometry_name(), " @ ", models::get_model_name(pmodel)); int lineno = 1; string cline = ""; for(char c: s+"\n") {