Draw outside openGLControl_OpenGLDraw

May 8, 2012 at 8:18 PM

Hi,
 
I'm currently working on my own game-engine with the following class hierarchy:
Program -> Game -> RenderWindow , this all works fine but when I started refactoring all my game logic to the Game class (I used to have everything in RenderWindow) I had to move my GameObjects to Game also since that is the logical move to make. Now I can no longer call my GameObject.Draw inside "openGLControl_OpenGLDraw" although I do draw it in the same function that used to call "openGLControl_OpenGLDraw" (I called "openGLControl_OpenGLDraw" manually in my gameloop) problem is, my GameObject starts flickering and I do not know why !
 
Does anyone know the answer on this one? For convenience i'm drawing everything in immediate mode.
 
Greetz,
Mutsi

May 8, 2012 at 8:39 PM

--- SOVLED ---

How stupid how could I have overlooked that. I actually called the base GameCore class draw call that clears the screen after making the drawcall :|

May 10, 2012 at 2:44 PM
Mutsi wrote:

--- SOVLED ---

How stupid how could I have overlooked that. I actually called the base GameCore class draw call that clears the screen after making the drawcall :|

Hi Mutsi,

I'm interested in building a Game engine too...if you want to collaborate please contact me: ShaneDotKirkbrideAtGmailDotCom

Dot = .

and At = @

Thanks,

~Shane