Thanks for the info Hiura,
my SFML experience on windows is so nice that I do not want something to stop me from using it as a cross platform tool to move my screensaver to mac osx.
4)
SFML is compiled for both 32 and 64 bits. You can check this with the file command.
What is the "file command" on mac?
Do you mean to look at the file properties of the frameworks?
I hope the problem is there.
5) SFML command to create render window
This is an incomplete "SFMLcanvas" class.
I had a WINcanvas and tried to to a MACOSXcanvas. The win/mac drawing is so different that I decided to go for a GUI abstraction library (SFML was the winner).
In the SFML canvas you can see 3 constructors.
I use the first in windows to start the screensaver. It does take the hWnd and behave correctly.
I use the second in the mac osx screensaver lib.
class TmioanCanvasSFML: public TmioanCanvasAbstract //, protected TmioanNativeWindowAutoDetect
{
protected:
NativeWindowHandle windowHandle;
sf::RenderWindow sfmlWindow;
public: // data
public: // constructor
TmioanCanvasSFML(const NativeWindowHandle wHandle):
windowHandle(wHandle),
sfmlWindow(wHandle)
{
TmioanUtils::DebugLogLn("TmioanCanvasWin(wHandle) constructor start");
};
TmioanCanvasSFML(const int aTop, const int aLeft, const int aWidth, const int aHeight):
windowHandle(NULL),
sfmlWindow(sf::VideoMode(aWidth, aHeight),"")
{
TmioanUtils::DebugLogLn("TmioanCanvasWin(top,left,bottom,right) constructor start");
// toDo: na balo window styles
};
TmioanCanvasSFML():
windowHandle(NULL)
{
TmioanUtils::DebugLogLn("TmioanCanvasWin() constructor start");
//sfmlWindowPtr = new sf::RenderWindow(wHandle);
};
~TmioanCanvasSFML()
{
};
public: // functions
void clear(void)
{
sfmlWindow.clear();
}
void repaint(void)
{
//TmioanUtils::DebugLogLn("TmioanCanvasWin.repaint()");
sfmlWindow.display();
};
void drawSprite(const sf::Drawable &aSprite)
{
sfmlWindow.draw(aSprite);
};
/*
virtual void setRect(LPRECT aRect)
{
TmioanCanvasAbstract::setTLBR(aRect->top, aRect->left, aRect->bottom, aRect->right);
};
*/
void fillWithColor(const TmioanColor &aColor)
{
//RECT tmpRect = toRect();
//FillRect(hDC, &tmpRect ,(HBRUSH) CreateSolidBrush(aColor));
};
void blitFrom(const int myX, const int myY,
const TmioanCanvasAbstract *fromCanvas,
const int fromCanvasX, const int fromCanvasY,
const int fromCanvasWidth, const int fromCanvasHeight)
{
};
void textOut(int x, int y, const char *text)
{
//TmioanUtils::DebugLogLn("TmioanCanvasWin textOut:",text);
sf::Text Txt;
Txt.setString(text);
Txt.setColor(sf::Color(0, 128, 128));
Txt.move((float)x, (float)y);
sfmlWindow.draw(Txt);
};
void setPixel(int x, int y, const TmioanColor &aColor)
{
};
const TmioanColor getPixel(int x, int y)
{
return 0;
};
int getWidth(void)
{
return sfmlWindow.getSize().x;
};
int getHeight(void)
{
return sfmlWindow.getSize().y;
};
};