I have a Cell class, that extends DrawNode. But whenever I try to call one of it’s drawing methods like so:
cell->drawSolidCircle(position, cell->radius, M_PI * 2, segments, color);
The program crashes, redirects me to CCGLProgram.cpp and it’s GLProgram::use method and give me this error,
First-chance exception at 0x5B58B3E1 (libcocos2d.dll) in Agar.exe: 0xC0000005: Access violation reading location 0x00000014.
Unhandled exception at 0x5B58B3E1 (libcocos2d.dll) in Agar.exe: 0xC0000005: Access violation reading location 0x00000014.
I’m fairly certain everything is done right as it is shown on forums and guides. I can even add a sprite to the drawNode and have it display on the screen. But drawing in the node simply doesn’t work for some reason.