opengl-es

Rendering multiple textures at different points on screen without using point sprites

拜拜、爱过 提交于 2019-12-29 08:22:23
问题 I'm building an ios drawing app and am having a hard time how to draw paint textures on the screen at different points. Most tutorials online refer to rendering a single texture of a certain size on screen. However, what I'm looking for is to provide an array of 2d vertices at which to draw the paint texture that is computed based on where the user touches on the screen. I was using point sprites which didn't require me to specify the texture coordinates and hte primitive object used to draw

How to repeat the texture map like GL_REPEAT?

蓝咒 提交于 2019-12-29 07:36:15
问题 I have a house model in my game, and I have some materials for the house geometry. There is a material for the wall of the house, and I have a texture-map-image to show the bricks. var mat = new THREE.MeshPhongMaterial( { ambient: 0x969696, map: THREE.ImageUtils.loadTexture( 'textures/G/G0.jpg' ), overdraw: true,combine: THREE.MultiplyOperation } ); In this way above, the texture map appears like GL_CLAMP I want it to show like GL_REPEAT . What should I do? If you can not see the images check

What is JNI Graphics or how to use it?

烈酒焚心 提交于 2019-12-29 07:31:18
问题 In the Android NDK there is a library named JNI Graphics. What is that? Can I use that to load Images for OpenGL ES with C/C++? 回答1: The jnigraphics library can be used to access bitmap buffers in C/C++ from the android.bitmap.Graphics class (in Java, of course). It's briefly mentioned in the NDK documentation, as well as the bitmap.h header docs. It can be used to load images for e.g. OpenGL ES in C/C++, but you have to do some work to hand a jobject to that library so it can give you direct

Wireframe shader - Issue with Barycentric coordinates when using shared vertices

此生再无相见时 提交于 2019-12-29 06:31:36
问题 I'm working on drawing a terrain in WebGL. The problem is that I'm only using 4 vertices to draw a single quad by using indices to share vertices. So I can't upload unique baricentric coordinates for each vertex, because it's shared. Here's a picture that shows the problem more clearly. There's no barycentric coordinate that I can use for the question mark. (0,1,0) is used top left, (0,0,1) is used above and (1,0,0) is used to the left. So there's absolutely no way I can do this when I'm

Decoding Video and Encoding again by Mediacodec gets a corrupted file

三世轮回 提交于 2019-12-29 06:28:58
问题 I am trying to implement https://android.googlesource.com/platform/cts/+/jb-mr2-release/tests/tests/media/src/android/media/cts/DecodeEditEncodeTest.java but modifying the source by using a video file mp4. The mime tipe is video/avc, bitrate 288kbps, iframeinterval 100, width: 176, height: 144. The file size is 6MB. When I decode the video and put the frame in the outputsurface, I can save the frame to a bitmap and see the frame great. But at the end, after encoding (with the same parameters

What's up with CITemperatureAndTint having vector inputs?

和自甴很熟 提交于 2019-12-29 05:26:09
问题 OK, so the Core Image filter Temperature and Tint has two inputs, neutral and targetNeutral. However, my biggest issue is the fact that they're both two-component vectors, meaning each has two numeric inputs. I would expect the first to be from say 2500 to 10000. What would the vector be for? 回答1: The essential purpose of performing temperature and tint adjustment is to correct the white balance of a captured image: to account for the ambient illumination of the scene and adjust colors so

How to improve opengl es display performance in android

纵然是瞬间 提交于 2019-12-29 01:57:10
问题 I am working to improve the video display efficiency of our video conferencing project in android. Video display is implemented in native opengl code. The opengl code is implemented in native with opengl version 1. The code given below is used for displaying each frames of the video. int ofi_vc_video_display::render_video_frame(unsigned char *frame_buffer) { // Check the frame is available or not. If available display the frame. if (frame_buffer != NULL){ // Clear the screen buffers. glClear

How to detect OpenGl version at run time. Android

孤人 提交于 2019-12-29 01:53:11
问题 How can I detect witch openGl version my device is running? All what I found is android saying that all devices 2.3+ support openGL 2.0. Witch is not true as I found devices that been upgraded to version 2.3 but they system doesn't support it. 回答1: glGetString(GL_VERSION) See more at: http://www.khronos.org/opengles/documentation/opengles1_0/html/glGetString.html 回答2: From the Android CTS's (Compatibility Test Suite) OpenGlEsVersionTest.java: private static int getVersionFromPackageManager

3d point on circumference of a circle with a center, radius and normal vector

大兔子大兔子 提交于 2019-12-28 19:25:35
问题 My question is similar to How to Make a Point Orbit a Line, 3D but the answer there didn't seem to solve my problem. And what I am looking for is a general solution. For the record I am trying to solve an issue in OpenGL ES (Java/Android). I have a circle with a 3D point for its center, a radius, and a 3D vector specifying the normal to the plane the circle lies in. I need to find the 3D point representing the point on the circumference at a given angle from the 'rotated' X-axis (rotated

Android OpenGL Screenshot

廉价感情. 提交于 2019-12-28 12:12:08
问题 I've searched a lot about taking screenshot of my OpenGL object on Android and come up with this solution. It worked great but in my case I have camera view and opengl view(with transparent background) on top of camera view. So what I want to do is to get opengl screenshot with transparent background instead of black. As I said I have tried link above and it worked but I'm stuck with black background. It's little bit complicated to figure out how to get rid of the black background in this