6
« on: July 17, 2011, 11:04:00 pm »
Oh sorry. I meant to say "that's what I did after your first response" :lol:
Anyways, that is essentially everything that is giving me problems. I am also experiencing it with SFML.Graphics.Image();.
This is the entire constructor of my class:
public class GridEditGL : Panel
{
private Sprite drawSpr;
private Sprite objSpr;
public Dictionary<string,Sprite> drawSprList = new Dictionary<string,Sprite>();
public List<tile> tilelist = new List<tile>();
public List<obj> objlist = new List<obj>();
public Sprite bgSpr;
public SFML.Graphics.Image bg;
private string defaultEmpty = @"resources\engine\editor\images\empty.png";
public EnviroEditor parent;
public RenderWindow mainWin;
public GridEditGL(EnviroEditor par)
{
this.parent = par;
this.Size = new Size(320, 320);
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
drawSpr = new Sprite();
bg = new SFML.Graphics.Image();
objSpr = new Sprite();
bgSpr = new Sprite();
timer = new Timer();
mainWin = new RenderWindow(this.Handle);
mainWin.PreserveOpenGLStates(true);
mainWin.UseVerticalSync(true);
updateSize();
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.OptimizedDoubleBuffer, false);
SetStyle(ControlStyles.Opaque, true);
UpdateStyles();
}
Edit: By the way, the class GridEditGL is created inside of the constructor of another class, which is created in the constructor of another class.