Jump to content
  • entries
    940
  • comments
    5,894
  • views
    864,043

Implementation Details


Josh

2,153 views

 Share

A few weeks ago, I was getting pretty nervous about all the known unknowns in going cross-platform with the Leadwerks Engine 3 code. All my libraries and languages are platform-agnostic, but there's always going to be small issues, and I wanted to get those worked out while the code was still malleable. Here's a few things I found.

 

-OSX file paths don't have a drive letter, so the only way to specify a relative path is to add ".\" to the beginning. This had some significant implications for the asset reloading system.

 

-iOS file paths are case-sensitive.

 

-iOS projects require that all external files included in the project as a resource! Good thing the editor will be able to gather these up and generate a project automatically.

 

-OSX child windows can't have their own menus. This means I have to make sure the tool windows in the editor have a complete toolbar for every function you might need to use.

 

-OpenGLES doesn't allow shader uniform initializers. Although I rely on these to define default uniform values in the editor for the visual controls, the editor is actually never going to be running OpenGLES, since it's for embedded systems only. That's odd but convenient.

 

-The default OSX default font is Lucida Grand 13 pt, a bit larger than the default Windows font, which required more space on some interface elements.

 

-The minimum button dimensions on OSX you should use are 31x31. Otherwise those rounded corners won't have enough space to display properly.

 

-There is no consistent OpenGL compressed texture format. Windows and OSX support DXTC, and iOS uses PRVTC. This is annoying, because it means uncompressed RGBA is the only cross-platform texture format. However, I think we can do an automatic PRVTC compression in the editor's "Publish" step for iOS, on DXTC compressed textures only. I don't even know if PRVTC format will even appear in the editor.

 

-Aside from deferred rendering, OpenGLES2 can do pretty much anything OpenGL3 can. Pretty amazing potential here.

 

Here's the current editor, showing the texture, material, and shader systems fully working together to make this skybox material. It presently works with OpenGL 3.2 on Windows, and OpenGL 1.4 on Windows and OSX. OSX Lion comes out this month, at which point I hope to have the GL3 renderer running on Mac as well:

blogentry-1-0-77823300-1310238402_thumb.jpg

 

Android is the platform I am least worried about, in terms of initial implementation. I'm not sure if the NDK supports pure C++ programming yet, but that seems to be the direction they are heading in. The OpenGLES implementation for iOS should work the same on Android devices. iOS was definitely that hardest implementation to write, and it's not nearly complete, but I've seen enough I am confident we can become platform-agnostic with our code.

 

I'm going to take a stab at the ATI terrain bug this afternoon. I don't think I'll get it fixed today, but it looks like ATI isn't going to fix their drivers, so I need to find a way around it.

 Share

5 Comments


Recommended Comments

Glad to hear all this. Hopefully it'll turn out as good as you think it will.

 

Also, your avatar makes me smile everytime I see it. ;)

Link to comment

Excellent stuff Josh I managed to finally get the XCode after a lot of emails between me and Apple as my account kept getting locked for some reason. Now I got it I can help where possible ;)

Link to comment
-OSX file paths don't have a drive letter, so the only way to specify a relative path is to add ".\" to the beginning.

 

It's not just an OSX thing... and shouldn't the slash be the other way?

Link to comment

It's not just an OSX thing... and shouldn't the slash be the other way?

I can never remember which is which. The engine automatically corrects your paths.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...