Author Topic: Pigs in a Blanket GLES 2.0 Library | libScePiglet on the PSVita  (Read 22311 times)

Offline SonicMastr

  • End User
  • *
  • Posts: 10
    • View Profile
Pigs in a Blanket GLES 2.0 Library | libScePiglet on the PSVita
« on: October 30, 2020, 06:15:21 AM »
Full GLES 2.0 Support, Finally on the Vita

After 2 months of Reverse Engineering and working to make this Library the best it could be, it's finally here.

Thanks to the efforts of GrapheneCt and dots-tb with Vita Piglet, and to Zer0xFF and masterzorag with the PS4 Piglet, we have finally obtained the first full OpenGL GLES 2.0 Compliant graphics library for the Vita. Yes. Graphene found the mythical libScePiglet module.

What does this mean?

Developers who already have vast knowledge in standard GLES 2.0 will have no issue applying their knowledge to the Vita. You no longer have to remember Vita specific functions. You can just code without a worry. The only difference is that libScePiglet uses CG formatted shaders instead of GLSL. For info, check the CG resources provided at the end of the Github README.

GLFW support

I ported GLFW for the Vita that exclusively uses Piglet. The only things that are wrong are keybinds (Yes. They will be changed). That is all.

What does this do for ports?

GLES 2.0 is a common Graphics Library that is present in almost anything you can think of, most notably in mobile devices like phones and tablets, for a cross-platform, accurate and consistent experience. I know some of the normal users will want to know what this means for games. Ports utilizing standard GLES 2.0 should see little to no modifications needed, no questions asked. This makes ports much easier on the graphics side of things, resulting in less visual bugs, less translations issues, and overall better support for the Vita. This was the purpose of Piglet in PSM, and it can can easily be applied to your favorite ports using GLES 2.0. And speaking of PSM...

How is this different from PSM?

As I said, I ditched PSM. This was the alternative that we were working on for a few months now. PSM was missing quite a lot of functions, which was a pain when trying to put something together for an example. Piglet includes every function according to the GLES 2.0 standard without the PSM bloat. This in turn reduces the memory usage of a simple triangle from 54MB to just 25MB by eliminating PSM all together.

Piglet
PSM
Why this over VitaGL?

VitaGL was, and still is an ambitious project to create an Open Sourced OpenGL wrapper from the ground up. It has been running the porting scene for quite a while due to being the closest thing to OpenGL on the Vita as possible, although its identity is not solid. It tries to be both GL1 and GLES2, and because each function has to be manually recreated, it is still missing a lot functionality that a developer may expect. The accompany this, it utilizes a host of custom extensions to try to restore functionality where it was lost. With these though, VitaGL-specific functions and the lack of in-depth documentation of those functions further hinders its ability to be adopted easily.

Piglet will remove the confusion of VitaGL and give developers a simpler, easier time with porting and its overall usage, allowing developers to use many existing GLES 2.0 resources. Piglet is a certified OpenGLES 2.0 standard, and as such, strives to be as accurate as possible, while also providing better memory utilization and performance by utilizing SceLibc and PTLA (Present and Texture Load Accelerator), an asynchronous hardware 2D processing unit, used for texture copy and format convertion/transfer. Its identity is GLES 2.0 and will always be, so there will be no guesswork in how the pipeline will function.

We want to give the developers the tools to make their homebrew the best they can be without the frustration of wondering if it could work.


To start using Pigs in a Blanket for your projects today, just head on here.

Ghidra project file provided
« Last Edit: October 30, 2020, 10:30:18 AM by cuevavirus »
Hentai is the Purest Art Form We Have

Offline W00fer

  • End User
  • *
  • Posts: 8
    • View Profile
Re: Pigs in a Blanket GLES 2.0 Library | libScePiglet on the PSVita
« Reply #1 on: October 30, 2020, 10:25:42 AM »
Congratulations. In layman's terms, how does this compare or relate to the recently released libshacccg.suprx ?

@SonicMastr

Offline Graphene

  • Useful Idiot
  • ***
  • Posts: 108
    • View Profile
Re: Pigs in a Blanket GLES 2.0 Library | libScePiglet on the PSVita
« Reply #2 on: October 30, 2020, 10:29:39 AM »
Libshacccg is just runtime shader compiler. This is full GLES API implementation, that aslo includes runtime shader compiler. Basically, this allows to easily port any GLES application to Vita with minimal effort.

Offline Cimmerian_Iter

  • End User
  • *
  • Posts: 11
    • View Profile
Re: Pigs in a Blanket GLES 2.0 Library | libScePiglet on the PSVita
« Reply #3 on: October 30, 2020, 11:06:20 AM »
PSM may have failed for its original purpose, but it sure has helped a lot the homebrew community

Offline dots_tb

  • Refugee
  • **
  • Posts: 93
    • View Profile
Re: Pigs in a Blanket GLES 2.0 Library | libScePiglet on the PSVita
« Reply #4 on: October 30, 2020, 11:17:36 AM »
PSM may have failed for its original purpose, but it sure has helped a lot the homebrew community
PSM has helped the community. Just to be clear, this isn't PSM.

Offline FMudanyali

  • Hot Pockets
  • End User
  • *****
  • Posts: 31
    • View Profile
    • My personal website
Re: Pigs in a Blanket GLES 2.0 Library | libScePiglet on the PSVita
« Reply #5 on: October 30, 2020, 02:00:34 PM »
https://forum.devchroma.nl/index.php/topic,296.0.html

an example app to go along with the included PIB samples, es2gears, can be found here.
« Last Edit: October 30, 2020, 02:02:44 PM by fmudanyali »
!! I love the forums !!