opengl-es

OpenGL ES 1.1 to 2.0 a major change?

白昼怎懂夜的黑 提交于 2019-12-22 06:44:44
问题 I'm creating an iPhone app with cocos2d and I'm trying to make use of the following OpenGL ES 1.1 code. However, I'm not good with OpenGL and my app makes use of OpenGL ES 2.0 so I need to convert it. Thus I was wondering, how difficult would it be to convert the following code from ES 1.1 to ES 2.0? Is there some source that could tell me which methods need replacing etc? -(void) draw { glDisableClientState(GL_COLOR_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisable(GL_TEXTURE

Issue taking screen capture of GMSMapView on Google Maps SDK for iOS

五迷三道 提交于 2019-12-22 05:59:51
问题 An item that I am struggling with is when I attempt to take a screen capture of any portion of the GMSMapView (Google Maps SDK iOS). The UIGraphicsGetImageFromCurrentImageContext() UIImage output is invisible. I eventually discovered that the GMSMapView is rendered with OpenGL. Knowing this, I attempted to use the glReadPixels() method. The troubling thing is that I am able to retrieve a map screen capture on the iPhone simulator just fine, but when I use the same method on a real device it

cocos2d-x v 2.0.4 FATAL EXCEPTION GLThread when run on Android emulator

为君一笑 提交于 2019-12-22 05:33:14
问题 I create cocos2d-x app I'm using cocos2d-2.0-x-2.0.4 I've got error when trying to run app from Eclipse on Android emulator. 12-04 08:03:13.792: E/AndroidRuntime(1081): FATAL EXCEPTION: GLThread 105 12-04 08:03:13.792: E/AndroidRuntime(1081): java.lang.IllegalArgumentException: No config chosen 12-04 08:03:13.792: E/AndroidRuntime(1081): at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:874) 12-04 08:03:13.792: E/AndroidRuntime(1081): at android.opengl

LibGDX FreeType font blurry

白昼怎懂夜的黑 提交于 2019-12-22 05:19:47
问题 I'm generating my font dynamically using the screen height percentage and set percentages (Obviously multiplied by density's in the future. Some notes. I'm reading from an OTF file. Using the latest version of LibGDX (Version 1.2.0) I have the following problem: (Large breaks in the font and looks very blurry, but only on medium . Large and small look very sharp) My Preset font sizes: //Font sizes, small, med, large as a percentage of the screen. public static float FONT_SIZE_LARGE = 0.175f,

Does webGL contain push/popMatrix?

橙三吉。 提交于 2019-12-22 05:18:33
问题 Does webGL contain push/popMatrix? and if not, how would I go about recreating them? 回答1: No, WebGL is based off of OpenGL ES 2.0, so there is no built in matrix management or fixed function pipeline. The model view and projection matrices need to be completely managed in your own code and passed to shaders at draw time. You really don't need push and pop matrix if you are using a scene graph or some kind of other similar scene management system. All you really need is a good matrix and

Radial gradient draw performance - Can OpenGL-ES improve?

拈花ヽ惹草 提交于 2019-12-22 05:12:01
问题 I'm working on a image manipulation app that overlays a radial gradient over an image loaded from the photo library. On screen I have a slider to dynamically in/decrease the radius of the radial gradient. I've found the performance on the simulator to be just fine, but on an iPhone 3G or 3GS it is much slower to redraw when moving the slider. I'm currently using CGContextDrawRadialGradient for drawing. The steps I'm following for every redraw: Create the graphics context:

'Permission Denied' error while installing apk on device

旧城冷巷雨未停 提交于 2019-12-22 04:29:10
问题 When I use Eclipse to deploy an Opengl ES app to device I get following error [2011-09-19 15:56:40 - SimpleCube] Failed to install SimpleCube.apk on device 'S5830bfcc8426': Permission denied [2011-09-19 15:56:40 - SimpleCube] com.android.ddmlib.SyncException: Permission denied [2011-09-19 15:56:40 - SimpleCube] Launch canceled! It used to work before. But now I flashed my phone with GingerReal 1.2 ROM and when I try to run the app it gives out this error. I have enabled 'Unknown Sources' and

OpenGL ES - glReadPixels

爷,独闯天下 提交于 2019-12-22 04:06:59
问题 I am taking a screenshot with glReadPixels to perform a "cross-over" effect between two images. On the Marmalade SDK simulator, the screenshot is taken just fine and the "cross-over" effect works a treat: However, this is how it looks on iOS and Android devices - corrupted: (source: eikona.info) I always read the screen as RGBA 1 byte/channel, as the documentation says it's ALWAYS accepted. Here is the code used to take the screenshot: uint8* Gfx::ScreenshotBuffer(int& deviceWidth, int&

WebGL: enablevertexattribarray index out of range

廉价感情. 提交于 2019-12-22 03:51:23
问题 Here my vertex and fragment shaders: <script id="shader-fs" type="x-shader/x-fragment"> precision mediump float; uniform sampler2D uSampler; varying vec4 vColor; varying vec2 vTextureCoord; void main(void) { gl_FragColor = vColor; // gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t)); } </script> <script id="shader-vs" type="x-shader/x-vertex"> attribute vec3 aVertexPosition; attribute vec4 aVertexColor; attribute vec2 aTextureCoord; uniform mat4 uMVMatrix; uniform

OpenGL (ES 2.0) VBO Performances in a Shared Memory Architecture

Deadly 提交于 2019-12-22 03:43:48
问题 I am a desktop GL developer, and I am starting to explore the mobile world. To avoid misunderstandings, or welcome-but-trivial replies, I can humbly say that I am pretty well aware of the GL and GL|ES machinery. The short question is: if we are using GL|ES 2.0 in a shared memory architecture, what's the point behind using VBOs against client-side arrays? More in detail: Vertex buffers are raw chunks of memory, the driver cannot in any way optimize anything because the access pattern depends