Aesthetics problem

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
User avatar
maxon887
Posts: 9
Joined: March 28th, 2014, 8:48 am

Aesthetics problem

Post by maxon887 » July 23rd, 2014, 9:48 am

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 336 times
Graphics.h
(618 Bytes) Downloaded 335 times

Post Reply