Deferred lighting implementation in progress. Now generating view-space normal fragments for the 1st pass G-buffer.

Added transpose() method to KRMat4

--HG--
extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%4043
This commit is contained in:
kearwood
2012-04-13 01:13:18 +00:00
parent 3749d3edfd
commit b88cf8e0cb
16 changed files with 124 additions and 48 deletions

View File

@@ -241,6 +241,16 @@ bool KRMat4::invert() {
return true;
}
void KRMat4::transpose() {
GLfloat trans[16];
for(int x=0; x<4; x++) {
for(int y=0; y<4; y++) {
trans[x + y * 4] = m_mat[y + x * 4];
}
}
memcpy(m_mat, trans, sizeof(GLfloat) * 16);
}
/* Dot Product */
KRVector3 KRMat4::dot(const KRVector3 &v) const {
return KRVector3(