private void browseImageButton_Click(object sender, EventArgs e) { OpenFileDialog fileDialog = new OpenFileDialog(); if (fileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { texturePath = fileDialog.FileName; texturePath = texturePath.Replace("\\", "\\\\"); texturePathTextBox.Text = texturePath; pictureBox1.Image = Image.FromFile(texturePath); applyTexture = true; } renderer.setTexture(); renderer.Draw(); }