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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user