Hello every one. I have to draw balls on surface, but there is no function for circle or ellipse. Do I have to draw the balls via SetPixel or there is any other alternative?. Also when once application starts, and ProcessNextFrame is Called, can I call some other function within ProcessNextFrame who has its own CGapiSurface pointer for e.g if I try to call my own function then ...
virtual HRESULT ProcessNextFrame(CGapiSurface* pBackbuffer, DWORD dwFlags)
{
...
circle(int x,int y, int radious);
...
}
circle(int x,int y,int radious)
{
CGapiSurface* MYBACKBUFFER; //here Run time error
MYBACKBUFFER->SetPixel(10,10,RBG(255,255,255);
...
}
Athough there is no compile time error, but Run time error occurs and application terminates. And also let me know of the overhead if i try to create circle via SetPixel() . And what about importing a *.png file. can some one plz give me a complete example about importing an image ???
virtual HRESULT ProcessNextFrame(CGapiSurface* pBackbuffer, DWORD dwFlags)
{
...
circle(int x,int y, int radious);
...
}
circle(int x,int y,int radious)
{
CGapiSurface* MYBACKBUFFER; //here Run time error
MYBACKBUFFER->SetPixel(10,10,RBG(255,255,255);
...
}
Athough there is no compile time error, but Run time error occurs and application terminates. And also let me know of the overhead if i try to create circle via SetPixel() . And what about importing a *.png file. can some one plz give me a complete example about importing an image ???