1 #include "ext_texture3d.h"
6 PFNGLTEXIMAGE3DPROC glTexImage3D = 0;
7 PFNGLTEXSUBIMAGE3DPROC glTexSubImage3D = 0;
9 Extension::SupportLevel init_ext_texture3d()
11 if(is_version_at_least(1, 2))
13 glTexImage3D = reinterpret_cast<PFNGLTEXIMAGE3DPROC>(get_proc_address("glTexImage3D"));
14 glTexSubImage3D = reinterpret_cast<PFNGLTEXSUBIMAGE3DPROC>(get_proc_address("glTexSubImage3D"));
15 return Extension::CORE;
17 if(is_supported("GL_EXT_texture3D"))
19 glTexImage3D = reinterpret_cast<PFNGLTEXIMAGE3DPROC>(get_proc_address("glTexImage3DEXT"));
20 glTexSubImage3D = reinterpret_cast<PFNGLTEXSUBIMAGE3DPROC>(get_proc_address("glTexSubImage3DEXT"));
21 return Extension::EXTENSION;
23 return Extension::UNSUPPORTED;
26 Extension EXT_texture3D("GL_EXT_texture3D", init_ext_texture3d);