Exemplo n.º 1
0
 private void postConstructor(Landscape terrain = null)
 {
     if (this._postConstructor)
     {
         if (_shader == null)
         {
             _shader = PoolProxy.GetResource <ObtainShaderPool, ShaderAllocationPolicy <PlantShader>, string, PlantShader>(ProjectFolders.ShadersPath + "plantVertexShader.glsl" + "," + ProjectFolders.ShadersPath + "plantFragmentShader.glsl");
         }
         this._postConstructor = false;
     }
 }
Exemplo n.º 2
0
        private void postConstructor(Landscape terrain = null)
        {
            if (this._postConstructor)
            {
                AlignPlantsToTerrain(terrain);
                this._attribs = PlantUserAttributeBuilder.BuildReadyUserAttributeBuffer(_plants, _attribs);
                _buffer       = new VAO(_attribs);

                VAOManager.genVAO(_buffer);
                VAOManager.setBufferData(BufferTarget.ArrayBuffer, _buffer);

                _shader = PoolProxy.GetResource <ObtainShaderPool, ShaderAllocationPolicy <PlantShader>, string, PlantShader>(ProjectFolders.ShadersPath + "plantVertexShader.glsl" + "," + ProjectFolders.ShadersPath + "plantFragmentShader.glsl");
                this._postConstructor = !this._postConstructor;
            }
        }