OGLplus (0.52.0) a C++ wrapper for OpenGL

buffer_gpu_addr.hpp
Go to the documentation of this file.
1 
12 #pragma once
13 #ifndef OGLPLUS_BUFFER_GPU_ADDR_1310102147_HPP
14 #define OGLPLUS_BUFFER_GPU_ADDR_1310102147_HPP
15 
16 #if GL_NV_shader_buffer_load
17 
18 #include <oglplus/fwd.hpp>
20 
21 namespace oglplus {
22 
23 class BufferGPUAddress;
24 GLuint64EXT GetGLAddress(BufferGPUAddress);
25 
27 class BufferGPUAddress
28 {
29 private:
30  friend GLuint64EXT GetGLAddress(BufferGPUAddress);
31 
32  GLuint64EXT _addr;
33 public:
34  BufferGPUAddress(GLuint64EXT addr)
35  : _addr(addr)
36  { }
37 };
38 
39 inline GLuint64EXT GetGLAddress(BufferGPUAddress bga)
40 {
41  return bga._addr;
42 }
43 
44 template <>
45 struct AdjustProgVar<BufferGPUAddress>
46 {
47  typedef GLuint64 BaseType;
48  typedef BufferGPUAddress ValueType;
49 
50  inline static BaseType Adjust(ValueType value)
51  {
52  return GetGLAddress(value);
53  }
54 };
55 
56 } // namespace oglplus
57 
58 #endif // GL_NV_shader_buffer_load
59 
60 #endif // include guard
Forward declarations.
Program variable type operations.

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).