Register    Login    Forum    Search    FAQ

Board index » Everything




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Aesthetics problem
 Post Posted: July 23rd, 2014, 9:48 am 
User avatar

Joined: March 28th, 2014, 8:48 am
Posts: 9
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 66 times
Graphics.h [618 Bytes]
Downloaded 64 times
Top 
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 1 post ] 

Board index » Everything


 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: