Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Exposed constants:
- enum {
- MinFilter_Nearest = 0,
- MinFilter_Linear = 1,
- MinFilter_NearestMipNearest = 2,
- MinFilter_NearestMipLinear = 3,
- MinFilter_LinearMipNearest = 4,
- MinFilter_LinearMipLinear = 5,
- MinFilter_Invalid = 6,
- MagFilter_Nearest = 0,
- MagFilter_Linear = 1,
- MagFilter_Invalid = 2,
- WrapMode_Repeat = 0,
- WrapMode_Clamp = 1,
- WrapMode_Invalid = 2
- };
- // They are the same between both renderers
- // GLES conversion tables:
- static GLint const minfiltertable[] = {
- GL_NEAREST,
- GL_LINEAR,
- GL_NEAREST_MIPMAP_NEAREST,
- GL_NEAREST_MIPMAP_LINEAR,
- GL_LINEAR_MIPMAP_NEAREST,
- GL_LINEAR_MIPMAP_LINEAR
- };
- static GLint const magfiltertable[] = {
- GL_NEAREST,
- GL_LINEAR
- };
- static GLint const wrapmodetable[] = {
- GL_REPEAT,
- GL_CLAMP_TO_EDGE
- };
- // D3D conversion tables:
- static int const minfiltertable[] = {
- D3DTEXF_POINT,
- D3DTEXF_LINEAR,
- D3DTEXF_POINT,
- D3DTEXF_LINEAR,
- D3DTEXF_POINT,
- D3DTEXF_LINEAR
- };
- static int const mipfiltertable[] = {
- D3DTEXF_NONE,
- D3DTEXF_NONE,
- D3DTEXF_POINT,
- D3DTEXF_POINT,
- D3DTEXF_LINEAR,
- D3DTEXF_LINEAR
- };
- static int const magfiltertable[] = {
- D3DTEXF_POINT,
- D3DTEXF_LINEAR
- };
- static int const wrapmodetable[] = {
- D3DTADDRESS_WRAP,
- D3DTADDRESS_CLAMP
- };
- // Where both my module and GLES use a single state variable for minification filtering, D3D exposes two different variables: D3DSAMP_MINFILTER controls how a single particular mip-level is sampled and D3DSAMP_MIPFILTER controls whether mip-levels are used and whether neighbouring mip-levels are blended together.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement