Aesthetics problem
Aesthetics problem
I wrote class Gpaphics that allow me to draw sprites, DrawSprite function. This function has input parameter Sprite* where Sprite it is my class. Sprites loads in their own constructor. BUT for drawing sprites i use StretchRect which requre IDirect3DSurface9* which i create using IDirect3DDevice9->CreateOffscreenPlainSurface(). All this mean that i need pass IDirect3DDevice9 to the constructor of Sprite class. It's not the right way because device object the same during all time. And i do not want pass the device instance for every facking little sprite object. May somebody help me?
- Attachments
-
- Graphics.cpp
- (2.78 KiB) Downloaded 438 times
-
- Graphics.h
- (618 Bytes) Downloaded 440 times