I'm trying to use the Framework of Adreno SDK to render my scene in QCAR.
If i do my rendering without using QCAR projection Matrix and modelView Matrix it's working fine, but I can't get any single mesh rendered when using QCAR matrixes.
here is my rendering code... if someone has an idea, I'll greatly appreciate.
QCAR::Matrix44F projectionMatrix = QCAR::Tool::getProjectionGL(cameraCalibration, 2.0f, 2000.0f); QCAR::Matrix44F modelViewMatrix = QCAR::Tool::convertPose2GLMatrix(trackable->getPose()); MATRIX4X4 *mvMatrix = (MATRIX4X4 *) modelViewMatrix.data; MATRIX4X4 *projMatrix = (MATRIX4X4 *) projectionMatrix.data; m_matModelViewProj = MatrixMultiply( *mvMatrix, *projMatrix ); m_matNormal = MatrixNormal( *mvMatrix ); glUseProgram( m_hPerPixelLightingShader ); glUniform4f( m_hMaterialAmbientLoc, 0.8f, 0.2f, 0.2f, 1.0f ); glUniform4f( m_hMaterialDiffuseLoc, 0.3f, 0.3f, 0.8f, 1.0f ); glUniform4f( m_hMaterialSpecularLoc, 0.65f, 0.6f, 1.0f, 10.0f ); // glUniformMatrix4fv( m_hModelViewMatrixLoc, 1, FALSE, (FLOAT32*)&m_matModelView ); glUniformMatrix4fv( m_hModelViewMatrixLoc, 1, FALSE, (FLOAT32*)mvMatrix ); checkGlError("glUniformMatrix4fv( m_hModelViewMatrixLoc, 1, FALSE, (FLOAT32*)*mvMatrix->m )"); glUniformMatrix4fv( m_hModelViewProjMatrixLoc, 1, FALSE, (FLOAT32*)&m_matModelViewProj ); checkGlError("glUniformMatrix4fv( m_hModelViewProjMatrixLoc, 1, FALSE, (FLOAT32*)&m_matModelViewProj )"); glUniformMatrix3fv( m_hNormalMatrixLoc, 1, FALSE, (FLOAT32*)&m_matNormal ); checkGlError("glUniformMatrix3fv( m_hNormalMatrixLoc, 1, FALSE, (FLOAT32*)&m_matNormal )"); glUniform3f( m_hLightPositionLoc, 2.0f, 1.0f, 1.0f ); glBindFramebuffer( GL_FRAMEBUFFER, 0 ); glEnable( GL_DEPTH_TEST ); m_Mesh.Render(); glDisable( GL_DEPTH_TEST );
double checked, it would seems my models is smaller than the unity cube.
I played with a scale matrix, and it's working fine.
Thanks for your help, very much appreciate.