Sampler.h revision e826ef020ff7d64878b98cf24e8acbc0e1bc99aa
1// SwiftShader Software Renderer 2// 3// Copyright(c) 2015 Google Inc. 4// 5// All rights reserved. No part of this software may be copied, distributed, transmitted, 6// transcribed, stored in a retrieval system, translated into any human or computer 7// language by any means, or disclosed to third parties without the explicit written 8// agreement of Google Inc. Without such an agreement, no rights or licenses, express 9// or implied, including but not limited to any patent rights, are granted to you. 10// 11 12// Sampler.h: Defines the es2::Sampler class 13 14#ifndef LIBGLESV2_SAMPLER_H_ 15#define LIBGLESV2_SAMPLER_H_ 16 17#include "common/Object.hpp" 18#include "Renderer/Renderer.hpp" 19 20#define GL_APICALL 21#include <GLES2/gl2.h> 22 23namespace es2 24{ 25 26class Sampler : public gl::NamedObject 27{ 28public: 29 Sampler(GLuint name) : NamedObject(name) 30 { 31 mMinFilter = GL_NEAREST_MIPMAP_LINEAR; 32 mMagFilter = GL_LINEAR; 33 34 mWrapModeS = GL_REPEAT; 35 mWrapModeT = GL_REPEAT; 36 mWrapModeR = GL_REPEAT; 37 38 mMinLod = -1000.0f; 39 mMaxLod = 1000.0f; 40 mCompareMode = GL_NONE; 41 mCompareFunc = GL_LEQUAL; 42 } 43 44 GLenum mMinFilter; 45 GLenum mMagFilter; 46 47 GLenum mWrapModeS; 48 GLenum mWrapModeT; 49 GLenum mWrapModeR; 50 51 GLfloat mMinLod; 52 GLfloat mMaxLod; 53 GLenum mCompareMode; 54 GLenum mCompareFunc; 55}; 56 57} 58 59#endif // LIBGLESV2_SAMPLER_H_ 60