Add support for ARB_uniform_buffer_object

GLSL Version : >= 120

Purpose:
Allow users to use features by enabling this extension, even in low versions.

Extension Name:
ARB_uniform_buffer_object

Builtin-variables:
Uniform

Builtin-functions:
Nah

Keywords:
Nah

Features:
uniform block

Reference:
https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_uniform_buffer_object.txt
This commit is contained in:
Chow
2019-11-26 17:02:46 +08:00
parent bd97b6f9f2
commit 97c4c0936f
5 changed files with 18 additions and 2 deletions

View File

@@ -201,3 +201,15 @@ int mac;
#define macr(A,B) A ## B
int macr(qrs,tuv);
layout(std140) uniform BlockName // ERROR
{
int test;
};
#extension GL_ARB_uniform_buffer_object : enable
layout(std140) uniform BlockName
{
int test;
};

View File

@@ -79,7 +79,8 @@ ERROR: 0:192: 'assign' : l-value required (can't modify a const)
ERROR: 0:195: 'gl_ModelViewMatrix' : identifiers starting with "gl_" are reserved
ERROR: 0:200: 'token pasting (##)' : not supported for this version or the enabled extensions
ERROR: 0:203: 'token pasting (##)' : not supported for this version or the enabled extensions
ERROR: 80 compilation errors. No code generated.
ERROR: 0:205: '' : syntax error, unexpected IDENTIFIER
ERROR: 81 compilation errors. No code generated.
Shader version: 120