コード例 #1
0
ファイル: BoundedRenderer.cs プロジェクト: xzoth/CSharpGL
        protected override void DoInitialize()
        {
            Renderer boundingBox = this.BoundingBoxRenderer;
            if (boundingBox != null) { boundingBox.Initialize(); }

            Renderer scientific = this.ScientificRenderer;
            if (scientific != null)
            {
                scientific.Initialize();
                var sampler1D = new sampler1D();
                var bitmap = new Bitmap(@"Images\simColorCode.jpg");
                sampler1D.Initialize(bitmap);
                bitmap.Dispose();
                scientific.SetUniform("colorCodeSampler", new samplerValue(
                     BindTextureTarget.Texture1D, sampler1D.Id, OpenGL.GL_TEXTURE0));
            }
        }