• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2014 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 
7 // SamplerGL.h: Defines the rx::SamplerGL class, an implementation of SamplerImpl.
8 
9 #ifndef LIBANGLE_RENDERER_GL_SAMPLERGL_H_
10 #define LIBANGLE_RENDERER_GL_SAMPLERGL_H_
11 
12 #include "libANGLE/angletypes.h"
13 #include "libANGLE/renderer/SamplerImpl.h"
14 
15 namespace rx
16 {
17 
18 class FunctionsGL;
19 class StateManagerGL;
20 
21 class SamplerGL : public SamplerImpl
22 {
23   public:
24     SamplerGL(const gl::SamplerState &state,
25               const FunctionsGL *functions,
26               StateManagerGL *stateManager);
27     ~SamplerGL() override;
28 
29     angle::Result syncState(const gl::Context *context, const bool dirty) override;
30 
31     GLuint getSamplerID() const;
32 
33   private:
34     const FunctionsGL *mFunctions;
35     StateManagerGL *mStateManager;
36 
37     mutable gl::SamplerState mAppliedSamplerState;
38     GLuint mSamplerID;
39 };
40 }  // namespace rx
41 
42 #endif  // LIBANGLE_RENDERER_GL_SAMPLERGL_H_
43