Package org.lwjgl.vulkan
Class NVGLSLShader
- java.lang.Object
-
- org.lwjgl.vulkan.NVGLSLShader
-
public final class NVGLSLShader extends java.lang.Object
This extension allows GLSL shaders written to theGL_KHR_vulkan_glsl
extension specification to be used instead of SPIR-V. The implementation will automatically detect whether the shader is SPIR-V or GLSL, and compile it appropriately.Examples
Example 1
Passing in GLSL code
char const vss[] = "#version 450 core\n" "layout(location = 0) in vec2 aVertex;\n" "layout(location = 1) in vec4 aColor;\n" "out vec4 vColor;\n" "void main()\n" "{\n" " vColor = aColor;\n" " gl_Position = vec4(aVertex, 0, 1);\n" "}\n" ; VkShaderModuleCreateInfo vertexShaderInfo = { VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO }; vertexShaderInfo.codeSize = sizeof vss; vertexShaderInfo.pCode = vss; VkShaderModule vertexShader; vkCreateShaderModule(device, &vertexShaderInfo, 0, &vertexShader);
- Name String
VK_NV_glsl_shader
- Extension Type
- Device extension
- Registered Extension Number
- 13
- Revision
- 1
- Extension and Version Dependencies
- Requires Vulkan 1.0
- Deprecation state
- Deprecated without replacement
- Contact
- Piers Daniell pdaniell-nv
- Last Modified Date
- 2016-02-14
- IP Status
- No known IP claims.
- Contributors
- Piers Daniell, NVIDIA
-
-
Field Summary
Fields Modifier and Type Field Description static int
VK_ERROR_INVALID_SHADER_NV
ExtendsVkResult
.static java.lang.String
VK_NV_GLSL_SHADER_EXTENSION_NAME
The extension name.static int
VK_NV_GLSL_SHADER_SPEC_VERSION
The extension specification version.
-
-
-
Field Detail
-
VK_NV_GLSL_SHADER_SPEC_VERSION
public static final int VK_NV_GLSL_SHADER_SPEC_VERSION
The extension specification version.- See Also:
- Constant Field Values
-
VK_NV_GLSL_SHADER_EXTENSION_NAME
public static final java.lang.String VK_NV_GLSL_SHADER_EXTENSION_NAME
The extension name.- See Also:
- Constant Field Values
-
VK_ERROR_INVALID_SHADER_NV
public static final int VK_ERROR_INVALID_SHADER_NV
ExtendsVkResult
.- See Also:
- Constant Field Values
-
-