opengl-es

Is using GL_NEAREST_MIPMAP_* or GL_LINEAR_MIPMAP_* for GL_TEXTURE_MIN_FILTER considered erroneous if MIP maps have not been generated?

和自甴很熟 提交于 2019-12-11 10:43:08
问题 I have a feeling this is one of those situations that will depend on the driver implementation since this scenario is not described in the OpenGL specification. However, I'm hoping that someone will know if using GL_(LINEAR/NEAREST)_ MIPMAP_* without generating MIP maps would be treated the same as using GL_(LINEAR/NEAREST)? 回答1: Define "without any active MIP textures"? I'm not sure how you would, since there's no such thing as a "mip texture" (a texture contains mipmaps, but mipmaps are not

OpenGL ES Texture Mapping Overflow

限于喜欢 提交于 2019-12-11 10:40:47
问题 I want to animate a 2d Sprite sheet. I hava a sprite sheet with a lot of character animation with different frame size. For a single animation, I scale a vertex to fit one frame and then change Texture position for animation. Works pretty well for one animation, but when switching to another animation with different frame size and scale vertex and fitting texture again, I get side effect where texture is stretcht and not fitting, it is just on one animation frame, but make the change between

OpenGL ES 2.0 Pinch and Zoom

梦想的初衷 提交于 2019-12-11 10:36:13
问题 In OpenGL ES 1.1 on iOS I used to implement pinch and zoom by setting the Field Of View using the following: // Handles Touches Events - (IBAction)handlePinchGesture:(UIGestureRecognizer *)sender { static float startFOV=0.0; CGFloat factor = [(UIPinchGestureRecognizer *)sender scale]; UIGestureRecognizerState state; state=sender.state; if(state==UIGestureRecognizerStateBegan) { startFOV=[self getFieldOfView]; } else if(state==UIGestureRecognizerStateChanged) { float minFOV=5.0; float maxFOV

iOS 7 and OpenGL issues/crashes

爱⌒轻易说出口 提交于 2019-12-11 10:21:35
问题 I'm working on an iPad app for work and ever since the update to iOS 7, we're seeing random hangs on iPads. I am a little new to debugging with XCode. From what I can tell, the main thread is blocked waiting for something to complete, but I don't know what that is. Here is the thread dump: * thread #1: tid = 0x260c, 0x384f4554 libsystem_kernel.dylib`__semwait_signal + 28, queue = 'com.apple.main-thread, stop reason = instruction step over frame #0: 0x384f4554 libsystem_kernel.dylib`__semwait

Set origin to top-left corner of screen in OpenGL ES 2

大城市里の小女人 提交于 2019-12-11 10:19:35
问题 I'm developing an Android app with OpenGL ES 2.0. It consists of a 2D HUD overlaid on a 3D scene. Everything is fine with the 3D part, but I cannot figure out how to position the origin at the top-left corner of the screen (with the y-axis pointing down) when drawing in 2D. Right now I have the origin at the center of the screen and I am just subtracting half the width and height from the coordinates as I draw. (I know this is a hacky solution and I want to fix this!) Here is the relevant

OpenGL ES 2.0 draw Fullscreen Quad very slow

我的梦境 提交于 2019-12-11 09:25:39
问题 When I'm rendering my content onto a FBO with a texture bound to it and then render this bound texture to a fullscreen quad using a basic shader the performance drops ridiculously. For example: Render to screen directly (with basic shader): And when render to texture first, then render texture with fullscreen quad: (with same basic shader, would be something like blur or bloom normally): Anyone got an idea how to speed this up? Since the current performance is not usable. Also I'm using GLKit

How do I set up the viewable area in a scene within OpenGL ES 2.0?

試著忘記壹切 提交于 2019-12-11 09:19:57
问题 I have done programming in OpenGL and I know how to set the viewable area in it with gluOrtho() , but a function like this does not exist in OpenGL ES 2.0. How would I do this in OpenGL ES 2.0? P.S : I am doing my OpenGL ES 2.0 development in Ubuntu 10.10 with the PowerVR SDK emulator. 回答1: As Nicol suggests, you'll want to set up an orthographic projection matrix. For example, an Objective-C method I use to do this is as follows: - (void)loadOrthoMatrix:(GLfloat *)matrix left:(GLfloat)left

glDrawTexfOES draws black texture on phone, and correct in emulator

我的未来我决定 提交于 2019-12-11 09:19:04
问题 I'm writing a 2D game using OpenGL, using png images (64x64 pixels, with transparency) stored in my resources. My code looks like this : import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.opengles.GL10; import javax.microedition.khronos.opengles.GL11; import javax.microedition.khronos.opengles.GL11Ext; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.opengl.GLUtils; import android.opengl

Android NDK OpenGL ES 1.0 Simple Rendering

醉酒当歌 提交于 2019-12-11 09:16:31
问题 I'm starting out with the Android NDK and OpenGL. I know I'm doing something (probably a few) things wrong here and since I keep getting a black screen when I test I know the rendering isn't being sent to the screen. In the Java I have a GLSurfaceView.Renderer that calls these two native methods. They are being called correctly but not drawing to the device screen. Could someone point me in the right direction with this? Here are the native method implementations: int init() { sendMessage(