Rendering differences between Windows/Mac?

Hi, I’m working on a simple game with the aim of making it work on Linux, Mac and Windows.

So far so good on Linux and Mac. When I run the program I get the following:

With the little green dudes moving from the right to the left.

However, running the exact same code in the exact same IDE version on my Windows machine gets this:

With the dude moving from the left to the right.

The only differences I can see (other than OS) is that my Windows machine has an NVidia Geforce card, while my Linux machine is an Intel integrated card and my Mac has an AMD. All the graphics drivers for each system are up to date.

Any ideas what the issue could be? They both use the exact same camera positioning code.

If you have the default simple application setup then hitting “C” will dump the current camera settings to the console. You could use that to confirm that the camera positioning is the same/different.

Unless you can narrow it down to a simple test case that you can post, we can’t really help further I guess. I often run my stuff on Windows and Linux without this issue.

1 Like

Yeah, just spent a bit of time confirming that the camera locations are the same between OSes. I’ll work on boiling it down to a simple test case (hopefully that’ll show me where the issue is!). Thanks for the reply!

If you want to test someone else’s prebuilt JME app to see if it has the same issues then you can try this one:

I know it works on Linux, Windows XP, and Windows 7.

It might be related to the core/compatibility profile. If I remember correctly (I might not) jME requests an OpenGL 2.1 (3?) compatible profile. Which might not be supported since OSX only supports Opengl 3.3 and 4.1 Core profiles so jME falls back to OpenGL 1 (I think) and then you don’t have shader support.
If you search the forums you’ll find some posts about how to make jME request a core profile.

See https://developer.apple.com/opengl/capabilities/

Wrong operating system.

LoL I got that ass backwards :slight_smile: Never mind me I’ll just show myself out.

Hey I’m an iOS/MacOS developer so that’s some really good info to have either way. :smile: thanks!

I got the default cube application to show in Windows, so I’m assuming I’m doing something wrong with the camera or when I do the local translation stuff for my shapes. I think I’m close to figuring it out, so if I do I’ll post the fix and some gists of the code. Thanks for your replies guys!

So I figured out the issue. The initialize method for my main screen used Nifty:

    public void initialize(AppStateManager stateManager, Application app) {
        logger.log(Level.INFO, "MainMenuState.initialize()");
        super.initialize(stateManager, app);
        
        // ...

        screen = MAIN_MENU_SCREEN;
        Nifty nifty = this.niftyDisplay.getNifty();
        nifty.fromXml(NIFTY_MENU_LOCATION, MAIN_MENU_SCREEN, this);

        viewPort.addProcessor(this.niftyDisplay);
    }

When I comment out the viewPort.addProcessor(niftyDisplay), line, the program works perfectly on all the platforms. When it’s there, the rendering issue occurs - but only on Windows!

I’ll admit I’m really not sure why this is happening. I’ve only been using JME off-and-on for a few years, and this is my first time trying to seriously develop a game with it… what about view ports am I missing? I’m obviously doing something wrong but I honestly have no clue what.

At least the problem was resolved. I’d just like to know why that broke it.