opengl-es-2.0

Transparent objects in OpenGl ES 2.0

折月煮酒 提交于 2019-12-21 21:56:36
问题 So I've been playing around with OpenGL ES 2.0 on Android but now got to a problem I haven't been able to solve. Apologies in advance, it appears that I'm not allowed to post more that two links (yet), so I put my three images in a Photobucket album here. I'm trying to create a 3D environment that is enclosed by transparent areas ("colored glass"). To see if it works I also put a opaque cube within. I enabled the following capabilities: GLES20.glEnable(GLES20.GL_CULL_FACE); GLES20.glEnable

What OpenGL ES texture format should I use for better dynamic range on iPad?

ぐ巨炮叔叔 提交于 2019-12-21 21:29:44
问题 I'm developing some software which uses a texture map to store geometry. Using GL_RGB for the internal format gives a lot of aliasing, I assume because the texture is being compressed down to GL_RGB4 by default. On a desktop I can use GL_RGB16 or GL_RGB32F (etc.) to set the internal format, but under OpenGL ES 2.0 there doesn't seem to be any of these formats. Is there an alternative, or extension, that is available under IOS which I can use? 回答1: According to Apple (and my own experience) GL

Libgdx: Moving a rotated perspective camera

▼魔方 西西 提交于 2019-12-21 21:05:09
问题 I am developing an android app which visualize the map of an environment and currently i am using libgdx to draw the map, also like any map application the user should be capable of zoom, rotate and moving the map, I have developed a GestureHandler class which implements GestureListener interface and interacts with a PerspectiveCamera (since i will use 3d components in the future): @Override public boolean pan(float x, float y, float deltaX, float deltaY) { float tempX = (mapView.getCamera()

How can I draw on a video while recording it in android, and save the video and the drawing?

心不动则不痛 提交于 2019-12-21 20:39:16
问题 I am trying to develop an app that allows me to draw on a video while recording it, and to then save both the recording and the video in one mp4 file for later use. Also, I want to use the camera2 library, especially that I need my app to run for devices higher than API 21, and I am always avoiding deprecated libraries. I tried many ways to do it, including FFmpeg in which I placed an overlay of the TextureView.getBitmap() (from the camera) and a bitmap taken from the canvas. It worked but

How to use GPUImageLookupFilter without GPUImageFilterGroup?

本秂侑毒 提交于 2019-12-21 20:30:25
问题 I have a problem with understanding GPUImage. Specifically, I can't figure out how to use GPUImageLookupFilter. I have several examples of usage in GPUImageAmatorkaFilter for example. But LookupFilter used there within GPUImageFilterGroup which I didn't understood yet either. I wonder whether I can use LookupFilter alone. I've tried this: GPUImageLookupFilter *lookup = [[GPUImageLookupFilter alloc] init]; UIImage *image = [UIImage imageNamed:@"amatorka.png"]; GPUImagePicture

Libgdx Stencil & ShapeRenderer

落爺英雄遲暮 提交于 2019-12-21 20:06:50
问题 I am trying to accomplish something like this: sample image The whole screen will be black, then the insides of the triangle shape are the parts that will only appear. I tried using SCISSOR but it is rectangle in shape. *Original Image Source: https://www.html5rocks.com/static/images/screenshots/casestudies/onslaught/controls_tutorial.png 回答1: There are a few different ways that you can render a masked image. One possible way is to use the depth buffer. I've written a small method that shows

Dealing with OpenGL ES 2.0 driver bugs

纵饮孤独 提交于 2019-12-21 18:40:34
问题 I'm currently porting a 3D C++ game from iOS to Android using NDK. The rendering is done with GLES2. When I finished rewriting all the platform specific stuff and ran the full game for the first time I noticed rendering bugs - sometimes only parts of the geometry would render, sometimes huge triangles would flicker across the screen, and so on and so on... I tested it on a Galaxy Nexus running 4.1.2. glGetError() returned nothing. Also, the game ran beautifully on all iOS devices. I started

Shader optimization for retina screen on iOS

喜你入骨 提交于 2019-12-21 17:19:53
问题 I make a 3D iphone application which use many billboards. My frame buffer is twice larger on retina screen because I want to increase their quality on iPhone 4. The problem is that fragment shaders consume much more time due to the framebuffer size. Is there a way to manage retina screen and high definition textures without increase shader precision ? 回答1: If you're rendering with a framebuffer at the full resolution of the Retina display, it will have four times as many pixels to raster over

First steps in creating a chroma key effect using android camera

拟墨画扇 提交于 2019-12-21 17:07:59
问题 I'd like to create a chroma key effect using the android camera. I don't need a step by step, but I'd like to know the best way to hijack the android camera and apply the filters. I've checked out the API and haven't found anything super definitive on how to manipulate data coming from the camera. At first I looked into using a surface texture, but I'm not fully aware how that helps or how to even use it. Then I checked out using a GLSurfaceView, which may be the right direction, but not

why does binding a GL_ELEMENT_ARRAY_BUFFER to 0 produce a memmove error?

a 夏天 提交于 2019-12-21 06:07:08
问题 I had a bug that took me quite some time to fix. I kept getting EXC_BAD_ACCESS and a reference to a memmove error without any further description until I commented the following line: [self loadShaders]; glGenVertexArraysOES(1, &_vao); glBindVertexArrayOES(_vao); // Vertex Buffer glGenBuffers(1, &_vertexBuffer); glBindBuffer(GL_ARRAY_BUFFER, _vertexBuffer); glBufferData(GL_ARRAY_BUFFER, sizeof(Vertices), Vertices, GL_STATIC_DRAW); glEnableVertexAttribArray(ATTRIB_VERTEX);