glmaterialfv is deprecated in opengl es2? - opengl-es-2.0

I found some functions like glmaterialfv are no longer available in OpenGL ES2 headers.
like the following method,
glmaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE,color)
How to set the materials using OpenGL ES2? I need to set both Front and Back ambient, diffuse colors?

The fixed function pipeline is not available in ES 2.0. So everything that includes materials, lights, the matrix stack, etc., is gone. If you look at the official spec file, ES 2.0 was actually specified as a new API, not a new version of the ES 1.1 API.
With ES 2.0, you have to write your own shader programs in GLSL for lighting calculations, and a lot of other functionality that the fixed pipeline previously handled for you. The initial hurdle might look higher than it is for ES 1.1, but you will get used to it pretty quickly, and then appreciate the new power and flexibility.
You should be able to find some good tutorials for ES 2.0 online.

OpenGL ES 2.0 is not backwards compatible with OpenGL ES 1.1 - these are two completely different APIs.

Related

How do I convert OpenGLES shaders to Metal compatible ones?

I have a project which uses about 2 dozen .vsh and .fsh files to draw 2D tiles using OpenGLES. Since that is deprecated, I want to convert my project to Metal. My head is now swimming with vocabulary and techniques involved in both systems - graphics is not my forte.
Can I use OpenGLES to compile the .vsh/.fsh files, and then save them in a metal-compatible format? The goal would be to then use the saved information in a metal-centric world and remove all the OpenGLES code from the project. I've spent a few days on this already, and yet I don't understand the processes enough to fully attempt the transition to Metal. Any/all help is appreciated.
I saw this: "On devices that support it, the GLSL code you provide to SKShader is automatically converted to Metal shading language and run on a Metal renderer", which leads me to believe there is a way to get this done. I just don't know where to begin. OpenGL ES deprecated in iOS 12 and SKShader
I have seen this:
Convert OpenGL shader to Metal (Swift) to be used in CIFilter, and if it answers my question, I don't understand how.
I don't think this answers it either: OpenGL ES and OpenGL compatible shaders
Answers/techniques can use either Objective-C or Swift - the existing code is Objective-C, the rest of the project has been converted to Swift 5.
There are many ways to do what you want:
1) You can use MoltenGL to seamlessly convert your GLSL shaders to MSL.
2) You can use open-source shader cross-compilers like: krafix, pmfx-shader, etc.
I would like to point out that based on my experience it would be better in terms of performance that you try to rewrite the shaders yourself.

Kinect fusion with Kinect 2.0

I am looking for a code which will able to perform kinect fusion as done by Newcombe with Kinect v2.0 . I know that that principle used for Kinect 1 is different from the principle used for Kinect 2.0 . I have found one famous open source library which does this, pcl. But The code is specific for kinect 1.0. Is there any opensource library which can do this for Kinect 2.0. If not is there a way I can refactor the current open source codes to make it for 2.0 . If I am refactoring the code for 2.0 then is there anything else I have to modify other than, changing the resolution of the camera outputs? Is there a way I can compensate for extra noisy result given by Kinect 2.0 other than increasing the smoothing in bilateral filtering. Is there a way I can handle the extra distorted results given by Kinect 2.0? I looking to use libfreenect2.
Thanks :)

PVR texture format: MGLPT_PVRTC4 vs OGL_PVRTC4

PVR texture format from Imaginations.
Defined in PVRTexLibGlobals.h
What is difference with texture formats?
MGLPT_PVRTC4 vs OGL_PVRTC4
I have used OGL_PVRTC4 before. Does MGLPT_PVRTC4 is exactly same?
My code broke when some tool gave MGLPT_PVRTC4 texture. I am wondering how should we process MGLPT_PVRTC4 textures.
The best place to ask would be at the PowerVR Insider forum (http://forum.imgtec.com/categories/powervr-graphics). FWIW, MGL is an old API that pre-dates OpenGL ES 1.0 (and the latter recently turned 10).
It is extremely likely that the ordering of the contents of the file will have changed between the two.

Game development using OpenGL ES 2.0 and C

I wanted to develop a game. I want to develop with the knowledge that I am having in OpenGL ES 2.0 and C language.
First thing that comes into my mind is how to develop textures etc. So please can any one tell me what are all the tools, game engine etc what all i need.
Any good tutorials for the same.
thanks in advance.
You said you want to use OPENGL ES 2.0, I understand you want develop for an Android or IPhone device.
You need read some about matrix, rotation, translations. OpenGl ES doesn't have glrotate and gltranslate methods(and more), but you can develop your own methods method using then OpenGl documentation:
http://www.opengl.org/sdk/docs/man/xhtml/glRotate.xml
http://www.opengl.org/sdk/docs/man/xhtml/glTranslate.xml
If you want to use OPENGL for draw, you will need write a vertex and fragment shader
What kind of shader for 2D games (ie. Super Mario)
A lot of stuff you need, this is only a little piece. I hope this be helpful to you.

How to set hints in OpenGL ES 2?

In previous versions of OpenGL, you could set various hints such as GL_LINE_SMOOTH_HINT, and set the shade model to GL_SMOOTH. How can you do this in OpenGL ES 2?
The only hint target in ES is GL_GENERATE_MIPMAP_HINT and other things such as 1D textures are missing.
GL_SMOOTH and other lighting related (or even matrix projection) hints are not something you can hint at OpenGL ES 2.0 to do because this functionality must be implemented in the programmable shader pipeline which is left to the developer to implement in OpenGL ES 2.0 and is not handled by OpenGL ES as it was in the 1.x versions.
However, OpenGL ES 2.0 still handles mip-map generation. That is why hints like GL_GENERATE_MIPMAP_HINT are still valid.