Added ability to store position, normal, tangent, and uv vertex attributes using GL_SHORT to reduce memory consumption and bandwidth.

Now taking advantage of GL_EXT_discard_framebuffer to reduce extraneous memory copy operations in the PowerVR driver
Implemented native support for Maya's extended scene graph node attributes (pre-transform, post-transform, pivot sets, scale compensation)
Debugging of broken skinned mesh renderer in progress
This commit is contained in:
2013-05-13 13:16:25 -07:00
parent 6fe549b3ba
commit 2de749ff16
27 changed files with 860 additions and 306 deletions

View File

@@ -30,9 +30,6 @@ std::string KRDirectionalLight::getElementName() {
}
KRVector3 KRDirectionalLight::getWorldLightDirection() {
const GLfloat PI = 3.14159265;
const GLfloat d2r = PI * 2 / 360;
KRVector3 world_rotation = getWorldRotation();
KRVector3 light_rotation = KRVector3(0.0, 0.0, 1.0);
@@ -40,7 +37,7 @@ KRVector3 KRDirectionalLight::getWorldLightDirection() {
m.rotate(world_rotation.x, X_AXIS);
m.rotate(world_rotation.y, Y_AXIS);
m.rotate(world_rotation.z, Z_AXIS);
// m.rotate(-90.0 * d2r, Y_AXIS);
KRVector3 light_direction = KRMat4::Dot(m, light_rotation);
return light_direction;
}
@@ -130,7 +127,7 @@ void KRDirectionalLight::render(KRCamera *pCamera, std::vector<KRPointLight *> &
GLDEBUG(glDisable(GL_DEPTH_TEST));
// Render a full screen quad
m_pContext->getModelManager()->bindVBO((void *)KRENGINE_VBO_2D_SQUARE, KRENGINE_VBO_2D_SQUARE_SIZE, NULL, 0, true, false, false, true, false, false, false, true);
m_pContext->getModelManager()->bindVBO((void *)KRENGINE_VBO_2D_SQUARE, KRENGINE_VBO_2D_SQUARE_SIZE, NULL, 0, KRENGINE_VBO_2D_SQUARE_ATTRIBS, true);
GLDEBUG(glDrawArrays(GL_TRIANGLE_STRIP, 0, 4));
}
}