Skip to content

Commit 1695e71

Browse files
Merge pull request #126 from Przemog1/barycentric
Added barycentric extensions
2 parents 5c0dbf9 + 9ebefe9 commit 1695e71

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright (C) 2018-2020 - DevSH Graphics Programming Sp. z O.O.
2+
// This file is part of the "Nabla Engine".
3+
// For conditions of distribution and use, see copyright notice in nabla.h
4+
5+
#ifndef _NBL_BUILTIN_GLSL_EXTENSIONS_INCLUDED_
6+
#define _NBL_BUILTIN_GLSL_EXTENSIONS_INCLUDED_
7+
8+
#ifdef NBL_GL_NV_fragment_shader_barycentric
9+
#extension GL_NV_fragment_shader_barycentric : enable
10+
#elif defined(NBL_GL_AMD_shader_explicit_vertex_parameter)
11+
#extension GL_AMD_shader_explicit_vertex_parameter : enable
12+
#endif
13+
14+
#endif

source/Nabla/COpenGLExtensionHandler.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,8 +844,7 @@ void COpenGLExtensionHandler::initExtensions(bool stencilBuffer)
844844
float sl_ver;
845845
sscanf(reinterpret_cast<const char*>(shaderVersion),"%f",&sl_ver);
846846
ShaderLanguageVersion = static_cast<uint16_t>(core::round(sl_ver*100.0f));
847-
848-
847+
849848
//! For EXT-DSA testing
850849
if (IsIntelGPU)
851850
{

src/nbl/builtin/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ set(nbl_resources_to_embed
3434
"nbl/builtin/glsl/macros.glsl"
3535
"nbl/builtin/glsl/algorithm.glsl"
3636
# barycentric
37+
"nbl/builtin/glsl/barycentric/extensions.glsl"
3738
"nbl/builtin/glsl/barycentric/frag.glsl"
3839
"nbl/builtin/glsl/barycentric/vert.glsl"
3940
"nbl/builtin/glsl/barycentric/utils.glsl"

src/nbl/video/COpenGLShader.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ R"(
4343
#define NBL_GL_EXT_shader_explicit_arithmetic_types_int16
4444
#endif
4545
46+
#ifdef NBL_IMPL_GL_AMD_shader_explicit_vertex_parameter
47+
#define NBL_GL_AMD_shader_explicit_vertex_parameter
48+
#endif
49+
50+
#ifdef NBL_IMPL_GL_NV_fragment_shader_barycentric
51+
#define NBL_GL_NV_fragment_shader_barycentric
52+
#endif
53+
4654
#ifdef NBL_IMPL_GL_NV_shader_thread_group
4755
#define NBL_GL_KHR_shader_subgroup_ballot_subgroup_mask
4856
#define NBL_GL_KHR_shader_subgroup_basic_subgroup_size

0 commit comments

Comments
 (0)