internal override void Bind(GLContext ctx) { if (_texture != null) { _texture.Prepare(ctx, this); } if (PAT0Texture != null) { if (!PAT0Textures.ContainsKey(PAT0Texture)) { PAT0Textures[PAT0Texture] = new MDL0TextureNode(PAT0Texture) { Source = null, palette = PAT0Palette != null?RootNode.FindChildByType(PAT0Palette, true, ResourceNodes.ResourceType.PLT0) as PLT0Node : null } } ; PAT0Textures[PAT0Texture].Prepare(ctx, this); } }
internal void Bind(int prog) { if (!String.IsNullOrEmpty(PAT0Texture)) { if (!PAT0Textures.ContainsKey(PAT0Texture)) { PAT0Textures[PAT0Texture] = new MDL0TextureNode(PAT0Texture) { Source = null, _palette = !String.IsNullOrEmpty(PAT0Palette) ? RootNode.FindChildByType(PAT0Palette, true, ResourceNodes.ResourceType.PLT0) as PLT0Node : null } } ; MDL0TextureNode t = PAT0Textures[PAT0Texture]; t.Bind(); t.Prepare(this, prog, PAT0Palette); } else if (_texture != null) { _texture.Prepare(this, prog); } }