opengl-es-2.0

Recommended practice environment for OpenGL ES 2.0?

妖精的绣舞 提交于 2019-12-18 13:30:47
问题 I decided to learn some OpenGL ES 2.0 and I am trying to pick a practice platform for it. What comes to possible target platform, it could be Android, iPhone or WebGL. But I don't want to spend too much time and effort to get the environment setup properly. Would you recommend WebGL for a fast start to OpenGL ES 2.0 learning or something else? Edit: I am using Mac and I am not really interested in ES 1.x at the moment. 回答1: If you register as a developer at the iOS Developer Center (free),

iOS 5 + GLKView: How to access pixel RGB data for colour-based vertex picking?

梦想的初衷 提交于 2019-12-18 10:57:19
问题 I've been converting my own personal OGLES 2.0 framework to take advantage of the functionality added by the new iOS 5 framework GLKit . After pleasing results, I now wish to implement the colour-based picking mechanism described here. For this, you must access the back buffer to retrieve a touched pixel RGBA value, which is then used as a unique identifier for a vertex/primitive/display object. Of course, this requires temporary unique coloring of all vertices/primitives/display objects. I

Images and mask in OpenGL ES 2.0

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-18 05:45:09
问题 I'm learning OpenGL ES 2.0 and I'd like to create an App to better understand how it works. The App has a set of filter that the user can apply on images (I know, nothing new :P). One of this filter takes two images and a mask and it mixes the two images showing them through the mask (here an image to better explain what I want to obtain) At the moment I'm really confused and I don't know where to start to create this effect. I can't understand wether I have to work with multiple textures and

Android timing in OpenGL ES thread is not monotonic

橙三吉。 提交于 2019-12-18 05:25:34
问题 I'm measuring time interval for looped animations/particles/etc in my Android app. App is a live wallpaper so it doesn't prevent system from scaling clock down for power saving. Because of this all methods to measure time intervals between last frames doesn't measure monotonic time - I experience animations inconsistently slowing down and speeding up. I've used all possible methods to retrieve system time - all of them are not monotonic (even SystemClock.elapsedRealtime() and System.nanoTime(

Android OpenGL demo “No config chosen”

只谈情不闲聊 提交于 2019-12-18 04:30:08
问题 I'm having a real problem with the Google's OpenGL demo for Android. I set it up in Eclipse but can't get it to execute. It builds with no problems, but then stops at "java.lang.IllegalArgumentException: No config chosen" right before it opens. I've been up and down Google searches and Stack threads with no solution. I did find what I thought was a lead here: OpenGL ES 2.0 Support for Android? It uses a command gLSurfaceView.setEGLConfigChooser(8 , 8, 8, 8, 16, 0); but alas, I'm new to OpenGL

WebGL shaders: maximum number of varying variables

狂风中的少年 提交于 2019-12-18 04:12:38
问题 From the OpenGL ES spec section 2.10.4 (Shader Variables: Varying Variables): The number of interpolators available for processing varying variables is given by the implementation-dependent constant MAX_VARYING_VECTORS . This value represents the number of four-element floating-point vectors that can be interpolated; varying variables declared as matrices or arrays will consume multiple interpolators. When a program is linked, any varying variable written by a vertex shader, or read by a

OpenGL ES 2.0 texture distortion on large geometry GL_REPEAT

落花浮王杯 提交于 2019-12-18 03:42:24
问题 OpenGL ES 2.0 has serious precision issues with texture sampling - I've seen topics with a similar problem, but I haven't seen a real solution to this "distorted OpenGL ES 2.0 texture" problem yet. This is not related to the texture's image format or OpenGL color buffers, it seems like it's a precision error. I don't know what specifically causes the precision to fail - it doesn't seem like it's just the size of geometry that causes this distortion, because simply scaling vertex position

Transitioning from OpenGL ES 1.1 to OpenGL ES 2.0

无人久伴 提交于 2019-12-18 01:18:14
问题 It's been a while since iPhone 3GS came out, and now there might be enough market share of OpenGL ES 2.0 supporting devices to warrant developing in it. But the situation is a lot of developers probably already have huge code bases in OpenGL ES 1.1 How does one transitionf rom ES 1.1 to ES 2.0? I suppose the matrices need to be taken care of, as well as stuff like GL_FOG, GL_CULL maybe? Is it possible to write "substitutes" for these functions, e.g your own glTranslatef, glPushmatrix etc?

Clipping-planes in OpenGL ES 2.0

北城余情 提交于 2019-12-17 21:57:14
问题 I need to clip a few hundred objects under a clipping plane in OpenGL ES 2.0 and would appreciate ideas from people more experienced with this subset of OpenGL. In OpenGL ES 1.x there is glClipPlane. On the desktop you have glClipPlane, or gl_ClipDistance in your shader. Neither of these two are available in OpenGL ES 2.0. It seems that this kind of functionality disappeared completely with 2.0. It seems the only way to do this is either A) run the plane equation in the fragment shader, or B)

normal matrix for non uniform scaling

。_饼干妹妹 提交于 2019-12-17 20:28:39
问题 Im trying to calculate the normal matrix for my GLSL shaders on OpenGL 2.0. The theory is : a normal matrix is the top left 3x3 matrix of the ModelView, transposed and inverted. It seems to be correct as I have been rendering my scenes correctly, until I imported a model from maya and found non-uniform scales. Loaded models have a weird lighting, while my procedural ones are correct, so I put my money on the normal matrix calculation. How is it computed with non uniform scale? 回答1: You