diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles2/shader_gles2.h | 5 | ||||
-rw-r--r-- | drivers/pnm/bitmap_loader_pnm.cpp | 7 | ||||
-rw-r--r-- | drivers/unix/os_unix.cpp | 4 |
3 files changed, 12 insertions, 4 deletions
diff --git a/drivers/gles2/shader_gles2.h b/drivers/gles2/shader_gles2.h index 51520cc9da..68ae8af63f 100644 --- a/drivers/gles2/shader_gles2.h +++ b/drivers/gles2/shader_gles2.h @@ -205,6 +205,11 @@ private: Plane val=p_value; glUniform4f( p_uniform, val.normal.x,val.normal.y,val.normal.z,val.d ); } break; + case Variant::QUAT: { + + Quat val=p_value; + glUniform4f( p_uniform, val.x,val.y,val.z,val.w ); + } break; case Variant::MATRIX32: { diff --git a/drivers/pnm/bitmap_loader_pnm.cpp b/drivers/pnm/bitmap_loader_pnm.cpp index 874e5977c1..c9298be26a 100644 --- a/drivers/pnm/bitmap_loader_pnm.cpp +++ b/drivers/pnm/bitmap_loader_pnm.cpp @@ -170,7 +170,7 @@ RES ResourceFormatPBM::load(const String &p_path,const String& p_original_path,E } DVector<uint8_t>::Read r=token.read(); - + for(int i=0;i<height;i++) { for(int j=0;j<width;j++) { @@ -194,11 +194,14 @@ RES ResourceFormatPBM::load(const String &p_path,const String& p_original_path,E } DVector<uint8_t>::Read r=token.read(); + int bitwidth = width; + if (bitwidth % 8) + bitwidth+=8-(bitwidth%8); for(int i=0;i<height;i++) { for(int j=0;j<width;j++) { - int ofs = width*i+j; + int ofs = bitwidth*i+j; uint8_t byte = r[ofs/8]; bool bit = (byte>>(7-(ofs%8)))&1; diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 8e3fba167f..a004a116e0 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -78,11 +78,11 @@ void OS_Unix::print_error(const char* p_function,const char* p_file,int p_line,c break; case ERR_WARNING: print("\E[1;33mWARNING: %s: \E[0m\E[1m%s\n",p_function,err_details); - print("\E[0;33m At: %s:%i.\E[0m\n",p_file,p_line); + print("\E[0;33m At: %s:%i.\E[0m\n",p_file,p_line); break; case ERR_SCRIPT: print("\E[1;35mSCRIPT ERROR: %s: \E[0m\E[1m%s\n",p_function,err_details); - print("\E[0;35m At: %s:%i.\E[0m\n",p_file,p_line); + print("\E[0;35m At: %s:%i.\E[0m\n",p_file,p_line); break; } } |