示例#1
0
 public DialogueBox()
 {
     font       = ContentCache.GetFont("Default");
     lines      = new List <SpriteText>();
     Anchor     = Alignments.Bottom;
     Offset     = new ivec2(0, 100);
     IsCentered = true;
 }
示例#2
0
 public DragParam(vec3 lastModelPos, mat4 projectionMatrix, mat4 viewMatrix, vec4 viewport, ivec2 lastMousePositionOnScreen)
 {
     this.lastModelSpacePos         = lastModelPos;
     this.projectionMatrix          = projectionMatrix;
     this.viewMatrix                = viewMatrix;
     this.lastMousePositionOnScreen = lastMousePositionOnScreen;
     this.viewport = viewport;
 }
示例#3
0
 internal void WriteDepth(ivec2 position, float depth)
 {
     if (OutOfBounds(position))
     {
         return;
     }
     m_depthData[position.x + (position.y * m_imageExtent.width)] = depth;
 }
示例#4
0
 internal float ReadDepth(ivec2 position)
 {
     if (OutOfBounds(position))
     {
         return(1.0f);
     }
     return(m_depthData[position.x + (position.y * m_imageExtent.width)]);
 }
示例#5
0
 private bool OutOfBounds(ivec2 position)
 {
     if (position.x < 0 || position.y < 0 || position.x >= m_imageExtent.width || position.y >= m_imageExtent.height)
     {
         return(true);
     }
     return(false);
 }
示例#6
0
        internal void WriteStencil(ivec2 position, int stencil)
        {
            if (OutOfBounds(position))
            {
                return;
            }

            m_stencilData[position.x + (position.y * m_imageExtent.width)] = stencil;
        }
示例#7
0
        internal int ReadStencil(ivec2 position)
        {
            if (OutOfBounds(position))
            {
                return(0);
            }

            return(m_stencilData[position.x + (position.y * m_imageExtent.width)]);
        }
示例#8
0
        public void PropertyValues()
        {
            var v    = new ivec2(6, 9);
            var vals = v.Values;

            Assert.AreEqual(6, vals[0]);
            Assert.AreEqual(9, vals[1]);
            Assert.That(vals.SequenceEqual(v.ToArray()));
        }
示例#9
0
 /// <summary>
 /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public imat3x2(ivec2 c0, ivec2 c1, ivec2 c2)
 {
     this.m00 = c0.x;
     this.m01 = c0.y;
     this.m10 = c1.x;
     this.m11 = c1.y;
     this.m20 = c2.x;
     this.m21 = c2.y;
 }
示例#10
0
        public void Indexer()
        {
            var v = new ivec2(-4, 7);

            Assert.AreEqual(-4, v[0]);
            Assert.AreEqual(7, v[1]);

            Assert.Throws <ArgumentOutOfRangeException>(() => { var s = v[-2147483648]; });
            Assert.Throws <ArgumentOutOfRangeException>(() => { v[-2147483648] = 0; });
            Assert.Throws <ArgumentOutOfRangeException>(() => { var s = v[-1]; });
            Assert.Throws <ArgumentOutOfRangeException>(() => { v[-1] = 0; });
            Assert.Throws <ArgumentOutOfRangeException>(() => { var s = v[2]; });
            Assert.Throws <ArgumentOutOfRangeException>(() => { v[2] = 0; });
            Assert.Throws <ArgumentOutOfRangeException>(() => { var s = v[2147483647]; });
            Assert.Throws <ArgumentOutOfRangeException>(() => { v[2147483647] = 0; });
            Assert.Throws <ArgumentOutOfRangeException>(() => { var s = v[5]; });
            Assert.Throws <ArgumentOutOfRangeException>(() => { v[5] = 0; });

            v[0] = 0;
            Assert.AreEqual(0, v[0]);
            v[1] = 1;
            Assert.AreEqual(1, v[1]);
            v[1] = 2;
            Assert.AreEqual(2, v[1]);
            v[0] = 3;
            Assert.AreEqual(3, v[0]);
            v[0] = 4;
            Assert.AreEqual(4, v[0]);
            v[1] = 5;
            Assert.AreEqual(5, v[1]);
            v[1] = 6;
            Assert.AreEqual(6, v[1]);
            v[0] = 7;
            Assert.AreEqual(7, v[0]);
            v[1] = 8;
            Assert.AreEqual(8, v[1]);
            v[1] = 9;
            Assert.AreEqual(9, v[1]);
            v[1] = -1;
            Assert.AreEqual(-1, v[1]);
            v[0] = -2;
            Assert.AreEqual(-2, v[0]);
            v[1] = -3;
            Assert.AreEqual(-3, v[1]);
            v[0] = -4;
            Assert.AreEqual(-4, v[0]);
            v[0] = -5;
            Assert.AreEqual(-5, v[0]);
            v[0] = -6;
            Assert.AreEqual(-6, v[0]);
            v[1] = -7;
            Assert.AreEqual(-7, v[1]);
            v[0] = -8;
            Assert.AreEqual(-8, v[0]);
            v[0] = -9;
            Assert.AreEqual(-9, v[0]);
        }
示例#11
0
 /// <summary>
 /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public imat2x3(ivec2 c0, ivec2 c1)
 {
     this.m00 = c0.x;
     this.m01 = c0.y;
     this.m02 = 0;
     this.m10 = c1.x;
     this.m11 = c1.y;
     this.m12 = 0;
 }
示例#12
0
 /// <summary>
 /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public imat3x2(ivec2 c0, ivec2 c1)
 {
     this.m00 = c0.x;
     this.m01 = c0.y;
     this.m10 = c1.x;
     this.m11 = c1.y;
     this.m20 = 0;
     this.m21 = 0;
 }
示例#13
0
 // For the time being, source rects for 3D sprites aren't supported (in order to simplify the rendering
 // process). This might be fine, even if source rects are never added.
 public Sprite3D(QuadSource source, Alignments alignment = Alignments.Center)
 {
     Source = source;
     origin = Utilities.ComputeOrigin(source.Width, source.Height, alignment) -
              new ivec2(source.Width, source.Height) / 2;
     Scale          = vec2.Ones;
     Orientation    = quat.Identity;
     Color          = Color.White;
     IsShadowCaster = true;
 }
示例#14
0
 /// <summary>
 /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public imat4x2(ivec2 c0, ivec2 c1, ivec2 c2, ivec2 c3)
 {
     this.m00 = c0.x;
     this.m01 = c0.y;
     this.m10 = c1.x;
     this.m11 = c1.y;
     this.m20 = c2.x;
     this.m21 = c2.y;
     this.m30 = c3.x;
     this.m31 = c3.y;
 }
示例#15
0
        protected Camera(Window window)
        {
            _window = window;

            _winCenter = new ivec2();
            Glfw.GetWindowSize(_window, out _winCenter.x, out _winCenter.y);

            Glfw.SetCursorPosition(_window, _winCenter.x, _winCenter.y);

            setRotation(0, 0);
        }
示例#16
0
        public void SerializationJson()
        {
            var v0 = new ivec2(6, -3);
            var s0 = JsonConvert.SerializeObject(v0);

            var v1 = JsonConvert.DeserializeObject <ivec2>(s0);
            var s1 = JsonConvert.SerializeObject(v1);

            Assert.AreEqual(v0, v1);
            Assert.AreEqual(s0, s1);
        }
示例#17
0
        public TentacleTester(Scene scene)
        {
            this.scene = scene;

            var mesh     = ContentCache.GetMesh("Tentacle.obj");
            var points   = mesh.Points;
            var vertices = mesh.Vertices;

            ivec2[] boneIndexes = new ivec2[vertices.Length];
            vec2[]  boneWeights = new vec2[vertices.Length];

            float halfRange     = (points.Max(p => p.x) - points.Min(p => p.x)) / 2;
            float segmentLength = halfRange * 2 / (Bones - 1);

            // Compute bone indexes and weights.
            for (int i = 0; i < vertices.Length; i++)
            {
                float x      = points[vertices[i].x].x;
                float weight = 1 - ((x + halfRange) % segmentLength) / segmentLength;

                // Each segment spans two bones.
                int index = (int)Math.Floor((x + halfRange) / segmentLength);

                boneIndexes[i] = new ivec2(index, Math.Min(index + 1, Bones - 1));
                boneWeights[i] = new vec2(weight, 1 - weight);
            }

            mesh.BoneIndexes = boneIndexes;
            mesh.BoneWeights = boneWeights;

            curve = new Curve3D();

            // Compute the default pose.
            vec3[] defaultPose = new vec3[Bones];

            for (int i = 0; i < Bones; i++)
            {
                defaultPose[i] = new vec3(-halfRange + segmentLength * i, 0, 0);
            }

            // Initialize springs.
            vec3 target = scene.GetEntities(EntityGroups.Player)[0].Position;

            vec3[] springPoints =
            {
                new vec3(halfRange * 2, HoverHeight, 0),
                new vec3(halfRange,     HoverHeight, 0),
                new vec3(target.x,      HoverHeight, target.z)
            };

            springs  = springPoints.Select(p => new SpringPoint3D(p, 0.85f, 0.85f)).ToArray();
            skeleton = new Skeleton(mesh, defaultPose);
            scene.Renderer.Add(skeleton);
        }
        vec2 Gradient(float[,] map, ivec2 p)
        {
            float px0 = Sample(map, p + new ivec2(-1, 0));
            float px1 = Sample(map, p + new ivec2(+1, 0));
            float py0 = Sample(map, p + new ivec2(0, -1));
            float py1 = Sample(map, p + new ivec2(0, +1));

            float dx = px0 - px1;
            float dy = py0 - py1;

            return((new vec2(dx, dy)) * 0.5f);
        }
示例#19
0
 public void TriangleInequality()
 {
     {
         var v0 = new ivec2(-6, 9);
         var v1 = new ivec2(-7, 1);
         Assert.GreaterOrEqual(v0.NormMax + v1.NormMax, (v0 + v1).NormMax);
     }
     {
         var v0 = new ivec2(0, 4);
         var v1 = new ivec2(7, -3);
         Assert.GreaterOrEqual(v0.NormMax + v1.NormMax, (v0 + v1).NormMax);
     }
     {
         var v0 = new ivec2(-4, -8);
         var v1 = new ivec2(-7, -8);
         Assert.GreaterOrEqual(v0.NormMax + v1.NormMax, (v0 + v1).NormMax);
     }
     {
         var v0 = new ivec2(4, 7);
         var v1 = new ivec2(-9, -5);
         Assert.GreaterOrEqual(v0.NormMax + v1.NormMax, (v0 + v1).NormMax);
     }
     {
         var v0 = new ivec2(4, -8);
         var v1 = new ivec2(-5, -3);
         Assert.GreaterOrEqual(v0.NormMax + v1.NormMax, (v0 + v1).NormMax);
     }
     {
         var v0 = new ivec2(7, 7);
         var v1 = new ivec2(4, 5);
         Assert.GreaterOrEqual(v0.NormMax + v1.NormMax, (v0 + v1).NormMax);
     }
     {
         var v0 = new ivec2(-4, -7);
         var v1 = new ivec2(-8, 9);
         Assert.GreaterOrEqual(v0.NormMax + v1.NormMax, (v0 + v1).NormMax);
     }
     {
         var v0 = new ivec2(2, 4);
         var v1 = new ivec2(0, -2);
         Assert.GreaterOrEqual(v0.NormMax + v1.NormMax, (v0 + v1).NormMax);
     }
     {
         var v0 = new ivec2(8, 0);
         var v1 = new ivec2(0, -3);
         Assert.GreaterOrEqual(v0.NormMax + v1.NormMax, (v0 + v1).NormMax);
     }
     {
         var v0 = new ivec2(-7, -8);
         var v1 = new ivec2(-6, -6);
         Assert.GreaterOrEqual(v0.NormMax + v1.NormMax, (v0 + v1).NormMax);
     }
 }
示例#20
0
 public void InvariantCommutativeNeg()
 {
     {
         var v0 = new ivec2(0, 8);
         var v1 = new ivec2(6, 5);
         Assert.AreEqual(v0 - v1, -(v1 - v0));
     }
     {
         var v0 = new ivec2(8, -5);
         var v1 = new ivec2(2, 8);
         Assert.AreEqual(v0 - v1, -(v1 - v0));
     }
     {
         var v0 = new ivec2(-6, 0);
         var v1 = new ivec2(-5, -4);
         Assert.AreEqual(v0 - v1, -(v1 - v0));
     }
     {
         var v0 = new ivec2(-6, 1);
         var v1 = new ivec2(5, -8);
         Assert.AreEqual(v0 - v1, -(v1 - v0));
     }
     {
         var v0 = new ivec2(-5, 8);
         var v1 = new ivec2(2, 7);
         Assert.AreEqual(v0 - v1, -(v1 - v0));
     }
     {
         var v0 = new ivec2(6, 8);
         var v1 = new ivec2(-2, 0);
         Assert.AreEqual(v0 - v1, -(v1 - v0));
     }
     {
         var v0 = new ivec2(-3, 4);
         var v1 = new ivec2(-9, 1);
         Assert.AreEqual(v0 - v1, -(v1 - v0));
     }
     {
         var v0 = new ivec2(2, -6);
         var v1 = new ivec2(6, -2);
         Assert.AreEqual(v0 - v1, -(v1 - v0));
     }
     {
         var v0 = new ivec2(8, -7);
         var v1 = new ivec2(1, 7);
         Assert.AreEqual(v0 - v1, -(v1 - v0));
     }
     {
         var v0 = new ivec2(0, -9);
         var v1 = new ivec2(-6, 0);
         Assert.AreEqual(v0 - v1, -(v1 - v0));
     }
 }
示例#21
0
        internal uint GetPixel(ivec2 position)
        {
            var height = m_imageExtent.height;
            var width  = m_imageExtent.width;

            if (position.x < 0 || position.y < 0 || position.x >= width || position.y >= height)
            {
                return(0XFF997755);
            }

            return((uint)m_imageData[position.x + (position.y * width)]);
        }
示例#22
0
 public void InvariantCommutative()
 {
     {
         var v0 = new ivec2(-9, -4);
         var v1 = new ivec2(2, 6);
         Assert.AreEqual(v0 * v1, v1 * v0);
     }
     {
         var v0 = new ivec2(-3, 2);
         var v1 = new ivec2(3, 8);
         Assert.AreEqual(v0 * v1, v1 * v0);
     }
     {
         var v0 = new ivec2(-7, -4);
         var v1 = new ivec2(3, 7);
         Assert.AreEqual(v0 * v1, v1 * v0);
     }
     {
         var v0 = new ivec2(-4, 7);
         var v1 = new ivec2(-1, 9);
         Assert.AreEqual(v0 * v1, v1 * v0);
     }
     {
         var v0 = new ivec2(8, -2);
         var v1 = new ivec2(-3, -8);
         Assert.AreEqual(v0 * v1, v1 * v0);
     }
     {
         var v0 = new ivec2(6, -9);
         var v1 = new ivec2(-4, 4);
         Assert.AreEqual(v0 * v1, v1 * v0);
     }
     {
         var v0 = new ivec2(5, 4);
         var v1 = new ivec2(-7, 5);
         Assert.AreEqual(v0 * v1, v1 * v0);
     }
     {
         var v0 = new ivec2(5, -9);
         var v1 = new ivec2(3, 5);
         Assert.AreEqual(v0 * v1, v1 * v0);
     }
     {
         var v0 = new ivec2(-1, 6);
         var v1 = new ivec2(3, 4);
         Assert.AreEqual(v0 * v1, v1 * v0);
     }
     {
         var v0 = new ivec2(2, 9);
         var v1 = new ivec2(-4, -9);
         Assert.AreEqual(v0 * v1, v1 * v0);
     }
 }
        public RasterisationCamera(Window window, World world) : base(window)
        {
            ivec2 size = new ivec2();

            Glfw.GetWindowSize(window, out size.x, out size.y);
            _projection = mat4.Perspective(glm.Radians(82.0f), (float)size.x / size.y, 0.01f, 1000.0f);

            _chunkShader  = new Shader("chunk");
            _chunkTexture = new Texture("Block_Texture");

            _world = world;
        }
示例#24
0
        internal void SetPixel(ivec2 position, uint color)
        {
            var height = m_imageExtent.height;
            var width  = m_imageExtent.width;

            if (position.x < 0 || position.y < 0 || position.x >= width || position.y >= height)
            {
                return;
            }

            m_imageData[position.x + (position.y * width)] = (int)color;
        }
示例#25
0
 /// <summary>
 /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public imat3(ivec2 c0, ivec2 c1, ivec2 c2)
 {
     this.m00 = c0.x;
     this.m01 = c0.y;
     this.m02 = 0;
     this.m10 = c1.x;
     this.m11 = c1.y;
     this.m12 = 0;
     this.m20 = c2.x;
     this.m21 = c2.y;
     this.m22 = 1;
 }
示例#26
0
        public void Operators()
        {
            var v1 = new ivec2(-1, 5);
            var v2 = new ivec2(-1, 5);
            var v3 = new ivec2(5, -1);

            Assert.That(v1 == new ivec2(v1));
            Assert.That(v2 == new ivec2(v2));
            Assert.That(v3 == new ivec2(v3));
            Assert.That(v1 == v2);
            Assert.That(v1 != v3);
            Assert.That(v2 != v3);
        }
示例#27
0
文件: window.cs 项目: bennywwg/csgeom
        public Window(int width, int height, string title)
        {
            win = new NativeWindow(width, height, title, GameWindowFlags.FixedWindow, GraphicsMode.Default, DisplayDevice.GetDisplay(DisplayIndex.Third));
            ctx = new GraphicsContext(new GraphicsMode(32, 24, 0, 8), win.WindowInfo, 3, 3, GraphicsContextFlags.Default);

            ctx.MakeCurrent(win.WindowInfo);
            ctx.LoadAll();
            win.Visible = true;

            win.MouseMove += (sender, args) => _mousepx = new ivec2(args.X, args.Y);

            win.Closed += (sender, args) => _closed = true;
        }
示例#28
0
        public void StringInterop()
        {
            var v = new ivec2(4, -3);

            var s0 = v.ToString();
            var s1 = v.ToString("#");

            var v0 = ivec2.Parse(s0);
            var v1 = ivec2.Parse(s1, "#");

            Assert.AreEqual(v, v0);
            Assert.AreEqual(v, v1);

            var b0 = ivec2.TryParse(s0, out v0);
            var b1 = ivec2.TryParse(s1, "#", out v1);

            Assert.That(b0);
            Assert.That(b1);
            Assert.AreEqual(v, v0);
            Assert.AreEqual(v, v1);

            b0 = ivec2.TryParse(null, out v0);
            Assert.False(b0);
            b0 = ivec2.TryParse("", out v0);
            Assert.False(b0);
            b0 = ivec2.TryParse(s0 + ", 0", out v0);
            Assert.False(b0);

            Assert.Throws <NullReferenceException>(() => { ivec2.Parse(null); });
            Assert.Throws <FormatException>(() => { ivec2.Parse(""); });
            Assert.Throws <FormatException>(() => { ivec2.Parse(s0 + ", 0"); });

            var s2 = v.ToString(";", CultureInfo.InvariantCulture);

            Assert.That(s2.Length > 0);

            var s3 = v.ToString("; ", "G");
            var s4 = v.ToString("; ", "G", CultureInfo.InvariantCulture);
            var v3 = ivec2.Parse(s3, "; ", NumberStyles.Number);
            var v4 = ivec2.Parse(s4, "; ", NumberStyles.Number, CultureInfo.InvariantCulture);

            Assert.AreEqual(v, v3);
            Assert.AreEqual(v, v4);

            var b4 = ivec2.TryParse(s4, "; ", NumberStyles.Number, CultureInfo.InvariantCulture, out v4);

            Assert.That(b4);
            Assert.AreEqual(v, v4);
        }
示例#29
0
 /// <summary>
 /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public imat4x3(ivec2 c0, ivec2 c1, ivec2 c2, ivec2 c3)
 {
     this.m00 = c0.x;
     this.m01 = c0.y;
     this.m02 = 0;
     this.m10 = c1.x;
     this.m11 = c1.y;
     this.m12 = 0;
     this.m20 = c2.x;
     this.m21 = c2.y;
     this.m22 = 1;
     this.m30 = c3.x;
     this.m31 = c3.y;
     this.m32 = 0;
 }
示例#30
0
 /// <summary>
 /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public imat4x3(ivec2 c0, ivec2 c1)
 {
     this.m00 = c0.x;
     this.m01 = c0.y;
     this.m02 = 0;
     this.m10 = c1.x;
     this.m11 = c1.y;
     this.m12 = 0;
     this.m20 = 0;
     this.m21 = 0;
     this.m22 = 1;
     this.m30 = 0;
     this.m31 = 0;
     this.m32 = 0;
 }
 /// <summary>Do a texture lookup projectively and with explicit gradient as described in textureProjGrad,
 /// as well as with offset, as described in textureOffset.</summary>
 protected static ivec4 textureProjGradOffset(isampler2DRect sampler, vec4 P, vec2 dPdx, vec2 dPdy, ivec2 offset)
 {
     throw _invalidAccess;
 }
 /// <summary>
 /// </summary>
 /// <param name="uniformName"></param>
 /// <param name="values"></param>
 /// <returns></returns>
 public int SetUniform(string uniformName, ivec2[] values)
 {
     int location = GetUniformLocation(uniformName);
     if (location >= 0)
     {
         if (glUniform2iv == null) { glUniform2iv = OpenGL.GetDelegateFor<OpenGL.glUniform2iv>(); }
         int count = values.Length;
         var value = new int[count * 2];
         int index = 0;
         for (int i = 0; i < value.Length; i++)
         {
             value[index++] = values[i].x;
             value[index++] = values[i].y;
         }
         glUniform2iv(location, count, value);
     }
     return location;
 }
 /// <summary>  Do an offset texture lookup with explicit LOD. See TextureLod and TextureOffset.</summary>
 protected internal static ivec4 TextureLodOffset(isampler2D sampler, vec2 P, float lod, ivec2 offset)
 {
     throw _invalidAccess;
 }
 /// <summary> Do a texture lookup as in texture but with offset added to the (u,v,w) texel coordinates before looking up each texel.
 /// The offset value must be a constant expression. A limited range of offset values are supported; 
 /// the minimum and maximum offset values are implementation-dependent and given by MIN_PROGRAM_TEXEL_OFFSET and MAX_PROGRAM_TEXEL_OFFSET, respectively.
 /// Note that offset does not apply to the layer coordinate for texture arrays. This is explained in detail in section 3.8.11
 /// “Texture Minification” of the OpenGL Graphics System Specification, where offset is (∂u ,∂v ,∂w).
 /// </summary>
 protected internal static uvec4 TextureOffset(usampler2D sampler, vec2 P, ivec2 offset, float bias)
 {
     throw _invalidAccess;
 }
 /// <summary>Returns x if x >= 0, otherwise it returns –x.</summary>
 /// <returns>The absolute value of x</returns>
 protected internal static ivec2 Abs(ivec2 x)
 {
     throw _invalidAccess;
 }
 /// <summary>Returns 1.0 if x &gt; 0, 0.0 if x = 0, or –1.0 if x &lt; 0.</summary>
 /// <returns>The sign of x</returns>
 protected static ivec2 sign(ivec2 x)
 {
     throw _invalidAccess;
 }
 /// <summary>
 /// Returns a floating-point value corresponding to a signed integer encoding 
 /// of a floating-point value. If a NaN is passed in, it will not signal, 
 /// and the resulting floating point value is unspecified. If an Inf is passed in,
 /// the resulting floating-point value is the corresponding Inf.
 /// </summary>
 protected static vec2 intBitsToFloat(ivec2 value)
 {
     throw _invalidAccess;
 }
 /// <summary>Do a texture lookup with both explicit gradient and offset, as described in textureGrad and textureOffset. </summary>
 protected static float textureGradOffset(sampler2DShadow sampler, vec3 P, vec2 dPdx, vec2 dPdy, ivec2 offset)
 {
     throw _invalidAccess;
 }
 /// <summary>Do a texture lookup with both explicit gradient and offset, as described in textureGrad and textureOffset. </summary>
 protected static uvec4 textureGradOffset(usampler2DRect sampler, vec2 P, vec2 dPdx, vec2 dPdy, ivec2 offset)
 {
     throw _invalidAccess;
 }
 /// <summary> Fetch a single texel as in texelFetch offset by offset as described in textureOffset. </summary>
 protected static uvec4 texelFetchOffset(usampler2DRect sampler, ivec2 P, ivec2 offset)
 {
     throw _invalidAccess;
 }
 /// <summary>  Do a projective texture lookup as described in textureProj offset by offset as described in textureOffset. </summary>
 protected static float textureProjOffset(sampler2DShadow sampler, vec4 P, ivec2 offset, float bias)
 {
     throw _invalidAccess;
 }
 /// <summary>  Do a projective texture lookup as described in textureProj offset by offset as described in textureOffset. </summary>
 protected static uvec4 textureProjOffset(usampler2DRect sampler, vec4 P, ivec2 offset)
 {
     throw _invalidAccess;
 }
 /// <summary>  Do a projective texture lookup as described in textureProj offset by offset as described in textureOffset. </summary>
 protected static ivec4 textureProjOffset(isampler2D sampler, vec3 P, ivec2 offset)
 {
     throw _invalidAccess;
 }
 /// <summary>Returns y if y &lt; x, otherwise it returns x.</summary>
 protected internal static ivec2 Min(ivec2 x, int y)
 {
     throw _invalidAccess;
 }
 /// <summary>  Do an offset texture lookup with explicit LOD. See textureLod and textureOffset.</summary>
 protected static uvec4 textureLodOffset(usampler2D sampler, vec2 P, float lod, ivec2 offset)
 {
     throw _invalidAccess;
 }
 /// <summary>
 /// Splits x into a floating-point significand in the range [0.5, 1.0) 
 /// and an integral exponent of two, such that: x=significand⋅2**exponent
 /// The significand is returned by the function and the exponent is returned in the parameter exp. 
 /// For a floating-point value of zero, the significant and exponent are both zero. 
 /// For a floating-point value that is an infinity or is not a number, the results are undefined.
 /// </summary>
 protected static dvec2 frexp(dvec2 x, out ivec2 exp)
 {
     throw _invalidAccess;
 }
 /// <summary>  Do an offset texture lookup with explicit LOD. See textureLod and textureOffset.</summary>
 protected static float textureLodOffset(sampler2DShadow sampler, vec3 P, float lod, ivec2 offset)
 {
     throw _invalidAccess;
 }
 /// <summary>
 /// Builds a floating-point number from x and the corresponding integral exponent of two in exp, 
 /// returning: significand⋅2*+exponent
 /// If this product is too large to be represented in the floating-point type, the result is undefined.
 /// </summary>
 protected static dvec2 ldexp(dvec2 x, ivec2 exp)
 {
     throw _invalidAccess;
 }
 /// <summary>
 /// Use integer texture coordinate P to lookup a single texel from sampler. 
 /// The level-ofdetail lod is as described in sections 2.11.8 “Shader Execution” 
 /// under Texel Fetches and 3.8 “Texturing” of the OpenGL GraphicsSystem Specification.
 /// </summary>
 protected static ivec4 texelFetch(isampler2D sampler, ivec2 P, int lod)
 {
     throw _invalidAccess;
 }
 /// <summary>Returns Min (Max (x, minVal), maxVal). Results are undefined if minVal > maxVal.</summary>
 protected internal static ivec2 Clamp(ivec2 x, ivec2 minVal, ivec2 maxVal)
 {
     throw _invalidAccess;
 }
 /// <summary> Do a texture lookup as in texture but with offset added to the (u,v,w) texel coordinates before looking up each texel.
 /// The offset value must be a constant expression. A limited range of offset values are supported; 
 /// the minimum and maximum offset values are implementation-dependent and given by MIN_PROGRAM_TEXEL_OFFSET and MAX_PROGRAM_TEXEL_OFFSET, respectively.
 /// Note that offset does not apply to the layer coordinate for texture arrays. This is explained in detail in section 3.8.11
 /// “Texture Minification” of the OpenGL Graphics System Specification, where offset is (∂u ,∂v ,∂w).
 /// </summary>
 protected static vec4 textureOffset(sampler2D sampler, vec2 P, ivec2 offset, float bias)
 {
     throw _invalidAccess;
 }
 /// <summary>Returns y if x &lt; y, otherwise it returns x.</summary>
 protected internal static ivec2 Max(ivec2 x, ivec2 y)
 {
     throw _invalidAccess;
 }
 /// <summary>
 /// Use integer texture coordinate P to lookup a single texel from sampler. 
 /// The level-ofdetail lod is as described in sections 2.11.8 “Shader Execution” 
 /// under Texel Fetches and 3.8 “Texturing” of the OpenGL GraphicsSystem Specification.
 /// </summary>
 protected static uvec4 texelFetch(usampler2DRect sampler, ivec2 P)
 {
     throw _invalidAccess;
 }
 /// <summary> Do a texture lookup as in texture but with offset added to the (u,v,w) texel coordinates before looking up each texel.
 /// The offset value must be a constant expression. A limited range of offset values are supported; 
 /// the minimum and maximum offset values are implementation-dependent and given by MIN_PROGRAM_TEXEL_OFFSET and MAX_PROGRAM_TEXEL_OFFSET, respectively.
 /// Note that offset does not apply to the layer coordinate for texture arrays. This is explained in detail in section 3.8.11
 /// “Texture Minification” of the OpenGL Graphics System Specification, where offset is (∂u ,∂v ,∂w).
 /// </summary>
 protected internal static vec4 TextureOffset(sampler2D sampler, vec2 P, ivec2 offset)
 {
     throw _invalidAccess;
 }
 /// <summary> Do a texture lookup as in texture but with offset added to the (u,v,w) texel coordinates before looking up each texel.
 /// The offset value must be a constant expression. A limited range of offset values are supported; 
 /// the minimum and maximum offset values are implementation-dependent and given by MIN_PROGRAM_TEXEL_OFFSET and MAX_PROGRAM_TEXEL_OFFSET, respectively.
 /// Note that offset does not apply to the layer coordinate for texture arrays. This is explained in detail in section 3.8.11
 /// “Texture Minification” of the OpenGL Graphics System Specification, where offset is (∂u ,∂v ,∂w).
 /// </summary>
 protected static float textureOffset(sampler2DRectShadow sampler, vec3 P, ivec2 offset)
 {
     throw _invalidAccess;
 }
示例#56
0
 public ivec3(ivec2 xy, int z_)
 {
     x = xy.x;
     y = xy.y;
     z = z_;
 }
 /// <summary> Do a texture lookup as in texture but with offset added to the (u,v,w) texel coordinates before looking up each texel.
 /// The offset value must be a constant expression. A limited range of offset values are supported; 
 /// the minimum and maximum offset values are implementation-dependent and given by MIN_PROGRAM_TEXEL_OFFSET and MAX_PROGRAM_TEXEL_OFFSET, respectively.
 /// Note that offset does not apply to the layer coordinate for texture arrays. This is explained in detail in section 3.8.11
 /// “Texture Minification” of the OpenGL Graphics System Specification, where offset is (∂u ,∂v ,∂w).
 /// </summary>
 protected static ivec4 textureOffset(isampler2DRect sampler, vec2 P, ivec2 offset)
 {
     throw _invalidAccess;
 }
 /// <summary>  Do an offset texture lookup with explicit LOD. See textureLod and textureOffset.</summary>
 protected static ivec4 textureProjLodOffset(isampler2D sampler, vec4 P, float lod, ivec2 offset)
 {
     throw _invalidAccess;
 }
 /// <summary> Fetch a single texel as in texelFetch offset by offset as described in textureOffset. </summary>
 protected static ivec4 texelFetchOffset(isampler2D sampler, ivec2 P, int lod, ivec2 offset)
 {
     throw _invalidAccess;
 }
 /// <summary>  Do a projective texture lookup as described in textureProj offset by offset as described in textureOffset. </summary>
 protected static uvec4 textureProjOffset(usampler2D sampler, vec4 P, ivec2 offset, float bias)
 {
     throw _invalidAccess;
 }