opengl-es

Mesh rendering issue libgdx

▼魔方 西西 提交于 2019-12-12 11:05:39
问题 I have a very simple program, that loads an wavefront obj file, rotate and displays it. The problem is that the program renders it with some issues (like missing triangles). I had a similar problem when I tried to render a Pyramid with a vertex buffer taken from NeHe's tutorial. So I don't know what cause this rendering issues. Can you help me? package com.jam.libgdx3DTest; import com.badlogic.gdx.Game; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.*; import com.badlogic.gdx

OES_vertex_array_object and client state

自古美人都是妖i 提交于 2019-12-12 10:58:42
问题 I want a vertex array object in OpenGL ES 2.0 to hold two attributes from different buffers, the second buffer being read from client memory ( glBindBuffer(GL_ARRAY_BUFFER, 0) ) But I get a runtime error: GLuint my_vao; GLuint my_buffer_attrib0; GLfloat attrib0_data[] = { 0, 0, 0, 0 }; GLfloat attrib1_data[] = { 1, 1, 1, 1 }; void init() { // setup vao glGenVertexArraysOES(1, &my_vao); glBindVertexArrayOES(my_vao); // setup attrib0 as a vbo glGenBuffers( 1, &my_buffer_attrib0 ); glBindBuffer

Is there any tool to split a PVR texture into a set of tiles?

时光怂恿深爱的人放手 提交于 2019-12-12 10:48:18
问题 I 've one big png texture 4096x4096 that I need to load parts of in the memory. I already split the big png texture into 16 1024x1024 tiles then converted them to PVR compressed files. The problem is that when I draw these tiles, the edges between tiles are not the same as the png does. So, I think if there is a tool to generate one 4096x4096 PVR texture then splitting it into 16 1024x1024 PVR tiles?? 回答1: By PVR (which is a more general texture file format that supports several texture types

issue with CCScrollLayer in cocos2d-iphone-2.1-beta2

隐身守侯 提交于 2019-12-12 10:45:23
问题 Hi there I'm having problems as stated with CCScrollLayer in the lateste cocos2d beta, mainly that on compiling I get: use of undeclared identifier 'CC_GL_BLEND' . Is there any way to sort this problem that anyone has found yet? 回答1: Safely you can comment that line..anyway blending is already enabled...and everything works fine after this change in cocos2D 2.1 beta. // Set GL Values #if COCOS2D_VERSION >= 0x00020000 // ccGLEnable(CC_GL_BLEND); //Guru ccPointSize( 6.0 * CC_CONTENT_SCALE

OpenGL ES: flat shading without duplicating vertices?

大城市里の小女人 提交于 2019-12-12 10:37:58
问题 Is there a way in OpenGL ES to do flat shading without repeating each vertex for every triangle? In regular OpenGL this is done with glShadeModel but in ES I write the shaders so its not that simple. GLSL 1.3 or 1.4 (not sure) introduces the keyword flat which seem to enable this but unfortunately ES 2.0 doesn't have this yet. Yet another way to do this uses dFdx , dFdy functions which, alas, are also missing in ES. 回答1: No, flat-shading is not a feature of OpenGL ES 2.0, sorry. 来源: https:/

store meta data in buffer failed and do not know color format

我怕爱的太早我们不能终老 提交于 2019-12-12 10:25:02
问题 I am getting following error 02-13 15:22:23.807: E/ACodec(8137): [OMX.qcom.video.decoder.avc] storeMetaDataInBuffers failed w/ err -2147483648 02-13 15:22:23.808: W/ACodec(8137): do not know color format 0x7fa30c03 = 2141391875 . in implementing http://bigflake.com/mediacodec/ExtractMpegFramesTest_egl14.java.txt complete log : 02-13 16:51:14.275: D/ExtractMpegFramesTest(11294):testExtractMpegFrames 02-13 16:51:14.337: D/ExtractMpegFramesTest(11294): Extractor selected track 0 (video/avc):

CCRenderTexture,GL11ExtensionPack,Libgdx How TO

走远了吗. 提交于 2019-12-12 10:16:45
问题 I currently work on a effect such as "Tiny Wings" http://www.raywenderlich.com/3857/how-to-create-dynamic-textures-with-ccrendertexture ,and find CCRenderTexture is the solution. So I want to know how to make this effect on android , finally I found this link https://github.com/ZhouWeikuan/cocos2d/blob/master/cocos2d-android/src/org/cocos2d/opengl/CCRenderTexture.java It shows that its GL11ExtensionPack GL11ExtensionPack egl = (GL11ExtensionPack)CCDirector.gl; egl.glGetIntegerv

Explain how OpenGL ES background images work

拈花ヽ惹草 提交于 2019-12-12 10:10:06
问题 Could someone please explain how you render background images on an OpenGL ES view? From the basics of setting up the OpenGL environment. I'm a newbie to OpenGL here. I'm seeing a few questions/answers on stackoverflow about creating background images, but I'm trying to modify existing code at the moment (Apple's GLPaint in particular), and I'm not sure what is needed and what is not. Having tried the solutions, with no success, I thought I should take a step back and actually try and

How do you convert opengl texture back to bitmap in android?

折月煮酒 提交于 2019-12-12 09:59:51
问题 I wanted to apply image-filter to my image and used android HelloEffects sample It converts the image data from bitmap to texture. After applying the image filter effect, I'd like to get the image back in jpeg format, but don't know how to do that. 回答1: Check the saveFrame() method mentioned in http://bigflake.com/mediacodec/ExtractMpegFramesTest_egl14.java.txt 回答2: I did this in one way like , I converted the texture image into bitmap using glreadpixles() method I then saved the bitmap to

Binding Video Texture on OpenGL Sphere on Android

孤街浪徒 提交于 2019-12-12 09:55:29
问题 I'm trying to create a 360 video sphere (like the ones for cardboard) on Android. I have done this with a photo by rendering a sphere in OpenGL ES1.0 and than attaching a texture to it. Afterwards I can use the sensor values to rotate the sphere. However, I can't figure out how to change the picture to a video . I've tried frame by frame rendering using texSubImage2D() but it's SUPER SLOW. My video is probably going to be about 4k density as I need a good quality even when only small portion