opengl-es

How to detect touch events within a certain Renderer-area in android?

女生的网名这么多〃 提交于 2019-12-10 13:18:35
问题 In android I have taken a rotating sphere example given here. It creates a simple app showing a rotating sphere (the earth). Now, I want to do something if the rotating sphere is pressed on the phone display. I do not want to react to touch events outside of the rotating sphere. Here is what I have tried so far, by using a derived version of the GLSurfaceView : public class MyGLSurfaceView extends GLSurfaceView { MyGLSurfaceView(Context context) { super(context); } public boolean onTouchEvent

Mysterious app crash with OpenGL

♀尐吖头ヾ 提交于 2019-12-10 13:18:15
问题 I'm using a GPUIImage library for developing an iOS camera app. Sometimes, when the app is suspended after 2-3 minutes the Xcode gives me a crash on the app, pointing to the lines in the method: - (void)presentBufferForDisplay; { [self.context presentRenderbuffer:GL_RENDERBUFFER]; } What might possibly be the reason of this crash? I've got a really long camera set up and the code itself is in the GPUImageContext class. What I might be doing wrong here? 回答1: You can't access OpenGL ES at all

When using GLES20.glReadPixels on android, the data returned by it is not exactly the same with the living preview

我怕爱的太早我们不能终老 提交于 2019-12-10 13:07:17
问题 I am trying to use Android GPUImage on this page https://github.com/CyberAgent/android-gpuimage to do some real time filtering work on video, and I use glReadPixels() to get the data which has been processed by the GPU and the filter has been added, then I created a bitmap using the data returned and compress it to a jpeg picture at last. The process works fine but the jpeg is not the same as the preview, it just displays the bottom part of the preview , however the size of it is right, I

How to create a smoke effect in iphone?

偶尔善良 提交于 2019-12-10 12:43:26
问题 i am developing an application where i want to do some smoke effect like animation and interact with that smoke. Do i need to implement it OpenGLES or any simple solution? Is there any sample application for it? 回答1: You could just write a simple particle emitter for that. Is it for a Game ? or for another kind of Application ? It also depends on the level of realism that you're looking for. A guy got down voted for mentioning fluid dynamics, but if you really want realism, that's the best

Error 1 libavcodec.so File format not recognized Android GL Live Wallpaper

我们两清 提交于 2019-12-10 12:42:07
问题 I am trying to make a Live Wallpaper for android that plays an .mp4 video located on the device in android-asset (with the example I am using, it actually copies the file to the sdcard at runtime/doesn't matter) I found this example And using this post I was able to get my eclipse set up with NDK and building the project. When building in eclipse using the NDK plugin I get this error in my problems window: Description Resource Path Location Type make: *** [libs/armeabi/libavcodec.so] Error 1

Add third Party Frameworks in a project in iOS

主宰稳场 提交于 2019-12-10 12:35:17
问题 I am trying to use the NinevehGL framework in my iPad app. I've added the framework to my Xcode project. However, when I run my app,it executes successfully. Note: After i installed the NinevehGl.pkg, The NinevehGl framework is shows in the project Template itself. Am selecting this template means automatically it creates some frameworks in Link Binary with Libraries. But my issue is: While am running the same Xcode project in other mac, it crash. Because other mac's am not installed this

Iphone OpenGL : glOrthof vs glFrustumf. is glOrthof not 3D?

有些话、适合烂在心里 提交于 2019-12-10 12:29:51
问题 having a bad coding day. Right I need to make a 3D cube that spins around etc via user interaction. Hey no biggy. All the examples to make a 3D cube seem to use glOrthof and when I demo one to people they say its not 3D. The problem is that glFrustumf seems to put me in the cube instead of in front of me. I cant move it back using glTransform because it re-uses the ModelView Matrix (I even tried manually modifying that) /* save current rotation state */ GLfloat matrix[16]; glGetFloatv(GL

Unable to Draw Sprite after Camera.Update in LibGDX

两盒软妹~` 提交于 2019-12-10 12:26:59
问题 I am new to Libgdx Developement and I am working on a game same like Candy Crush. I have a background board, above that board there are number of coins with different colors where users can drag and play. All code is working fine except one issue, where I have created a logic where user achieves a number of points and levels up, at that moment I want to display a pop up saying Level Up + NumberOfLevel. I have created that pop up with combination of a background image and font. But I am unable

Unable to animate sprite in Libgdx using Tween

故事扮演 提交于 2019-12-10 12:24:00
问题 I am working on a game like Candy Crush and I have been facing issues with making a pop up while user Levels Up. I recently posted a question to display pop up in font and got it solved : Unable to Draw Sprite after Camera.Update in LibGDX But now I want to animate that pop up using Tween Engine and It is not working for some reason. I have used Tween Engine in other parts of the game to make coins bounce and fade away, which is working fine with below code. Fading Animation : plusTen = new

How can I make a box's edges smooth without anti-aliasing?

二次信任 提交于 2019-12-10 12:22:41
问题 I'm creating a dice game for the iPhone. I'm using SIO2 as engine, but I think this question is more general OpenGL-related. Since the iPhone lacks support for anti-aliasing, my dice looks kind of edgy. If possible, I'd like to make the edges of the die rounded and smooth instead of sharp. I've found one app, MotionX, that manages to do this, and I think without using anti-aliasing. See screenshot here. If you look closely at the dice edges, you see there is a floating transition from the