[GLExtensions] Add ARB_buffer_storage to negate at least one null pointer instance.
This commit is contained in:
parent
71681de81a
commit
cf8865a6e5
|
@ -0,0 +1,27 @@
|
||||||
|
// Copyright 2013 Dolphin Emulator Project
|
||||||
|
// Licensed under GPLv2
|
||||||
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include "gl_common.h"
|
||||||
|
|
||||||
|
#ifndef GL_ARB_buffer_storage
|
||||||
|
#define GL_ARB_buffer_storage 1
|
||||||
|
|
||||||
|
#define GL_MAP_READ_BIT 0x0001
|
||||||
|
#define GL_MAP_WRITE_BIT 0x0002
|
||||||
|
#define GL_MAP_PERSISTENT_BIT 0x00000040
|
||||||
|
#define GL_MAP_COHERENT_BIT 0x00000080
|
||||||
|
#define GL_DYNAMIC_STORAGE_BIT 0x0100
|
||||||
|
#define GL_CLIENT_STORAGE_BIT 0x0200
|
||||||
|
#define GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT 0x00004000
|
||||||
|
#define GL_BUFFER_IMMUTABLE_STORAGE 0x821F
|
||||||
|
#define GL_BUFFER_STORAGE_FLAGS 0x8220
|
||||||
|
|
||||||
|
typedef void (GLAPIENTRY * PFNGLBUFFERSTORAGEPROC) (GLenum target, GLsizeiptr size, const GLvoid* data, GLbitfield flags);
|
||||||
|
typedef void (GLAPIENTRY * PFNGLNAMEDBUFFERSTORAGEEXTPROC) (GLuint buffer, GLsizeiptr size, const GLvoid* data, GLbitfield flags);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern PFNGLBUFFERSTORAGEPROC glBufferStorage;
|
||||||
|
extern PFNGLNAMEDBUFFERSTORAGEEXTPROC glNamedBufferStorageEXT;
|
||||||
|
|
|
@ -427,6 +427,10 @@ PFNGLOBJECTPTRLABELKHRPROC glObjectPtrLabelKHR;
|
||||||
PFNGLGETOBJECTPTRLABELKHRPROC glGetObjectPtrLabelKHR;
|
PFNGLGETOBJECTPTRLABELKHRPROC glGetObjectPtrLabelKHR;
|
||||||
PFNGLGETPOINTERVKHRPROC glGetPoitnervKHR;
|
PFNGLGETPOINTERVKHRPROC glGetPoitnervKHR;
|
||||||
|
|
||||||
|
// ARB_buffer_storage
|
||||||
|
PFNGLBUFFERSTORAGEPROC glBufferStorage;
|
||||||
|
PFNGLNAMEDBUFFERSTORAGEEXTPROC glNamedBufferStorageEXT;
|
||||||
|
|
||||||
namespace GLExtensions
|
namespace GLExtensions
|
||||||
{
|
{
|
||||||
// Private members and functions
|
// Private members and functions
|
||||||
|
@ -459,6 +463,7 @@ namespace GLExtensions
|
||||||
bool init_arb_sample_shading();
|
bool init_arb_sample_shading();
|
||||||
bool init_arb_debug_output();
|
bool init_arb_debug_output();
|
||||||
bool init_khr_debug();
|
bool init_khr_debug();
|
||||||
|
bool init_arb_buffer_storage();
|
||||||
|
|
||||||
void InitExtensionList()
|
void InitExtensionList()
|
||||||
{
|
{
|
||||||
|
@ -561,6 +566,7 @@ namespace GLExtensions
|
||||||
if (success && !init_arb_debug_output()) success = false;
|
if (success && !init_arb_debug_output()) success = false;
|
||||||
if (success && !init_nv_framebuffer_multisample_coverage()) success = false;
|
if (success && !init_nv_framebuffer_multisample_coverage()) success = false;
|
||||||
if (success && !init_khr_debug()) success = false;
|
if (success && !init_khr_debug()) success = false;
|
||||||
|
if (success && !init_arb_buffer_storage()) success = false;
|
||||||
|
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
dlclose(_dlsym);
|
dlclose(_dlsym);
|
||||||
|
@ -1115,4 +1121,13 @@ namespace GLExtensions
|
||||||
GrabFunction(glGetPoitnervKHR)
|
GrabFunction(glGetPoitnervKHR)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool init_arb_buffer_storage()
|
||||||
|
{
|
||||||
|
if (!Supports("GL_ARB_buffer_storage"))
|
||||||
|
return true;
|
||||||
|
GrabFunction(glBufferStorage)
|
||||||
|
GrabFunction(glNamedBufferStorageEXT)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "ARB_sample_shading.h"
|
#include "ARB_sample_shading.h"
|
||||||
#include "ARB_debug_output.h"
|
#include "ARB_debug_output.h"
|
||||||
#include "KHR_debug.h"
|
#include "KHR_debug.h"
|
||||||
|
#include "ARB_buffer_storage.h"
|
||||||
|
|
||||||
namespace GLExtensions
|
namespace GLExtensions
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue