Mac vs windows code differences

I have a strange simple problem. I have a project that is pretty simple, just sending messages and drawing some interface to the screen. I need to make this app cross platform (well just windows and mac. I started to make this on mac, as it was what was close at hand.

I have a very simple setup with a class that has a draw loop, it has a font in it, but the font only draws on mac (I am using the exact same files on each platform synced with dropbox). The font loads fine, i dont get errors in either program, and the fonts example works fine on both platforms. However, in the context of my class, the font will only draw on mac. The code looks fine to me and I dont understand why it does not draw.

I am using OF master branch from git.

Here is the relevant code from my videoItem class:

class VideoItems: public ofxMSAInteractiveObject  {
public:

ofColor idleColor, overColor, downColor;


string artist, title, year, duration, udpCommand;

int width, height;

int localX, localY;

ofImage thumbnail;

ofTrueTypeFont font;

bool usesProjector1, usesProjector2, usesProjector3;
int videoId;

	void setup() {
    
    ofLogVerbose()<<"MyTestObject::setup() - hello!\n"<< endl;
    font.load("frabk.ttf", 18,true, true);
    enableMouseEvents();
    enableKeyEvents();
	}
	
	
	void exit() {
		ofLogVerbose()<<"MyTestObject::exit() - goodbye!\n"<< endl;
	}
	
	
	void update() {
    
	}
	
	
	void draw(int incomingX, int incomingY) {
   
    //just update the x positions as the buttons are dynamic
    localX=incomingX;
    localY=incomingY;
    
    //this is the background rectangle
    ofSetColor(0);
    ofDrawRectRounded(localX, localY, width, height,10);
    
    //here is the thumbnail
     ofSetColor(255);
    thumbnail.draw((localX+width)-320,localY+20, 284,160);

    //here is the info for each video
    ofSetColor(255, 255, 255);
    font.drawString("Artist: " + artist, localX + 40, localY + 65);
    font.drawString("Title: " + title, localX + 40, localY + 95);
    font.drawString("Year: " + year, localX + 40, localY + 125);
    font.drawString("Duration: " + duration, localX + 40, localY + 155);

    //this section just draws a semi-transparent rectangle over the top of each item if there is a roll-over or touch down event
    if(isMousePressed()){ ofSetColor(downColor);
        
        ofDrawRectRounded(localX, localY, width, height,10);
    }
    else if(isMouseOver()){ ofSetColor(overColor);
        ofDrawRectRounded(localX, localY, width, height,10);
    }
		
    else {
        ofSetColor(idleColor);
    }

	}
};

This is drawn by another class, that is in the ofApp.h.

I also have some other differences between mac and PC for this project that surprise me, I think they are my own fault, but if anyone is aware of big differences (maybe it is also compiler interpretation, I am using Xcode and VS).

It would be great to get some experiences from someone else on this (differences between mac and windows on the master branch).

Ok, this went a bit further, I switched to another job that also has to be cross platorm, this one is even more simple. Again, it is fine on OSX, but even drawing images does not work on windows. I have changed graphics processors for the app and still no difference. The image loader example works fine, strangely a video file in the same app loads fine and plays, the images are loading fine, but even if I take everything out of the draw loop except for a single jpg being drawn, the screen is black. I tried to use opengl 3.2 and 2.1 but still no joy. Are there any restrictions to using the same code in the same folder with different OS’s?

Hi, I do a lot of cross platform stuff (develop on OSX and deploy to win and/or osx) and never seen what you mention.

can you share the code for this?

What I have found some issues with shaders in very particular situations or openGL stuff with strange settings but normal stuff like drawing an image has never been a problem.
Which version of windows are you using?
are you syncing with dropbox still? I’m not sure if this will introduce problems so I’d rather sync using github.

best

@roymacdonald It would be great if you have a chance to test this. I guess dropbox could cause the problem, but the strange thing is all the examples work fine and all the examples from the addons involved work fine on both platforms. I have put the src, addons.mk and data folder in a zip here temporarily.

https://dl.dropboxusercontent.com/u/12543203/deosnt%20work%20on%20windows%20for%20me.zip

Cheers

Fred

Hey,
I tried your code on windows and it displays the image, although it was using Parallels on my mac. Because of this I had to change in main.cpp to use the default gl setup rather than the programmable one, that you had.
cheers