opengl-es-2.0

Why does GLSL's arithmetic functions yield so different results on the iPad than on the simulator?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 08:13:42
问题 I'm currently chasing some bugs in my OpenGL ES 2.0 fragment shader code which is running on iOS devices. The code runs fine in the simulator, but on the iPad it has huge problems and some of the calculations yield vastly different results, I had for example 0.0 on the iPad and 4013.17 on the simulator, so I'm not talking about small differences which could be the result of some rounding errors. One of the things I noticed is that, on the iPad, float1 = pow(float2, 2.0); can yield results

OpenGL-ES 2.0 VS OpenGL-ES 1.1, which is faster?

我怕爱的太早我们不能终老 提交于 2019-12-12 07:56:22
问题 I've written an app using OpenGL-ES 1.1, but am wondering if there are speed gains to be found by switching to 2.0. Has anyone done any tests with large polygon count models? I only want to render triangles that have different colors, nothing fancy. However, I am wanting to render about 1 million triangles for my comparison test. 回答1: OpenGL ES 1.1 and 2.0 provide two very different ways of doing 3-D graphics, so I don't know that direct performance comparisons make much sense. You're

Getting default frame buffer id from GLKView/GLKit

被刻印的时光 ゝ 提交于 2019-12-12 07:30:30
问题 I use GLkit/GLKView in my IOS OpenGL ES 2.0 project to manage default FBO/life cycle of my app. In desktop OpenGL in order to bind default FBO (the front buffer) I can just call glBindFrameBuffer(GL_FRAMEBUFFER,0) but this is not the case in IOS app since you have to create the default FBO yourself and it will have a unique ID; The problem is GLKit/GLKView coding style force me to use GLKView's "bindDrawable" function to activate default FBO which make the design of my cross platform

OpenGL ES 2.0 Support for Android?

一个人想着一个人 提交于 2019-12-12 07:14:16
问题 I've seen multiple takes on this topic and its starting to confuse me. I really hope someone can give me a definitive answer! :) I guess to be blunt: does the Android emulator support OpenGL ES 2.0? I've seen some people say "Yes, but you have to change a few settings." and I've also seen "No, it doesn't support it, period." Here's what I've done to try and correct the problem, including some error messages that I got. First, I modified the AndroidManifest.xml to contain the following code:

What versions of GLSL can I use in OpenGL ES 2.0?

风格不统一 提交于 2019-12-12 07:10:04
问题 I can't seem to find a clear answer on this, despite hours of googling. Can someone just tell me what's going on? I get errors saying things like, "version 140 is not supported." Is this my device (Kindle Fire) or GL ES 2.0? Do I need to add libraries or anything? 回答1: you actually don't have to add any libraries, 140 is far too new for Kindle Fire. Either remove the version specification or decrement it until the shader compiles. You may need to fix some other errors in the shader as the

GLES20.glLinkProgram() call in Android does not return

北城以北 提交于 2019-12-12 03:42:35
问题 I have a LinkedQueue that stores the calls to anything from the GLES20 class. After loading it up I send a requestRender() call to GLSurfaceView and in onDrawFrame() I process the queue and call the actual GLES20 method. Yet when I call GLES20.glLinkProgram() the function never returns. I don't have anything in the logcat, no exception, no killed thread nothing. It just remains there. Any ideas in which conditions glLinkProgram() doesn't return and what can I do to debug this situation? It's

Android's Garbage Collector appear when trying to render 3D model with Opengl ES20

三世轮回 提交于 2019-12-12 03:35:04
问题 My app renders 3D models via opengl ES2, once at a time. When I enable textures in those model my app crashes. First, I thought that was because the texture images are large, but the truth is that they are not. For instance, in one of the models, I use four .png images of sizes 4kb, 38kb, 39kb, and 200kb respectively. Are they large? I don't think so, but reading the logcat it seems that everything comes from a memory problem: 08-26 02:08:13.574: I/art(10870): Background sticky concurrent

Android NDK, Opengl es 2, VBO crashes the render

只愿长相守 提交于 2019-12-12 03:09:47
问题 Ok this is the fourth time that I post this issue. It is a complicate problem, I know that. I'm going to explain all, beacuse I dont know what is important or not, and this problem looks like is something stupid in the code, that I don't realize. I had been developing a game engine for Android with the render part in c++ NDK, few days ago, I had no problem with this, I could see my game correctly in any android device, then, I wrote more code, updated Android Studio from 1.5.2 to 2.1.3,

opengl es 2.0 populating the Vertex and index Buffer

情到浓时终转凉″ 提交于 2019-12-12 02:43:32
问题 This may seem like a silly question but i feel i need to ask it so i can understand how openGl buffers work. I have two buffers , vertex buffer and index buffer. To fill these buffers i am parsing an obj file. After parsing the data i fill the buffers with what i think is the correct data and order of data. However when i debug the code i see some strange things in the buffers. Firstly the vertex buffer. The first 3 values that i put in the Vbuffer are 0.99,-0.99,-0.7741 However when i check

drawing part of open gl texture

杀马特。学长 韩版系。学妹 提交于 2019-12-12 01:26:09
问题 I am trying to draw only part of my sprite sheet. But it just scales the image and no drawing 1/3 of the width of the image. How can I crop the image so only 1/3 shows. Text is below ( ios 7,opengl es 2)- (GLKMatrix4) modelMatrix { GLKMatrix4 modelMatrix = GLKMatrix4Identity; modelMatrix = GLKMatrix4Translate(modelMatrix, x, y, 0); return modelMatrix; } - (void)setSprite:(NSString *)fileName effect:(GLKBaseEffect *)newEffect { // 1 self.effect = newEffect; // 2 NSDictionary * options =