OGLplus (0.52.0) a C++ wrapper for OpenGL

uniform.hpp
Go to the documentation of this file.
1 
12 #pragma once
13 #ifndef OGLPLUS_DSA_UNIFORM_1107121519_HPP
14 #define OGLPLUS_DSA_UNIFORM_1107121519_HPP
15 
16 #include <oglplus/uniform.hpp>
17 
18 namespace oglplus {
19 
20 // collection of direct state access ProgramUniform
21 // setter functions for basic types
22 template <>
23 class ProgVarSetters<tag::DirectState, tag::Uniform, tag::NativeTypes>
24 {
25 protected:
26  OGLPLUS_ERROR_CONTEXT(ProgramUniform, ProgramUniform)
27 
28 #if GL_VERSION_4_1 || GL_ARB_separate_shader_objects
29  OGLPLUS_AUX_VARPARA_FNS(ProgramUniform, ui, t, GLuint)
30  OGLPLUS_AUX_VARPARA_FNS(ProgramUniform, i, t, GLint)
31 #if GL_ARB_bindless_texture
32  OGLPLUS_AUX_VARPARA_FNC(ProgramUniformHandle, ui64ARB, t, GLuint64, 1)
33 #elif GL_NV_shader_buffer_load
34  OGLPLUS_AUX_VARPARA_FNC(ProgramUniform, ui64NV, t, GLuint64EXT, 1)
35 #endif
36  OGLPLUS_AUX_VARPARA_FNS(ProgramUniform, f, t, GLfloat)
37  OGLPLUS_AUX_VARPARA_FNS(ProgramUniform, d, t, GLdouble)
38 
39  OGLPLUS_AUX_VARPARA_FNS(ProgramUniform, iv, v, GLint)
40 #if GL_ARB_bindless_texture
41  OGLPLUS_AUX_VARPARA_FNC(ProgramUniformHandle, ui64vARB, v, GLuint64, 1)
42 #endif
43  OGLPLUS_AUX_VARPARA_FNS(ProgramUniform, fv, v, GLfloat)
44  OGLPLUS_AUX_VARPARA_FNS(ProgramUniform, dv, v, GLdouble)
45 #elif GL_EXT_direct_state_access
46  OGLPLUS_AUX_VARPARA_FNS_EXT(ProgramUniform, ui, EXT, t, GLuint)
47  OGLPLUS_AUX_VARPARA_FNS_EXT(ProgramUniform, i, EXT, t, GLint)
48  OGLPLUS_AUX_VARPARA_FNS_EXT(ProgramUniform, f, EXT, t, GLfloat)
49 
50  OGLPLUS_AUX_VARPARA_FNS_EXT(ProgramUniform, iv, EXT, v, GLint)
51  OGLPLUS_AUX_VARPARA_FNS_EXT(ProgramUniform, fv, EXT, v, GLfloat)
52 #endif
53 };
54 
55 // collection of direct state access ProgramUniform
56 // setter functions for matrices
57 template <>
58 class ProgVarSetters<tag::DirectState, tag::Uniform, tag::MatrixTypes>
59 {
60 protected:
61  OGLPLUS_ERROR_CONTEXT(ProgramUniformMatrix, ProgramUniform)
62 
63 #if GL_VERSION_4_1 || GL_ARB_separate_shader_objects
64  OGLPLUS_AUX_VARPARA_MAT_FNS(ProgramUniformMatrix, fv, v, GLfloat)
65  OGLPLUS_AUX_VARPARA_MAT_FNS(ProgramUniformMatrix, dv, v, GLdouble)
66 #elif GL_EXT_direct_state_access
67  OGLPLUS_AUX_VARPARA_MAT_FNS_EXT(ProgramUniformMatrix,fv,EXT, v, GLfloat)
68 #endif
69 };
70 
72  ProgramUniform,
73  tag::DirectState,
75  tag::NoTypecheck
76 )
77 
78 typedef ProgramUniform<GLint> ProgramUniformSampler;
80 
81 } // namespace oglplus
82 
83 #endif // include guard
Uniform wrappers.
OGLPLUS_DECLARE_PROG_VAR(Uniform, tag::ImplicitSel, tag::Uniform, tag::NoTypecheck) typedef Uniform< GLint > UniformSampler
Uniform sampler.

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Mon Sep 22 2014 by Doxygen (version 1.8.6).