////!!!!temp //public bool _tempAlphaToCoverage; //public void SettempAlphaToCoverage( bool value ) { _tempAlphaToCoverage = value; needUpdate = true; } //////////// ////!!!!struct? //public struct AvailableParameterItem //{ // internal string name;//!!!!!!так? // internal ParameterType type; // internal int elementCount; // public string Name // { // get { return name; } // } // public ParameterType Type // { // get { return type; } // } // public int ElementCount // { // get { return elementCount; } // } //} //////////// //public struct TextureParameterValue//public class TextureParameterValue //{ // xx xx;//int Index; // //!!!!какие-то параметры могут быть тоже составными // public Component_Image Texture; // public TextureAddressingMode AddressingMode; // public FilterOption FilteringMin; // public FilterOption FilteringMag; // public FilterOption FilteringMip; // public ColorValue BorderColor; // public TextureFlags AdditionFlags; // //!!!! // //int numMipmaps; // //bool isAlpha; // //virtual void _setTextureLayerAnisotropy( size_t unit, unsigned int maxAnisotropy ) = 0; // //virtual void _setTextureMipmapBias( size_t unit, float bias ) = 0; // //public ContentTypes contentType; // //bool fetch4; // //public TextureParameterValue() // //{ // //} // //public TextureParameterValue( Component_Image texture, TextureAddressingMode addressingMode, FilterOption filteringMin, FilterOption filteringMag, FilterOption filteringMip, ColorValue borderColor ) // //{ // // this.texture = texture; // // this.addressingMode = addressingMode; // // this.filteringMin = filteringMin; // // this.filteringMag = filteringMag; // // this.filteringMip = filteringMip; // // this.borderColor = borderColor; // //} // public TextureParameterValue( Component_Image texture, TextureAddressingMode addressingMode, FilterOption filteringMin, FilterOption filteringMag, FilterOption filteringMip ) // { // this.Texture = texture; // this.AddressingMode = addressingMode; // this.FilteringMin = filteringMin; // this.FilteringMag = filteringMag; // this.FilteringMip = filteringMip; // this.BorderColor = new ColorValue( 0, 0, 0, 0 ); // this.AdditionFlags = 0; // } // //public Texture Texture // //{ // // get { return texture; } // //} //} //////////// internal unsafe GpuMaterialPass(/*OgrePass* realObject, */ GpuLinkedProgram linkedProgram) { this.linkedProgram = linkedProgram; //this.realObject = realObject; ////init programs //this.programs = programs; //for( int n = 0; n < programs.Length; n++ ) //{ // _old_GpuProgramType type = (_old_GpuProgramType)n; // if( programs[ n ] != null ) // OgrePass.setProgram( realObject, type, programs[ n ].Name ); //} ////compile, prepare parameters //OgrePass.compile( realObject ); ////!!!!!check error ////get available parameters //{ // int count = OgrePass.getAvailableParameterCount( realObject ); // availableParameters = new AvailableParameterItem[ count ]; // for( int n = 0; n < count; n++ ) // { // IntPtr namePointer; // ParameterType type; // int elementCount; // OgrePass.getAvailableParameterInfo( realObject, n, out namePointer, out type, out elementCount ); // AvailableParameterItem item = new AvailableParameterItem(); // item.name = OgreNativeWrapper.GetOutString( namePointer ); // item.type = type; // item.elementCount = elementCount; // availableParameters[ n ] = item; // } //} }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// public GpuMaterialPass(GpuProgram vertexProgram, GpuProgram fragmentProgram) { //!!!!может не сразу получать linkedProgram = GpuProgramManager.GetLinkedProgram(vertexProgram, fragmentProgram); }