1
Graphics / Noob: pass &RenderWindow to constructor. Set as Public v
« on: March 26, 2011, 09:51:32 am »
there are several possibilities, depends on what you do with your classes
yes you can pass a reference in the constructor (and store it as member)
OR
you can inherit Game from RenderWindow, so every game instance has game properties and IS a renderwindow, so you can draw directly
OR
if you have many instance of Game for only one window, you can use a static member
yes you can pass a reference in the constructor (and store it as member)
OR
you can inherit Game from RenderWindow, so every game instance has game properties and IS a renderwindow, so you can draw directly
OR
if you have many instance of Game for only one window, you can use a static member