opengl-es-2.0

iOS how to mask the image background color

主宰稳场 提交于 2019-12-20 04:52:55
问题 I want to do following thing within in my iOS app: user can draw something on white background paper. my app allows user to capture the drawn image. Here the image will capture with background white color. finally from the captured image i need to mask the white background color and just get the image alone into UIImage object. I completed the steps 1 and 2. But i do not have any idea how to do the last step. Is there any openCV library that i can use it with my iOS app?. Any help that might

Black Artifacts on Android in OpenGL ES 2

给你一囗甜甜゛ 提交于 2019-12-20 04:12:13
问题 I have an OpenGL ES 2 code base that runs on iOS, Android, and on PC via the PowerVR emulation libraries. When I run this code on an LG Optimus G LGE971, I see black artifacts on my model: http://imageshack.us/photo/my-images/594/renderartifacts.png/ My first reaction was that the near clipping plane might be the issue, but because these artifacts appear on only select devices, I do not believe that is the issue. Any other ideas on what might be causing this? Also, this isn't captured well in

Android OpenGL ES2.0 Texture Swapping

旧巷老猫 提交于 2019-12-20 03:21:32
问题 First off I am new to OpenGL, but on my phone (Motorola Bionic) the following code works as intended. GLES20.glActiveTexture(GLES20.GL_TEXTURE1); GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, mTowerTextureHandle); GLES20.glActiveTexture(GLES20.GL_TEXTURE2); GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, mTowerNormalHandle); GLES20.glActiveTexture(GLES20.GL_TEXTURE3); GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, mFrostTextureHandle); GLES20.glActiveTexture(GLES20.GL_TEXTURE4); GLES20.glBindTexture

Android OpenGL ES 2.0 Only Limited To 16 Textures In Memory?

故事扮演 提交于 2019-12-19 19:53:21
问题 Basically while I was working on an app in Android Studio using OpenGL ES 2.0, I ran into a big problem that I can't wrap my head around, and it's been bugging me for about a week. So, anytime I load more than 16, maybe 17 textures of any size in memory, and attempt to display them in 2D through either my emulator in Genymotion or my ASUS tablet, it either begins to display different images than what I was binding at that particular index, or not display at all. Yet if I run it through my

Page Curl with best quality

人走茶凉 提交于 2019-12-19 11:51:10
问题 I am working with Harism Page Curl(Open GL) https://github.com/harism/android_page_curl and its works fine. Output is something like this: It's not smooth too much. I want something like this: 回答1: In CurlMesh class, default maxCurlSplits is 10. Increasing this number, increasing quality of lines of area. 来源: https://stackoverflow.com/questions/30726077/page-curl-with-best-quality

Black out everything outside a polygon

二次信任 提交于 2019-12-19 11:43:00
问题 I have a map, for simplicity let's say it's just a single texture. On top of this map, I have a polygon which indicates the route that the user must follow. What I want is to draw everything outside the polygon black. Or, of course to only draw things inside the polygon. To explain it better I made a picture. The blue lines define the polygon, with each corner being a point in the polygon. The red with yellow lines is the part I want to black out of the picture, and only leave the red with

Black out everything outside a polygon

北战南征 提交于 2019-12-19 11:42:31
问题 I have a map, for simplicity let's say it's just a single texture. On top of this map, I have a polygon which indicates the route that the user must follow. What I want is to draw everything outside the polygon black. Or, of course to only draw things inside the polygon. To explain it better I made a picture. The blue lines define the polygon, with each corner being a point in the polygon. The red with yellow lines is the part I want to black out of the picture, and only leave the red with

Calculating frustum FOV for a PerspectiveCamera

点点圈 提交于 2019-12-19 10:16:57
问题 I currently have a screen consisting of two areas: (Values are just assumed for this particular example and may of course vary depending on screen). The screen in total is 1080x1432px (WxH) and consists of two areas, each clipped using glViewPort . This because I want area (1) not to fill the screen when zooming. Game area. Can be zoomed. The size is 1080x1277px (WxH) and located at the top. The HUD (FYI objects from here can be moved to area (1). Non zoomable. The size is 1080x154 (WxH).

glCreateShader and glCreateProgram fail on android

做~自己de王妃 提交于 2019-12-19 05:18:49
问题 I'm having a very difficult problem creating a shader program on android. when I call glCreateShader or glCreateProgram each always returns 0. I've covered all my bases with regards to troubleshooting: I checked to make sure I had an ogl context (I do, i tested this by clearing the frame buffer with various colors, which worked). I tried glGetError but it returned nothing (GL_NO_ERROR) I'm not an opengl or android expert so I don't know of any thing else that could be causing this. I've been

How to create Stencil buffer with texture (Image) in OpenGL-ES 2.0

前提是你 提交于 2019-12-19 02:14:52
问题 Can I have Stencil prepared with a texture (Image) in OpenGL 2.0 So that some part of the Image will be transparent and as a result it will be transfered as is to Stencil buffer and then will use this use this stencil buffer for further drawing. EDIT by datenwolf to account for OPs question update in a answer: By @InfiniteLoop: @datenwolf thanks a lot for ur reply but no success :( here is my code - (void)render { [EAGLContext setCurrentContext:context]; glBindFramebuffer(GL_FRAMEBUFFER,