opengl-es

gles 2.0 perfomance on iphone simulator, iphone, macbook pro

混江龙づ霸主 提交于 2019-12-11 17:42:57
问题 I did an wave animation to explore features of sgx chip which is tile-based rendering (TBR) architecture by comparing the performance on iphone and laptop. An advantage of TBR architecture is it allows the GPU to perform hidden surface removal before fragments are processed, so I draw many overlaped layers of animated waves, and only the wave in the top layer is visible. I did this program on both iphone 3gs (using gles 2.0) and my laptop, a macbook pro(using opengl 2.0). I recorded the fps

Can't map textures with OpenGL ES on real devices

两盒软妹~` 提交于 2019-12-11 17:31:59
问题 I've tried a simple program that dynamically generates a texture and map it to a quad using NDK. Everything is fine on an emulator but failed on real devices. Here is my code: private static class Renderer implements GLSurfaceView.Renderer { @Override public void onDrawFrame(GL10 gl) { nativeDrawFrame(); } @Override public void onSurfaceChanged(GL10 gl, int width, int height) { nativeInit(width, height); } @Override public void onSurfaceCreated(GL10 gl, EGLConfig config) { // do nothing... }

Render a 3D Object off the Center of the screen: ARTOOLKIT ANDROID

那年仲夏 提交于 2019-12-11 17:20:09
问题 Hi I am working on a AR android app. I am using ARToolkit6. In this app I want to view my 3D object( A Cube) on left half of the screen. With this eventually I want to display 3 cubes on the screen each on 1/3 of the screen area. I was able to scale the 3D object by tweaking ModelView Matrix. What I read so far, I think I need to tweak projection matrix to achieve my goal. I tried looking solutions online. But Couldn't get it to work. Can anyone direct me to right path? for (int trackableUID

Error:Emulator: OpenGL backend 'angle' without OpenGL ES 1.x library detected. Using GLESv2 only

倾然丶 夕夏残阳落幕 提交于 2019-12-11 17:19:54
问题 I have search the forum and cant find exact answer for these. Every time I compile and run the app. There is an error Emulator: OpenGL backend 'angle' without OpenGL ES 1.x library detected. Using GLESv2 only. However, everything still run smoothly, and thus I didn't bother. So, what is the correct approach to this? To update the library. To ignore it since it is just outdated but usable. What are the benefit of updating Refer Android OpenGL ES 2.0 emulator I found out that there are a few

Missing texture in .OBJ model on min3d framwork android

ⅰ亾dé卋堺 提交于 2019-12-11 17:07:28
问题 I am following this tuttorial: http://www.mat-d.com/site/tutorial-load-a-3d-obj-model-with-min3d-for-android/ this is my mtl file: newmtl Texture0 Ns 20 d 1 illum 2 map_Kd face_eyel_hi.jpg Kd 0.7 0.7 0.7 Ks 0 0 0 Ka 0 0 0 newmtl Texture1 Ns 20 d 1 illum 2 map_Kd face_eyer_hi.jpg Kd 0.7 0.7 0.7 Ks 0 0 0 Ka 0 0 0 newmtl Texture2 Ns 20 d 1 illum 2 map_Kd face_skin_hi.jpg Kd 0.7 0.7 0.7 Ks 0 0 0 Ka 0 0 0 newmtl Texture3 Ns 20 d 1 illum 2 map_Kd face_sock.jpg Kd 0.7 0.7 0.7 Ks 0 0 0 Ka 0 0 0 the

Better overlapping points in OpenGL

一曲冷凌霜 提交于 2019-12-11 16:38:39
问题 I'm using this method to simulate the outline of a point. GLfloat points[graph->vertexCount * 6]; GLfloat outlinePoints[graph->vertexCount * 6]; for (int i = 0 ; i < graph->vertexCount; i++) { outlinePoints[i*6] = (graph->vertices[i].x / (backingWidth/2) ) - 1; outlinePoints[i*6+1] = -(graph->vertices[i].y / (backingHeight/2) ) + 1; outlinePoints[i*6+2] = 0.9; outlinePoints[i*6+3] = 0.9; outlinePoints[i*6+4] = 0.9; outlinePoints[i*6+5] = 1.0; points[i*6] = (graph->vertices[i].x /

OPENGL/ES 3D model zoomed doesn't pan correctly in UIScrollView

两盒软妹~` 提交于 2019-12-11 15:59:54
问题 I have a 3d model rendered in a UIView. When I pinch the model it zooms correctly, but when zoomed in I'd like the ability to pan/scroll the view so that I can see the parts of the model which are outside the boundaries of the view. I switched the UIView to a UIScrollView, and on the pinch event is update the content size with the scale factor. This works great and I can now scroll the view. My problem is that panning to the outer edges of the content view still shows the 3d model still

Per Vertex Diffuse and Specular Shader

家住魔仙堡 提交于 2019-12-11 15:46:28
问题 I am trying to implement Specular lighting in the Vertex shader. I'm generating a sphere with vertices and normals. I'm setting up the vertices etc before calling the vertex shader as, Generate Model Matrix: glm::mat4 ModelMatrix = glm::translate(glm::mat4(), glm::vec3(0.0f, 0.0f, -2.0f)); Generate View Matrix: glm::vec3 cameraPosition = glm::vec3(0.0f, 0.0f, 0.0f); glm::vec3 cameraTarget = glm::vec3(0.0f, 0.0f, -2.0f); glm::vec3 upVector = glm::vec3(0.0f, 1.0f, 0.0f); glm::mat4 ViewMatrix =

ASTC for normal maps

心不动则不痛 提交于 2019-12-11 15:45:17
问题 I am trying to compress my normal map textures, so I am using ASTC 4x4. It works completely good for other textures (aka diffuse), but quality lost for normal maps were too big. Is there a way to improve ASTCs quality directly for Normal Maps ? I have tried to use -normal-psnr flag, but it makes my texture greyed (instead of normal blue) ASTC normal map: PNG normal map: 回答1: Compressing normal maps using a normal mode in the reference encoder stores normal maps as X+Y maps. X is stored in the

NdkMediaCodec: couldn't get output / input buffers

限于喜欢 提交于 2019-12-11 15:28:42
问题 I am using native codec to read .mp4 file... My application flow: I have 2 buttons when I click on first button I am starting to read one .mp4 file, when I click second button I am starting to read another .mp4 file So, problems came when I am clicking on the buttons 1 and 2 in one second delay between them in order to check app behaviour when I am switching the video from one to another... And sometimes I get crash with such log / E/NdkMediaCodec: sf error code: -38 / E/NdkMediaCodec: sf