Skip to content

Added support for iOS OpenGL/ES 3.0 and Win32 OpenGL/ES 3.1+ through PowerVR SDK#94

Open
borisblizzard wants to merge 4 commits into
rive-app:mainfrom
borisblizzard:main
Open

Added support for iOS OpenGL/ES 3.0 and Win32 OpenGL/ES 3.1+ through PowerVR SDK#94
borisblizzard wants to merge 4 commits into
rive-app:mainfrom
borisblizzard:main

Conversation

@borisblizzard

Copy link
Copy Markdown

I did all code changes to ensure compilation for the two targets.

I use Rive SDK in a custom build system setup and it works fine there. However, I am not very familiar with the structure of all build files and interdependencies (build_rive.sh etc.) in the Rive SDK so I didn't do the appropriate changes there. It would be great if somebody else could add the proper targets so others can use this as well.

I did some other very minor changes listed in the changelogs below to "fix" some issues I had when using the SDK.

The combined changelogs of all revisions:

  • Added preprocessor for iOS OpenGL/ES 3.0. The preprocessor is RIVE_IOS_GLES. Edited all code to compile.
  • Added preprocessor for Win32 OpenGL/ES 3.1+ through PowerVR SDK. The preprocessor is RIVE_DESKTOP_GLES_PVR. Edited all code to compile.
  • Changed a few "private" declarations to "protected" to make it easier to inherit and reuse SDK code rather than rewriting.
  • Marked Factory::decodeFont() and Factory::decodeAudio() virtual.

…IOS_GLES. Edited all code to compile.

- Added preprocessor for Win32 OpenGL/ES 3.1+ through PowerVR SDK. The preprocessor is RIVE_DESKTOP_GLES_PVR. Edited all code to compile.
- Changed a few "private" declarations to "protected" to make it easier to inherit and reuse SDK code rather than rewriting.
- Marked Factory::decodeFont() and Factory::decodeAudio() virtual.
@csmartdalton

Copy link
Copy Markdown
Contributor

Hey @borisblizzard !

Is the issue here that you want to use PowerVR SDK, but it doesn't support Metal? We intentionally leave OpenGL out of our iOS backend, and would like to keep it that way if possible. Is it possible you could use Vulkan instead? We have a scrappy MoltenVK fork that adds VK_EXT_rasterization_order_attachment_access, which our Vulkan backend can use on iOS Metal: https://github.com/rive-app/MoltenVK/tree/VK_EXT_rasterization_order_attachment_access

@borisblizzard

Copy link
Copy Markdown
Author

@csmartdalton Hello!

We develop our apps for mobile platform, but we still use mainly Windows for the majority of the development cycle. PowerVR SDK on Win32 isn't the fastest, but it gets the job done and it's quite stable with the Rive SDK.

The Rive SDK actually works surprisingly well with iOS OpenGL/ES 3.0 as well. As a matter of fact, we see fewer problems than with OpenGL/ES 3.1 on Android.

Unfortunately integrating Vulkan into our renderer is not an option, at least not right now.

(Originally we actually did implement a Metal backend in our renderer, but funny enough, it performed about 10-20% worse than our iOS OpenGL/ES 3.0 renderer. So it made more sense to get Rive to run on that rather than Metal. And it was surprisingly easy. As You can see, my suggested changes in the code are minimal.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants