mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-23 15:06:32 +00:00
Handle GL attribList being NULL - use a default attrib list of { 0 }
This commit is contained in:
@@ -629,14 +629,16 @@ void glXDestroyContext(Display *dpy, GLXContext ctx)
|
||||
__attribute__ ((visibility ("default")))
|
||||
GLXContext glXCreateContextAttribsARB(Display *dpy, GLXFBConfig config, GLXContext shareList, Bool direct, const int *attribList)
|
||||
{
|
||||
const int *attribs = attribList;
|
||||
int defaultAttribList[] = { 0 };
|
||||
|
||||
const int *attribs = attribList ? attribList : defaultAttribList;
|
||||
vector<int> attribVec;
|
||||
|
||||
// modify attribs to our liking
|
||||
{
|
||||
bool flagsNext = false;
|
||||
bool flagsFound = false;
|
||||
const int *a = attribList;
|
||||
const int *a = attribs;
|
||||
while(*a)
|
||||
{
|
||||
int val = *a;
|
||||
|
||||
@@ -452,14 +452,16 @@ class OpenGLHook : LibraryHook
|
||||
|
||||
glhooks.m_CreatingContext = true;
|
||||
|
||||
const int *attribs = attribList;
|
||||
int defaultAttribList[] = { 0 };
|
||||
|
||||
const int *attribs = attribList ? attribList : defaultAttribList;
|
||||
vector<int> attribVec;
|
||||
|
||||
// modify attribs to our liking
|
||||
{
|
||||
bool flagsNext = false;
|
||||
bool flagsFound = false;
|
||||
const int *a = attribList;
|
||||
const int *a = attribs;
|
||||
while(*a)
|
||||
{
|
||||
int val = *a;
|
||||
|
||||
Reference in New Issue
Block a user