OpenGL object labels and debug groups
This commit is contained in:
parent
2825bd4967
commit
d380d765c9
13 changed files with 133 additions and 32 deletions
|
|
@ -46,6 +46,7 @@
|
|||
#include "vectors.h"
|
||||
#include "gl/system/gl_interface.h"
|
||||
#include "gl/system/gl_cvars.h"
|
||||
#include "gl/system/gl_debug.h"
|
||||
#include "gl/shaders/gl_shaderprogram.h"
|
||||
#include "w_wad.h"
|
||||
#include "i_system.h"
|
||||
|
|
@ -107,6 +108,8 @@ void FShaderProgram::Compile(ShaderType type, const char *name, const FString &c
|
|||
|
||||
const auto &handle = mShaders[type];
|
||||
|
||||
FGLDebug::LabelObject(GL_SHADER, handle, name);
|
||||
|
||||
FString patchedCode = PatchShader(type, code, defines, maxGlslVersion);
|
||||
int lengths[1] = { (int)patchedCode.Len() };
|
||||
const char *sources[1] = { patchedCode.GetChars() };
|
||||
|
|
@ -147,6 +150,7 @@ void FShaderProgram::SetFragDataLocation(int index, const char *name)
|
|||
|
||||
void FShaderProgram::Link(const char *name)
|
||||
{
|
||||
FGLDebug::LabelObject(GL_PROGRAM, mProgram, name);
|
||||
glLinkProgram(mProgram);
|
||||
|
||||
GLint status = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue