opengl-es-2.0

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

时间秒杀一切 提交于 2019-11-30 00:36:41
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 has been done before, but is only possible in OpenGL ES 2.0 (not 1.0) Here is a diagram of what I'm

Android, Native OpenGL/OpenMAX, Screen capture

感情迁移 提交于 2019-11-30 00:01:58
问题 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

OpenGL ES 2.0 - Textured Quad

让人想犯罪 __ 提交于 2019-11-29 23:55:35
问题 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

OpenGL ES 2.0 debugging [closed]

佐手、 提交于 2019-11-29 23:35:24
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 looks sensible (viewport, depth test/stencil test/cull/blend off, framebuffer complete etc), and AFAICT I am submitting sensible vertex data. What I'm after at this point is a Pix / GPAD - like tool that will let me step through the scene and review state I cannot directly query from

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

最后都变了- 提交于 2019-11-29 20:08:43
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. It is most definitely worthwhile learning OpenGL ES2.0 shaders: You can load-balance between the GPU and CPU (e.g.

eglSwapBuffers is erratic/slow

孤者浪人 提交于 2019-11-29 19:35:36
问题 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

Issue when porting from OpenGL 1.1 to OpenGL-ES 2.0

岁酱吖の 提交于 2019-11-29 17:29:38
this is my opengl-es 2.0 code : { for (surfnum=0;surfnum<surftotal;surfnum++){ for (i=0;i<triNum[surfnum];i++){ GLfloat *Vertices[] = { triArray[surfnum][i].normpt1, triArray[surfnum][i].normpt2,triArray[surfnum][i].normpt3}; glGenBuffers(1, &ui32Vbo); glBindBuffer(GL_ARRAY_BUFFER, ui32Vbo); unsigned int uiSize = 3 * (sizeof(GLfloat) * 1); glBufferData(GL_ARRAY_BUFFER, uiSize,*Vertices, GL_STATIC_DRAW); } } } for(int i = 0; i < 80000; ++i) { glClear(GL_COLOR_BUFFER_BIT); int i32Location = glGetUniformLocation(uiProgramObject, "projmatrix"); glUniformMatrix4fv( i32Location, 1, GL_FALSE,

GLSurfaceView displaying black on Nexus 7 with Android 4.2

坚强是说给别人听的谎言 提交于 2019-11-29 13:53:24
I have an OpenGL ES2.0 app that is working on devices running various Android versions from 2.2 up to 4.1. However I have been told that when running it on a Nexus 7 with Android 4.2 the 3D graphics in the App are all black. The Action Bar and dialogs work fine though. I have tried it on an emulated Nexus 7 with Intel Atom processor, HAX and GPU enabled running 4.2.2 and that works OK. I would have preferred to run the ARM image but that doesn't seem to include Open GL ES2.0 Does anyone have any insight into what might be causing this problem on the Nexus 7 and how to work around it? One

EGL vs GLES 2.0 on Android (e.g. Java)

社会主义新天地 提交于 2019-11-29 11:36:21
问题 (experienced c programmer, pre-shader, fixed function open gl. competent Java programmer) I have been working with GLES on Android and have gotten the examples to run (both native and Java). In particular, the textured triangle example. What is completely confusing me is the "relationship" of Khronos EGL and the android GLES interfaces. Are these parallel, independent interfaces (API)? Is EGL supposed to be a platform independent (neutral) interface? EGL appears to fully support GLES 1.0 and

Using GLshort instead of GLfloat for vertices

℡╲_俬逩灬. 提交于 2019-11-29 09:42:43
问题 I'm attempting to convert my program from GLfloat to GLshort for vertex positions and I'm not sure how to represent this in the shader. I was using a vec3 datatype in the shader but vec3 represents 3 floats. Now I need to represent 3 shorts. As far as I can tell OpenGL doesn't have a vector for shorts so what am I supposed to do in this case? 回答1: I'm not sure how to represent this in the shader. That's because this information doesn't live in the shader. All values provided by