opengl-es

How to apply drag drop and scale in Android OpenGL ES

亡梦爱人 提交于 2020-01-21 10:01:28
问题 I have a problem on dunno how to add touch or long click to manipulate the OpenGL translate and scale parameter? Currently my coding is displaying a texture in the middle of the mobile screen, and I want to drag and scale the texture with finger, So how do I manipulate the OpenGL translate and scale parameter? This is my main class: import android.app.Activity; import android.os.Bundle; import android.view.WindowManager; public class MainActivity extends Activity { private Stage stage;

How to apply drag drop and scale in Android OpenGL ES

一曲冷凌霜 提交于 2020-01-21 10:01:25
问题 I have a problem on dunno how to add touch or long click to manipulate the OpenGL translate and scale parameter? Currently my coding is displaying a texture in the middle of the mobile screen, and I want to drag and scale the texture with finger, So how do I manipulate the OpenGL translate and scale parameter? This is my main class: import android.app.Activity; import android.os.Bundle; import android.view.WindowManager; public class MainActivity extends Activity { private Stage stage;

How do you generate an RGBA image in Core Graphics?

霸气de小男生 提交于 2020-01-21 06:51:10
问题 I'm trying to generate an RGBA8 image from text to use as an OpenGL ES 2.0 texture. +(UIImage *)imageFromText:(NSString *)text { UIFont *font = [UIFont systemFontOfSize:20.0]; CGSize size = [text sizeWithFont:font]; CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGContextRef contextRef = CGBitmapContextCreate (NULL, size.width, size.height, 8, 4*size.width, colorSpace, kCGImageAlphaLast ); CGColorSpaceRelease(colorSpace); UIGraphicsPushContext(contextRef); [text drawAtPoint

visualization tool for mobile (tablet)

一个人想着一个人 提交于 2020-01-21 03:16:10
问题 I have a project for visualizing some data on tablet. I'll probably use android for developing the application but I have no idea that how could I visualize the real time data ? which tools are available on android for doing this ? I noticed that I can use OpenGL ES but then I know nothing of this and it's quite complicated for me . Is there any other simple tool that could get the real time data and visualize it ? we have a basic Matlab/Simulink visualization but need a better visualization.

OpenGL ES 2.0 texture not showing on some device

浪子不回头ぞ 提交于 2020-01-21 02:28:09
问题 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

Spinning globe in Opengl-es

扶醉桌前 提交于 2020-01-20 08:48:08
问题 I found this code to generate a sphere in Opengl es. I am unable to understand the logic, could someone please give me some insights on this. private void generateData() { slicesBuffers = new FloatBuffer[slices]; normalsBuffers = new FloatBuffer[slices]; texCoordsBuffers = new FloatBuffer[slices]; for (int i = 0; i < slices; i++) { float[] vertexCoords = new float[7 * (stacks + 1)]; float[] normalCoords = new float[4* (stacks + 1)]; float[] textureCoords = new float[10 * (stacks + 1)]; double

What version of OpenGL does HTC Wildfire support?

删除回忆录丶 提交于 2020-01-20 07:01:27
问题 I'm testing my app on HTC Wildfire running Android 2.2.1. I suppose it should support atleast OpenGL 1.1 but in fact when I'm calling glGetString(GL_VERSION); I'm getting this: OpenGL ES-CM 1.0 Is there any way to create OpenGL 1.1 context and not 1.0 ? 回答1: Unfortunately, HTC Wildfire doesn't have GPU. http://developer.qualcomm.com/device/htc-wildfire CPU:Qualcomm MSM 7225 Graphical Processor Unit (GPU): No GPU GL info for HTC Wildfire OpenGL Version - OpenGL ES-CM 1.0 OpenGL Vendor -

What version of OpenGL does HTC Wildfire support?

 ̄綄美尐妖づ 提交于 2020-01-20 07:00:25
问题 I'm testing my app on HTC Wildfire running Android 2.2.1. I suppose it should support atleast OpenGL 1.1 but in fact when I'm calling glGetString(GL_VERSION); I'm getting this: OpenGL ES-CM 1.0 Is there any way to create OpenGL 1.1 context and not 1.0 ? 回答1: Unfortunately, HTC Wildfire doesn't have GPU. http://developer.qualcomm.com/device/htc-wildfire CPU:Qualcomm MSM 7225 Graphical Processor Unit (GPU): No GPU GL info for HTC Wildfire OpenGL Version - OpenGL ES-CM 1.0 OpenGL Vendor -

How do you activate multisampling in OpenGL ES on the iPhone?

筅森魡賤 提交于 2020-01-20 02:28:30
问题 I'm experimenting w/ improving the "resolution" of an OpenGL ES based app. Apple mentions here (developer.apple.com) that OpenGL ES in iOS 4 supports multisampling... and this can improve the graphics somewhat. How do you enable multisampling? 回答1: The WWDC session 415 video goes over this a bit, so grab and watch that if you can. Essentially, you create a second framebuffer for msaa rendering using glRenderbufferStorageMultisampleAPPLE for its depth and color buffers. Then you bind this

OpenGL ES (IPhone) alpha blending looks weird

拈花ヽ惹草 提交于 2020-01-20 02:27:26
问题 I'm writing a game for IPhone in Opengl ES, and I'm experiencing a problem with alpha blending: I'm using glBlendFunc(Gl.GL_SRC_ALPHA, Gl.GL_ONE_MINUS_SRC_ALPHA) to achieve alpha blending and trying to compose a scene with several "layers" so I can move them separately instead of having a static image. I created a preview in photoshop and then tried to achieve the same result in the iphone, but a black halo is shown when I blend a texture with semi-transparent regions. I attached an image. In