mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-09 07:20:40 +00:00
Added profile blocks for GL.
This commit is contained in:
parent
6caafc9844
commit
db6d91925d
6 changed files with 29 additions and 2 deletions
|
|
@ -344,6 +344,7 @@ void GFXGLShaderConstBuffer::set(GFXShaderConstHandle* handle, const MatrixF* ma
|
|||
|
||||
void GFXGLShaderConstBuffer::activate()
|
||||
{
|
||||
PROFILE_SCOPE(GFXGLShaderConstBuffer_activate);
|
||||
mShader->setConstantsFromBuffer(this);
|
||||
mWasLost = false;
|
||||
}
|
||||
|
|
@ -394,6 +395,7 @@ void GFXGLShader::clearShaders()
|
|||
|
||||
bool GFXGLShader::_init()
|
||||
{
|
||||
PROFILE_SCOPE(GFXGLShader_Init);
|
||||
// Don't initialize empty shaders.
|
||||
if ( mVertexFile.isEmpty() && mPixelFile.isEmpty() )
|
||||
return false;
|
||||
|
|
@ -1013,6 +1015,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;
|
||||
|
|
@ -1072,6 +1075,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