mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14:35 +00:00
Merge pull request #1599 from JeffProgrammer/glprofiling
Added missing OpenGL profiling blocks.
This commit is contained in:
commit
f66a14c6e1
6 changed files with 27 additions and 2 deletions
|
|
@ -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> ¯os )
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue