opengl-es-2.0

Android, Native OpenGL/OpenMAX, Screen capture

北城余情 提交于 2019-11-30 16:40:29
Use-case Mirror Android Screen to PC using USB Potential (Native) Implementation Approaches Using Android Open-Source, modify screenrecord for your needs and re-install on your Android device using ADB Use well known native API such as OpenGL / OpenMAX to capture screen Discussion Approach #1 will certainly work ( under the shell account ), however , each time the Android OS is updated, the custom code will need to get updated to keep up with OS changes, with approach #2 the API stay fixed and there is no need to worry about OS changes, the question is whether it is possible to implement

OpenGL ES 2.0 - Textured Quad

与世无争的帅哥 提交于 2019-11-30 16:31:43
Whenever I attempt to render a textured quad, I end up with a triangular section of the texture distorted: . The texture is a PNG created in GIMP, and I've tried two seperate methods of loading the texture (both from Apple's own sample code). Each method of loading the texture produced different results (I don't know if it is different default settings, or if there is a problem with the texture), but I couldn't get either to render proper. I've tried setting up my indices/verticles/texices in multiple different ways, from suggestions posted in Fastest way to draw quads in OpenGL ES? yet still

eglSwapBuffers is erratic/slow

痞子三分冷 提交于 2019-11-30 13:59:07
I have a problem with very low rendering time on an android tablet using the NDK and the egl commands. I have timed calls to eglSwapBuffers and is taking a variable amount of time, frequently exceeded the device frame rate. I know it synchronizes to the refresh, but that is around 60FPS, and the times here drop well below that. The only command I issue between calls to swap is glClear , so I know it isn't anything that I'm drawing causing the problem. Even just by clearing the frame rate drops to 30FPS (erratic though). On the same device a simple GL program in Java easily renders at 60FPS,

Applying part of a texture (sprite sheet / texture map) to a point sprite in iOS OpenGL ES 2.0

本秂侑毒 提交于 2019-11-30 11:37:19
问题 It seems this should be easy but I'm having a lot of difficulty using part of a texture with a point sprite. I have googled around extensively and turned up various answers but none of these deal with the specific issue I'm having. What I've learned so far: Basics of point sprite drawing How to deal with point sprites rendering as solid squares How to alter orientation of a point sprite How to use multiple textures with a point sprite, getting closer here.. That point sprites + sprite sheets

Drawing a gradient in Libgdx

≡放荡痞女 提交于 2019-11-30 11:20:09
Ok I have this code @Override public void render() { // do not update game world when paused if (!paused) { // Update game world by the time that has passed // since last render frame worldController.update(Gdx.graphics.getDeltaTime()); } // Sets the clear screen color to: Cornflower Blue Gdx.gl.glClearColor(0x64/255.0f, 0x95/255.0f, 0xed/255.0f, 0xff/255.0f); // Clears the screen Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); // Render game world to screen worldRenderer.render(); } And it draws a light blue background onto the screen. I am attempting to create a gradient that goes from a dark blue

OpenGL ES 2.0 debugging [closed]

随声附和 提交于 2019-11-30 11:04:00
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . So, I have an OpenGL ES 2.0 app. It compiles and runs in the iPhone/iPad simulators, on a real iPhone/iPad, and under Windows using Imgtec's emulator libraries (i.e. PVRVframe ). In said app, I have one particular draw call that results in no pixels written to the target, even though all the state I can query

OpenGL ES 2.0 texture not showing on some device

瘦欲@ 提交于 2019-11-30 10:36:33
I found a 3D graphics framework for Android called Rajawali and I am learning how to use it. I followed the most basic tutorial which is rendering a shpere object with a 1024x512 size jpg image for the texture. It worked fine on Galaxy Nexus, but it didn't work on the Galaxy Player GB70. When I say it didn't work, I mean that the object appears but the texture is not rendered. Eventually, I changed some parameters that I use for the Rajawali framework when creating textures and got it to work. Here is what I found out. The cause was coming from where the GL_TEXTURE_MIN_FILTER was being set.

YUV to RGBA on Apple A4, should I use shaders or NEON?

匆匆过客 提交于 2019-11-30 10:17:05
问题 I'm writing media player framework for Apple TV, using OpenGL ES and ffmpeg. Conversion to RGBA is required for rendering on OpenGL ES, soft convert using swscale is unbearably slow, so using information on the internet I came up with two ideas: using neon (like here) or using fragment shaders and GL_LUMINANCE and GL_LUMINANCE_ALPHA. As I know almost nothing about OpenGL, the second option still doesn't work :) Can you give me any pointers how to proceed? Thank you in advance. 回答1: It is most

How can I use a 3-D texture in iOS?

梦想与她 提交于 2019-11-30 07:16:22
I can't find the glTexImage3D() function from OpenGL in OpenGL ES 2.0. So how can I use a 3-D texture, eg: a .tga file? Does someone know how to use a 3-D texture in OpenGL ES 2.0? OpenGL ES 1.x and 2.x doesn't mandate support for 3d textures — see e.g. the canonical man page for glBindTexture , which lists only GL_TEXTURE_2D and GL_TEXTURE_CUBE_MAP as targets — and the iOS hardware doesn't provide any suitable extension. The best solution I've been able to come up with is packing a 3d texture as though it were a 2d texture, so you've got say a 128x128x128 3d texture and you lay it out as 128

How do I methodically choose the near clip plane distance for a perspective projection?

强颜欢笑 提交于 2019-11-30 06:46:44
I have a 3D scene and a camera defined using gluPerspective . I have a fixed FOV, and I know the minimum distance of any geometry to the camera (it is a first-person view, so that is the minimum distance from the viewpoint to the character's collision volume). How can I choose the farthest near clip plane (for the best depth buffer resolution) which will will not cause any clipping , no matter how the player moves and looks? These distances are not simply equal because the corners of the near plane are farther from the origin than the center. Formula: nearPlane = nearestApproachToPlayer / sqrt