opengl-es

How to add 3d context works in JsBridge by adding WebGLRenderingContext?

非 Y 不嫁゛ 提交于 2019-12-25 09:05:21
问题 Currently JsBridge supports only getContext("2d") and not getContext("webgl"). public object getContext(string contextType) { if (contextType == "2d") { if (this.context == null) { this.context = new CanvasRenderingContext2D(this.window, this); } return this.context; } return null; } Ideally, to make JsBridge supports 3D, one needs public object getContext(string contextType) { if (contextType == "2d") { if (this.context == null) { this.context = new CanvasRenderingContext2D(this.window, this

Replace the camera stream in a Wikitude ArchitectView with an external video stream

对着背影说爱祢 提交于 2019-12-25 08:34:00
问题 I'm working on an Android mobile app oriented to the real time augmented visualization of a drone's camera view (specifically I'm working on a DJI Phantom 3 Professional with relative SDK). I'm using Wikitude framework for the AR part. Every Wikitude sample works by augmenting the smartphone's camera view, so I need to redirect the input video stream. At this stage, by using the DJI SDK features, I have a TextureView object containing the correctly decoded stream coming from the drone. The

SPTween freezes when dragging/zooming a view inside UIScrollView

心不动则不痛 提交于 2019-12-25 08:19:26
问题 I am using Sparrow framework. I have been playing with moving sprites around using SPTween and SXParticleSystem. The problem is when I move or resize a view inside UIScrollView, those tween and particles just freeze. When I end dragging, the sprite moves again, not from where it froze but they move from where they should be if it weren't frozen. How can animate those sprites along side with other animating UIKit elements. I did try to use CoreAnimation (UIView animation) and drag the

setContentView crashes android emulator

旧街凉风 提交于 2019-12-25 07:35:40
问题 I am going through the android tutorials on how to use graphics and animations. When I set my new content view the application crashes. I looked up the problem here and saw people with similar problems with this tutorial, but none of the solutions I have found have worked for me. I know people said the order of the lines when you set up your renderer is important but I have it in the same order they said to use. When I run in debug it seems to crash in the middle of the call to setContentView

GPUImageLookupFilter with intensity control?

て烟熏妆下的殇ゞ 提交于 2019-12-25 05:50:33
问题 I am using Brad Larson's GPUImage framework for my project. I was trying to find a way to implement intensity control to GPUImageLookupFilter and came across https://github.com/BradLarson/GPUImage/issues/1485 gl_FragColor = mix(textureColor, vec4(vec3(newColor),1.0), mixTexture); the "textureColor" is the original texture, and "newColor" is the LookupFilter result, and mixTexture is the Alpha value which is (0 ~ 1.0), you can think it as intensity variable. I do not know how to implement this

OpenGL sending vertex pointers or generating buffers

ⅰ亾dé卋堺 提交于 2019-12-25 05:35:52
问题 I just started OpenGL for iPhone, using GLKit. My programming background is almost just java and objective c with little,little experiences with C, C++ over ten years ago. All what remained is a remote memory of how I struggled with pointers - and I think I failed. Now it seems as if it all comes back to me ... I went to some iterations of the great, great tutorial series of Ian Terrel, which really helped me (Thanks!!!). This question is about the following parts of the code (which is mostly

openGL texturing is running on emulator but not on real device

ⅰ亾dé卋堺 提交于 2019-12-25 05:28:17
问题 I'm trying to show textures by openGL. In following code I want to draw simple square with texture. When I run it on android emulator, everything is OK, but when I run it on real device, I can see only white square without any texture. There is similar problem, but I don't use NDK. I use only Java. public class MainActivity extends Activity { public static TextView t; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LinearLayout l = new

Strange behavior of alpha without blending in WebGL

夙愿已清 提交于 2019-12-25 05:13:55
问题 I found strange behavior of WebGL when it is rendering with blending turned off. I reproduced it on this simplest tutorial. Just change strings: gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); to gl_FragColor = vec4(0.0, 0.0, 0.0, 0.5); and gl.clearColor(0.0, 0.0, 0.0, 1.0); to gl.clearColor(1.0, 1.0, 1.0, 1.0); So, since blending is turned off, I supposed to see black shapes on white background (alpha 0.5 of the pixel shouldn't make influence). But I see gray shapes on white backgound. I believe I

Playing video with many particles animated on top

会有一股神秘感。 提交于 2019-12-25 05:13:35
问题 I am playing a movie using an AVPlayer and animating 500 falling particles on top. I tried to simply add 500 animated CALAyers. I tried several variations on that but performance is always a problem. As soon as I get more then around 100 CALayers, the video gets choppy. What would be the proper way to do this? I thought maybe this should be done using OpenGL, but I never used it and can't find how to have a video played in OpenGL. I can get the background videos as separate frame pngs, but

Program crashes when releases UIImage after generating OpenGL ES texture

你离开我真会死。 提交于 2019-12-25 04:36:07
问题 Right now, I have followed this tutorial: http://iphonedevelopment.blogspot.com/2009/05/opengl-es-from-ground-up-part-6_25.html It does not work if I tried to release UIImage: I will get a 'EXC_BAD_ACCESS'. Now, I made the UIImage to be instance variables and retain them. I do not make it autorelease. But the problem is sometimes I want to delete my texture. I need to release those UIImage or else I will have a leak. (The Performance Tool Leaks report that UIImage causes leaks) But if I