All Projects → SonicMastr → Pigs-In-A-Blanket

SonicMastr / Pigs-In-A-Blanket

Licence: LGPL-3.0 license
A Piglet/ShaccCg Wrapper Library for OpenGL ES 2.0 Support on the Vita

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Pigs-In-A-Blanket

BetterTrackPlug
Playtime tracker plugin for PS Vita.
Stars: ✭ 44 (+18.92%)
Mutual labels:  psvita, psvita-homebrew
Gapid
GAPID is a collection of tools that allows you to inspect, tweak and replay calls from an application to a graphics driver.
Stars: ✭ 1,975 (+5237.84%)
Mutual labels:  opengl-es, gles2
fake-08
A Pico-8 player/emulator for console homebrew
Stars: ✭ 374 (+910.81%)
Mutual labels:  psvita, psvita-homebrew
Pingo
A tile painting puzzle game for the PS Vita
Stars: ✭ 17 (-54.05%)
Mutual labels:  psvita, psvita-homebrew
ux-dx
The core for UX Components and UX Animate
Stars: ✭ 13 (-64.86%)
Mutual labels:  egl, gles2
lvg
Lion Vector Graphics
Stars: ✭ 106 (+186.49%)
Mutual labels:  opengl-es, gles2
Glad
Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs.
Stars: ✭ 2,296 (+6105.41%)
Mutual labels:  egl, gles2
rpi-opengl-without-x
Raspberry Pi OpenGL ES 2 without an X server (using EGL)
Stars: ✭ 120 (+224.32%)
Mutual labels:  opengl-es, egl
Ezfilter
A lightweight (<180KB), easy-to-extend Android filter and dynamic sticker framework for adding filters and stickers for camera, video, bitmap and view.(一个轻量级(<180KB)、易扩展的Android滤镜和动态贴纸框架,支持摄像头、视频、图片和视图添加滤镜和贴纸。)
Stars: ✭ 155 (+318.92%)
Mutual labels:  opengl-es
Flextgl
OpenGL and Vulkan header and loader generator.
Stars: ✭ 180 (+386.49%)
Mutual labels:  opengl-es
Gl
Go cross-platform OpenGL bindings.
Stars: ✭ 148 (+300%)
Mutual labels:  opengl-es
Videoslimmer
A video converter for Android to compress video using MediaCodec(decode and encode). 一个安卓视频压缩工具,使用了Mediacodec
Stars: ✭ 161 (+335.14%)
Mutual labels:  opengl-es
Metalangle
MetalANGLE: OpenGL ES to Metal API translation layer
Stars: ✭ 182 (+391.89%)
Mutual labels:  opengl-es
Diligentengine
A modern cross-platform low-level graphics library and rendering framework
Stars: ✭ 2,142 (+5689.19%)
Mutual labels:  opengl-es
Glslviewer
Console-based GLSL Sandbox for 2D/3D shaders shaders
Stars: ✭ 2,834 (+7559.46%)
Mutual labels:  opengl-es
Diligentsamples
Sample projects demonstrating the usage of Diligent Engine
Stars: ✭ 138 (+272.97%)
Mutual labels:  opengl-es
Boatapp
Environment for running Minecraft Java Edition on Android
Stars: ✭ 230 (+521.62%)
Mutual labels:  opengl-es
Worldwindandroid
The NASA WorldWind Java SDK for Android (WWA) includes the library, examples and tutorials for building 3D virtual globe applications for phones and tablets.
Stars: ✭ 204 (+451.35%)
Mutual labels:  opengl-es
Openscenegraph
OpenSceneGraph git repository
Stars: ✭ 2,321 (+6172.97%)
Mutual labels:  opengl-es
Apitrace
Tools for tracing OpenGL, Direct3D, and other graphics APIs
Stars: ✭ 2,198 (+5840.54%)
Mutual labels:  opengl-es

Development Halted

Superceded by PVR_PSP2


Original README.md

Development Time

Pigs In A Blanket | OpenGL ES 2.0 on the PS Vita by CBPS

A Piglet/ShaccCg Wrapper Library for OpenGL ES 2.0 Support on the Vita

Now with System App and Experimental MSAAx4 Support!


Compiling

With VDSuite

  • Install VDSuite
  • Install Taihen
  • Run cmake . -Bbuild -G Ninja (Recommend Ninja)
  • cd build and ninja install
  • Link libpib.a in your projects

With VitaSDK

  • Install VitaSDK
  • Run vdpm taihen to install libtaihen_stub
  • Run make -j4 install USE_VITASDK=1
  • Link libpib.a in your projects

Note when building your projects:

ALWAYS COMPILE YOUR PROJECTS WITH UNSAFE. Doing otherwise will result in PIB failing.

With VitaSDK you can specify the SceLibc heap size by defining sceLibcHeapSize in your code:

unsigned int sceLibcHeapSize = 2 * 1024 * 1024;

Piglet needs an SceLibc heap size of at least 2MB to intialize. Without it, the module will fail to start. This heap needs to be larger if using -nostdlib as this becomes your main heap. More info on -nostdlib support in the headers.

You'll need to link your program with:

  • libpib.a
  • liblibScePiglet_stub.a
  • libSceShaccCg_stub.a
  • libtaihen_stub.a
  • libSceAppMgr_stub.a

For DolceSDK, you'll also need:

  • libSceSharedFb_stub.a
  • libSceGxmInternalForVsh_stub.a
  • libSceGxmInternal_stub.a

Check the "Samples" folder for examples of how to use PIB to initialize OpenGLES 2.0 with EGL or GLFW.

Yes. We have a GLFW3 port for the vita. You can use it by simply including it in your project as normal or build it here: https://github.com/SonicMastr/glfw-vita
Note: Button mapping is perfect and there's full touchscreen support.

To install Piglet on your Vita, just use the Pigs in a Blanket Configuration Tool

Documentation Provided in the Headers. I'm clean.

What is Pigs in a Blanket?

This library is a developer focused wrapper which provides easy initialization and expandability, with some quality of life features, including supporting resolutions up to 1920x1080 native on the Playstion TV, and on the Vita with Sharpscale. Developers can choose make their applications with one resolution in mind, as all long as the code is made to scale by dimension, PIB will handle the rest with it's companion app, the Pigs in a Blanket Configuration Tool, which allows the user to specify their own preference of resultion that will automatically override the original settings. For more information aobut Piglet, you can check out our information about it on our forum post.

It library doubles as the heart of Piglet's Shader compiling abilities, removed in the standalone module. I spent the time to rewrite the shader compiler code according to PSM specifications to re-enable the ShaccCg support that was removed. This includes proper return codes and regular log output, so you never have to wonder what's going on with your shaders. Piglet DOES NOT support GLSL shaders though, so you'll need to convert the shaders to CG. Check the resources at the end of this README for converting your shaders.

This library also support EGL 1.5 eglGetProcAddress functionality using the PIB_GET_PROC_ADDR_CORE flag, as the orignal Piglet only returns extensions per EGL 1.4 standard. Thanks to dots-tb we were able to create a simple patch to support returning GLES functions as well.

Custom Extension Support

This library will allow us to add extensions using native functions as we feel fit. We'll accept the requests of any developers who have ideas of what extensions to add utilizing PIB, and they will all be able to be accessed via eglGetProcAddress.

Supported Extensions

GL EGL
GL_EXT_draw_instanced EGL_SCE_piglet_sync
GL_EXT_instanced_arrays EGL_SCE_piglet_vita_pre_swap_callback
GL_SCE_piglet_shader_binary EGL_SCE_piglet_vita_vsync_callback
GL_SCE_texture_resource
GL_OES_texture_npot
GL_OES_rgb8_rgba8
GL_OES_depth_texture
GL_EXT_texture_format_BGRA8888
GL_EXT_read_format_bgra
GL_OES_texture_half_float
GL_OES_texture_half_float_linear
GL_OES_vertex_half_float
GL_OES_element_index_uint
GL_EXT_texture_compression_dxt1
GL_EXT_texture_compression_dxt3
GL_EXT_texture_compression_dxt5
GL_EXT_texture_compression_s3tc
GL_EXT_texture_storage
GL_IMG_texture_compression_pvrtc

Special Thanks

  • GrapheneCt - Finding the Piglet Module and being a main part of the Project in reverse engineering and testing
  • dots-tb - Initial idea of using PSM and efforts in getting all of the names for Piglet, as well as being a main part of the Project in reverse engineering and testing
  • cuevavirus - Help with debugging and sense of direction
  • CreepNT - Help with debugging
  • Princess-of-Sleeping - Dump tool and PrincessLog
  • xyzz - Initial deep dive into how ShaccCg works
  • Zer0xFF and masterzorag - Their amazing work on the PS4 Piglet reverse engineering

GLSL to CG Conversion Resources

Microsoft GLSL to HLSL: https://docs.microsoft.com/en-us/windows/uwp/gaming/glsl-to-hlsl-reference
Nvidia CG Standard Library: http://developer.download.nvidia.com/cg/index_stdlib.html
Nvidia CG GLSL Vert to CG: http://developer.download.nvidia.com/cg/glslv.html
Nvidia CG GLSL Frag to CG: http://developer.download.nvidia.com/cg/glslf.html

This requires both libshacccg.suprx and libScePiglet.suprx to be located in ur0:data/external

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].