Isnt clipping planes work in kivy opengl? - kivy

Im trying to make render to texture for reflection and refration texture for water shader... but glClipPlane is not defined in kivy opengl.. Here are some ScreenShots
Test with PyOpengl
Test with kivy Opengl

From Clipping-planes in OpenGL ES 2.0, it looks like this wasn't part of OpenGL ES 2.0, which Kivy nominally targets. If you do want to use it, you probably can, but it isn't part of Kivy's exposed API (these low level opengl calls are usually considered internal to Kivy).

Related

OpenGL ES deprecated in iOS 12 and SKShader

I am very new to the concept and use of shaders in SpriteKit.
I found this tutorial on how to render a Mandelbrot fractal with a custom shader file - Fractal.fsh - attached to a Color Sprite's Custom Shader property.
https://www.weheartswift.com/fractals-Xcode-6/
It works fine and I thought to my self that learning about OpenGL ES and custom shaders in SpriteKit would be a fun exercise.
According to Apple though, OpenGL ES is deprecated as of iOS 12.
https://developer.apple.com/library/archive/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/BestPracticesforShaders/BestPracticesforShaders.html
My question is this:
Does this mean that custom shaders for use in SpriteKit should be written in Metal as of now?
I have tried to figure out how to rewrite the fractal.fsh shader code, referred to in the first link, in Metal but I have not - yet - been able to find any resources on how to convert existing custom SKShader's from OpenGL ES to Metal. However, I am NOT looking for someone to rewrite that code to use Metal, only a pointer in the right direction.
UPDATE:
Based on the answer from #Knight0fDragon I will try to clarify my question:
The documentation on the SKShader class states that:
"An SKShader object holds a custom OpenGL ES fragment shader."
https://developer.apple.com/documentation/spritekit/skshader
So if a SKShader object holds a custom OpenGL ES fragment shader, what will it hold after the support for OpenGL ES is deprecated?
How would one go on about creating a custom fragment shader to use in SpriteKit if one cannot use OpenGL ES as of iOS 12?
First I thought that the *.fsh file containing the GLSL code could be replaced with a *.metal file containing equivalent metal code but that assessment was clearly too naive (because I tried and I couldn't assign the *.metal file to the Color Sprite's Custom Shader property)
From the documentation on "Executing Shaders in Metal and OpenGL
":
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.
So, from my understanding, SpriteKit will use Metal as a backend where it is available and convert your shaders for you when compiling them. I did not find an option to directly write the shaders in Metal.
According to Apple (see near bottom of the page at this link)...
Apps built using OpenGL ES will continue to run in iOS 12, but OpenGL
ES is deprecated in iOS 12. Games and graphics-intensive apps that
previously used OpenGL ES should now adopt Metal [emphasis added].
If you are starting from scratch, I suggest you write shaders in Metal.

Equivalent for GL_POLYGON_OFFSET_FILL in Metal

My app currently uses OpenGL and i set polygon offset using glPolygonOffset and GL_POLYGON_OFFSET_FILL. I am in the process of transforming my code to Metal and looking for the equivalent methods in Metal. What are they?
MTLRenderCommandEncoder setDepthBias:slopeScale:clamp:

StageXL Canvas always empty

I'm just new to Stagexl and Dart.
I'm reading the little starting guide on stageXL.org (http://www.stagexl.org/docs/getting-started.html) and I'm trying the sample code to draw a red circle and it doesn't work (the canvas is empty).
None of the samples I found on some page didn't work.
For example, this one with the four square: http://www.stagexl.org/docs/wiki-articles.html?article=introduction, the canvas is always empty..
Need some help ..
If you know a good tutorial for learning StageXl please share it to me !
Thanks.
The current version of StageXL (version 0.12) does not support vector graphics when the WebGL renderer is used. Please opt-out from the WebGL renderer and use the Canvas2D renderer like this:
// do this before the Stage constructor is used
StageXL.stageOptions.renderEngine = RenderEngine.Canvas2D;
The next versions of StageXL (starting with 0.13) will support more vector graphics commands even when the WebGL renderer is used. Please be aware that WebGL is optimized for rendering textures (Bitmap/BitmapDatas) and drawing vector graphics may be a costly operation depending on the use case.

Qt5, Webgl and QGLWidget

I have a huge application rendering a 3d scene in a c++ QGLWidget. Is it possible using Qt5 & webgl to add a scripting layer to the application in order to interactively "paint" on the QGLWidget? How?
In QGLWidget, you would use Native openGL API to draw, and input APIs to take input. In WebGL code, you would use WebGL (along with Canvas wrappers) to draw. What is the meaning of "interactive paint" operation here ?

How can I render bevel polygon on iPhone?

I checked out Tangram from App Store. How can I make this bevel effect on different shapes? What technology do I need create such a layout?
Do I need OpenGL ES or cocos2D maybe Quartz2D?
Actually I've documented the development process of tangram!, find it here: http://gotoandplay.freeblog.hu/categories/compactTangram/
At that time there was no option to render OpenGL polygons with anti-aliasing, so I made a demanding workaround to achieve the result (I wanted to add bump effect too, but later on I skipped). The point is in this post: http://gotoandplay.freeblog.hu/archives/2010/02/04/compactTangram_074_-_organizing_textures_performance_preservingincreasing_plan/
Funny.
Since than, you can easily render with anti-alias, and retina also a solution for that pain, so some polygon mesh, some shader for specular stuff, and there you go, or go with Cocos2D, as you mentioned, it has growing 3D support.

Resources