1
Graphics / Re: Image texture only drawn with some sprites, rest are white.
« on: May 20, 2014, 09:30:01 am »Quote
What's your system spec (CPU/GPU/OS)?
Is your GPU driver uptodate?
OS: OS X 10.9.2
CPU: Intel Core i7 2.66 Ghz
GPU: NVIDIA GeForce GT 330M 512 MB
Quote
You should not manually manage the memory of the image, instead you should use RAII (read this on why), shouldn't be hard to change it, you'll just have to store smart pointers instead of raw pointers.
Just started with C++ and SFML a few days ago, but have background with C and various object oriented languages, but haven't got around to reading about smart pointers. Thanks for the article!
Quote
I'd suggest you use & store textures directly instead of the images, unless you have a very specific use case for images itself. As such the textures would be stored in the map and the players would only get a reference to them.
Sounds like a good idea.
Quote
For the errors you see, I don't see anything at a first glimpse that would cause the. EXC_i386_DIV means that there's somewhere a division by zero. So the only thing I could think of is that the pointer gets somehow invalidated, but you'll have to debug it yourself. Just track the pointers and when it crashes provide the backtrace.
Will do. I'm guessing it has to do with this image stuff but that is just speculation.
Thanks for the advice.