From da843cc8c143841cef72ad26cacf8ddc5ab76ee9 Mon Sep 17 00:00:00 2001 From: Vincent Lejeune Date: Sat, 16 Aug 2014 21:13:23 +0200 Subject: [PATCH] Add sampler object support --- src/graphics/glwrap.cpp | 8 ++++++++ src/graphics/glwrap.hpp | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/src/graphics/glwrap.cpp b/src/graphics/glwrap.cpp index 7387b9d8f..0cd8d2449 100644 --- a/src/graphics/glwrap.cpp +++ b/src/graphics/glwrap.cpp @@ -83,6 +83,10 @@ PFNGLTEXSTORAGE2DPROC glTexStorage2D; PFNGLTEXSTORAGE3DPROC glTexStorage3D; PFNGLBINDIMAGETEXTUREPROC glBindImageTexture; PFNGLDISPATCHCOMPUTEPROC glDispatchCompute; +PFNGLGENSAMPLERSPROC glGenSamplers; +PFNGLBINDSAMPLERPROC glBindSampler; +PFNGLSAMPLERPARAMETERFPROC glSamplerParameterf; +PFNGLSAMPLERPARAMETERIPROC glSamplerParameteri; #endif static bool is_gl_init = false; @@ -249,6 +253,10 @@ void initGL() glTexStorage3D = (PFNGLTEXSTORAGE3DPROC)IRR_OGL_LOAD_EXTENSION("glTexStorage3D"); glBindImageTexture = (PFNGLBINDIMAGETEXTUREPROC)IRR_OGL_LOAD_EXTENSION("glBindImageTexture"); glDispatchCompute = (PFNGLDISPATCHCOMPUTEPROC)IRR_OGL_LOAD_EXTENSION("glDispatchCompute"); + glGenSamplers = (PFNGLGENSAMPLERSPROC)IRR_OGL_LOAD_EXTENSION("glGenSamplers"); + glBindSampler = (PFNGLBINDSAMPLERPROC)IRR_OGL_LOAD_EXTENSION("glBindSampler"); + glSamplerParameterf = (PFNGLSAMPLERPARAMETERFPROC)IRR_OGL_LOAD_EXTENSION("glSamplerParameterf"); + glSamplerParameteri = (PFNGLSAMPLERPARAMETERIPROC)IRR_OGL_LOAD_EXTENSION("glSamplerParameteri"); #ifdef DEBUG glDebugMessageCallbackARB = (PFNGLDEBUGMESSAGECALLBACKARBPROC)IRR_OGL_LOAD_EXTENSION("glDebugMessageCallbackARB"); #endif diff --git a/src/graphics/glwrap.hpp b/src/graphics/glwrap.hpp index 2ed1994e1..9c63f79f2 100644 --- a/src/graphics/glwrap.hpp +++ b/src/graphics/glwrap.hpp @@ -108,6 +108,10 @@ extern PFNGLTEXSTORAGE2DPROC glTexStorage2D; extern PFNGLTEXSTORAGE3DPROC glTexStorage3D; extern PFNGLBINDIMAGETEXTUREPROC glBindImageTexture; extern PFNGLDISPATCHCOMPUTEPROC glDispatchCompute; +extern PFNGLGENSAMPLERSPROC glGenSamplers; +extern PFNGLBINDSAMPLERPROC glBindSampler; +extern PFNGLSAMPLERPARAMETERFPROC glSamplerParameterf; +extern PFNGLSAMPLERPARAMETERIPROC glSamplerParameteri; #ifdef DEBUG extern PFNGLDEBUGMESSAGECALLBACKARBPROC glDebugMessageCallbackARB; #endif