opengl-es

Dynamically sized arrays in OpenGL ES vertex shader; used for blend shapes/morph targets

≡放荡痞女 提交于 2019-12-23 22:54:10
问题 I'm about to do an Opengl ES implementation of blend shapes/morph targets and I'm not quite sure about the best way for me to do this. The problems I am facing is that I want the interpolation of the vertex data to occur on the GPU but I also want the number of blend shapes to be arbitrary. To clarify, I do not want my vertex shader to look like this: Glitchy Facial Morph Target Animation in OpenGL (C++). The problem with this implementation is that the number of meshes to blend between is

Are there cross-compilable OpenGL examples made with Oxygene?

爱⌒轻易说出口 提交于 2019-12-23 22:32:32
问题 We have a working OpenGL project made for PC (works on MacOS and Linux under Wine as well) which we want to try to cross-compile to tablets. Delphi XE2/XE4 offers iOS support, but there's no Android yet and judging from iOS implementation history it might take 1-2 years. Now we start looking into other possibilities which will allow us to keep the majority of Pascal codebase (80k lines). So here's the question for the Oxygene: Are there any examples of OpenGL applications made with Oxygene

How do you run Core Animation and Core Image together on the CPU?

给你一囗甜甜゛ 提交于 2019-12-23 22:25:58
问题 Apple's Core Image Programming Guide, under the section "Getting the Best Performance" says Avoid Core Animation animations while rendering CIImage objects with a GPU context. If you need to use both simultaneously, you can set up both to use the CPU. Can anyone explain this statement? Why it would be more efficient to run Core Animation and Core Image together on the CPU, rather than using the GPU? How do you set up Core Animation to run on the CPU? 回答1: I had the same question and came

opengl es 2.0 android c++ glGetTexImage alternative

若如初见. 提交于 2019-12-23 21:07:58
问题 when testing on windows the code works as expected, but on android the glGetTexImage api doesn't exist, is there an other way of getting all the pixels from OpenGL without caching them before creating the texture? this is the code: void Texture::Bind(int unit) { glActiveTexture(GL_TEXTURE0 + unit); glBindTexture(GL_TEXTURE_2D, mTextureID); } GLubyte* Texture::GetPixels() { Bind(); int data_size = mWidth * mHeight * 4; GLubyte* pixels = new GLubyte[mWidth * mHeight * 4]; glGetTexImage(GL

How are `glTexEnv`, `glColor4x` and `glBlendFunc` related in OpenGL ES 1.0?

一个人想着一个人 提交于 2019-12-23 20:56:48
问题 I'm looking at SurfaceFlinger, i.e. the the code that is doing the composition in Android, and I have trouble understanding some of the OpenGL ES 1.0 calls as I've only programmed ES 2.0 code. Here goes the piece of code that interests me: glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); glColor4x(0x10000, 0x10000, 0x10000, 0x10000); glEnable(GL_BLEND); glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); What it is supposed to be doing is blending a texture into the buffer. Why does one

WebGl packing a float into v4

心已入冬 提交于 2019-12-23 20:50:30
问题 I have this code sample from threejs example [http://threejs.org/examples/#webgl_animation_cloth] where a float value is converted to vec4. I have seen this logic on few other forums but no explanation. Could someone explain what this logic is doing and the use of 256 ?.I understand the bitwise masking and shifting . I have seen this link too Packing float into vec4 - how does this code work? It says the vec4 will be stored in a 32 bit RGBA8 buffer finally. Since we are passing the depth

After rotation, sprite and rectangle position misaligned in Libgdx

风格不统一 提交于 2019-12-23 20:14:03
问题 I have following code, where closely mapped sprite, rectangle and polygon is been rotated at same angle in libgdx. After rotation rectangle is misaligned with the sprite. Although sprite is rotated when its drawn, the coordinates and dimensions stay same after the rotation. This is not the case for rectangle. Please see the code and results image below. public void rotate(int angle){ System.out.println("Before-recta x , y " + this.rectangle.getX() + " " + this.rectangle.getY() + " " + this

Are OpenGL indices and locations the same thing for uniforms and vertex attributes?

坚强是说给别人听的谎言 提交于 2019-12-23 20:12:06
问题 In the OpenGL Reference Pages, some functions are marked as using uniform locations, while other functions are marked as using uniform indices. Are these the same thing? Similarly for vertex attributes, some functions are marked as using vertex attribute indices, while other functions are marked as using vertex attribute locations. Are these the same? 回答1: In your first case, the location for an Uniform is different from the index used for glGetActiveUniform() . For glGetActiveUniform() case,

Rajawali rotating camera with Sensor.TYPE_ROTATION_VECTOR strange behavior

和自甴很熟 提交于 2019-12-23 20:06:51
问题 I'm creating a Panorama view which allows the user to look around in a spherical image by rotating his smartphone. I used Rajawali's Skybox for this together with the TYPE_ROTATION_VECTOR sensor. I got it working, but only when I look forward (it's literally based on my rotation (yaw)) This is the behavior: looking forward: yaw = yaw, pitch = pitch and roll = roll looking to the left: yaw = yaw, pitch = roll and roll = pitch looking backwards: yaw = yaw, pitch = pitch * -1 and roll = roll *

How to apply chroma key filter with any color to live camera feed ios?

混江龙づ霸主 提交于 2019-12-23 19:58:46
问题 Basically I want to apply chroma key filter to ios live camera feed but I want user to pick the color which will be replaced by another color. I found some examples using green screen but I don't know how to replace color dynamically instead of just green color. Any idea how can I achieve that with best performance? 回答1: You've previously asked about my GPUImage framework, so I assume that you're familiar with it. Within that framework are two filters, a GPUImageChromaKeyFilter and a