Merge pull request #1599 from JeffProgrammer/glprofiling

Added missing OpenGL profiling blocks.
This commit is contained in:
Areloch 2016-05-24 01:26:39 -05:00
commit f66a14c6e1
6 changed files with 27 additions and 2 deletions

View file

@ -345,6 +345,7 @@ void GFXGLShaderConstBuffer::set(GFXShaderConstHandle* handle, const MatrixF* ma
void GFXGLShaderConstBuffer::activate()
{
PROFILE_SCOPE(GFXGLShaderConstBuffer_activate);
mShader->setConstantsFromBuffer(this);
mWasLost = false;
}
@ -395,6 +396,7 @@ void GFXGLShader::clearShaders()
bool GFXGLShader::_init()
{
PROFILE_SCOPE(GFXGLShader_Init);
// Don't initialize empty shaders.
if ( mVertexFile.isEmpty() && mPixelFile.isEmpty() )
return false;
@ -1014,6 +1016,7 @@ bool GFXGLShader::initShader( const Torque::Path &file,
bool isVertex,
const Vector<GFXShaderMacro> &macros )
{
PROFILE_SCOPE(GFXGLShader_CompileShader);
GLuint activeShader = glCreateShader(isVertex ? GL_VERTEX_SHADER : GL_FRAGMENT_SHADER);
if(isVertex)
mVertexShader = activeShader;
@ -1073,6 +1076,7 @@ bool GFXGLShader::initShader( const Torque::Path &file,
/// Returns our list of shader constants, the material can get this and just set the constants it knows about
const Vector<GFXShaderConstDesc>& GFXGLShader::getShaderConstDesc() const
{
PROFILE_SCOPE(GFXGLShader_GetShaderConstants);
return mConstants;
}