Hello, I am trying to get tinyptc working with a class I have made for buffers. Now the part I am stuck on is how to give the ptc_update(buffer) bit the actual buffer from my class ?
Here's the class setup code
class cBuffer
{
private:
int iXRES;
int iYRES;
int* iBuffer;
public:
//-- Constructor/Destructor
cBuffer(int iWidth,int iHeight);
~ cBuffer();
//-- Info Methods
int GetWidth(){return iXRES;}; // Return buffer width
int GetHeight(){return iYRES;}; // Return buffer width
//-- Drawing to buffer Methods
void WritePixel(int x,int y,int rgb);
void Cls(int rgb);
};
and the constructor so you can see how iBuffer is made
cBuffer::cBuffer(int iWidth,int iHeight)
{
iXRES=iWidth;
iYRES=iHeight;
iBuffer= new int[iXRES*iYRES];
}
Now I will need to add a method to get the iBuffer in such a way it matchs ptc_update's needs but I am not sure how ?
Cheers
Jon