glfm | OpenGL ES and input for iOS , tvOS , Android , and WebGL | Graphics library
kandi X-RAY | glfm Summary
kandi X-RAY | glfm Summary
Write OpenGL ES code in C/C++ without writing platform-specific code. GLFM is an OpenGL ES layer for mobile devices and the web. GLFM supplies an OpenGL ES context and input events. It is largely inspired by GLFW. GLFM is written in C and runs on iOS 9, tvOS 9, Android 4.1 (API 16), and WebGL 1.0 (via Emscripten). Additionally, GLFM provides Metal support on iOS and tvOS.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of glfm
glfm Key Features
glfm Examples and Code Snippets
Community Discussions
Trending Discussions on glfm
QUESTION
I have a problem porting my OpenGL 3.3 ("desktop") based game engine to OpenGL ES 3.2 ("mobile"). While everything works perfectly on the desktop, on mobile everything works but shadow maps.
My question is very simple: can someone spot a problem in the code I shared, or point me in the right derection?
Context- All my engine code is written in C
- Apart from the application layer (I use glfw on desktop and glfm on mobile) the code base is identical: the exact same code is compiled for desktop and for mobile.
- The shaders - apart from injected headers like #version and precision defaults - are also identical across platforms
- The shadow map system in my engine is based on the tutorial found here: https://learnopengl.com/Advanced-Lighting/Shadows/Point-Shadows
- I am using an NVIDIA GTX 1080 for desktop for development, have tested with other NVIDIA PC's as well
- I am using a brand new ASUS ROG II Phone and an old LG G5 for testing, both run Android 9, both support OpenGL ES 3.2 according to the CPU-Z app, and both show the exact same flawed results.
My very simple light test level is rendered correctly on desktop. There is a yellow (invisible) light to the right of the column in the middle, so the shadow should be cast to the left as shown in the following desktop screenshot:
But it's very wrong on mobile:
As you can see the shadow on mobile is "just wrong". It's supposed to be on the left like on the desktop, but in stead it goes in the wrong direction, and looks "chopped off".
My own thoughts and actions- I've taken great care to make sure that all my calls are available on OpenGL ES 3.2 just like they are on OpenGL 3.3 Core
- I've taken great care making sure that there are no problems with the OpenGL calls: I am using glDebugMessageCallback and there are no errors being reported at any time
- Since it "just works" on desktop, I feel like the math behind it isn't wrong
- My engine support caching of shadow maps for far away light as a performance optimization, but disabling this had no effect, so it's not causing the problem.
The code that creates the CUBE MAP textures to hold the shadows:
...ANSWER
Answered 2019-Nov-29 at 08:47I found the answer, and (to me) it is baffling, but I found out it is according to specs. I made it work instantly after I changed my geometry shader from this:
QUESTION
I am trying to compile GLFM using emscripten and cmake. I followed the instructions on the GitHub page to do so, and the cmake command to generate all of the project files works without a hitch (other than some deprecation warnings), but when I enter the line cmake --build .
I get errors.
Here is the entire output:
...ANSWER
Answered 2018-Apr-28 at 23:13The solution to this problem is as follows:
Don't use windows.
I used Ubuntu and everything went excellently aside from installing a modern version cmake. After searching for a while the method for doing that which worked for me can be found here: https://peshmerge.io/how-to-install-cmake-3-11-0-on-ubuntu-16-04/
QUESTION
It seems babel transform works in my testcase code, but es6 syntax in node_modules
does not.
jest config ...npm 4.5
MacOS Sierra
ANSWER
Answered 2017-Aug-02 at 07:00I figured it out. By default jest doesn't transform ES6 js code from node_modules
. In my case, the package react-navigation
module need to be translated. So I added transformIgnorePatterns
to my jest configuration and everything worked:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install glfm
Tested with Emscripten 2.0.8.
There is no CMake generator for Android Studio projects, but you can include CMakeLists.txt in a new or existing project.
Select "Start a new Android Studio project".
Select "No Activity".
In "Save location", enter [path/to/glfm]/build/android and press "Finish".
In AndroidManifest.xml, add the main <activity> like so:
In app/build.gradle, add the externalNativeBuild and sourceSets.main sections like so:
Press "Sync Now" and "Run 'app'"
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page