opengl-es

How to make cocos2d sprite scale up and down (for a pulsating effect) every second?

妖精的绣舞 提交于 2019-12-07 01:40:46
问题 I want to have a sprite scale up and down once every second to make it seem like it is bulging and pulsating. How can I do this? 回答1: As the post before contains syntax errors. To be more precise, I post working code: CCSprite * sprite = ...; // create the sprite. id scaleUpAction = [CCEaseInOut actionWithAction:[CCScaleTo actionWithDuration:1 scaleX:1.0 scaleY:1.0] rate:2.0]; id scaleDownAction = [CCEaseInOut actionWithAction:[CCScaleTo actionWithDuration:0.5 scaleX:0.8 scaleY:0.8] rate:2.0]

Losing OpenGL Textures in Android after a resume

戏子无情 提交于 2019-12-07 01:29:24
问题 My game is working correctly except in the case where I press the HOME button then resume. What needs to be done to use the textures again? I have tried calling onPause and onResume on the GLSurfaceView (when the activity's onPause and onResume are called). Any ideas what I could be doing wrong? 回答1: If all else fails, reload the textures: Pseudocode for tex in textures: if glIsTexture(tex.opengl_name) == false: glGenTextures(1, &tex.opengl_name) glBindTexture(tex.texture_target); glTexImage(

OpenGL draw rectangle outline [closed]

梦想的初衷 提交于 2019-12-07 01:23:13
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I am trying to draw a rectangle with 4 lines (left one). But no matter how I draw (strip, loop, plain lines) the result is the right side one - it is missing pixels at the corners. ||||||||||| |||||||||| | | | |

Android - FFmpeg Alternative to get video frames. (Due to licensing)

感情迁移 提交于 2019-12-07 00:10:57
问题 Scenario: I am working on a Android project where in one particular openGL page, I display videos. FFmpeg is used to obtain frames from videos (as openGL does not support video as texture) and I am using the frames to obtain a video effect. I am using pre-compiled FFmpeg binaries in the project. I was not aware of the level of legal implications of using the FFmpeg library. My superior brought this to my notice FFmpeg legal reference Problem: I am no legal expert, so only thing that I

Blending using GPUImagePoissonBlendFilter

陌路散爱 提交于 2019-12-06 23:33:30
问题 Im trying to use GPUImagePoissonBlendFilter of the GPUImage framework to blend two faces in my face blending application. Here is my code. - (void)applyPoissonBlendToImage:(UIImage *) rearFace withImage:(UIImage *) frontFace { GPUImagePicture* picture1 = [[GPUImagePicture alloc] initWithImage:rearFace]; GPUImagePicture* picture2 = [[GPUImagePicture alloc] initWithImage:frontFace]; GPUImagePoissonBlendFilter * poissonFilter = [[GPUImagePoissonBlendFilter alloc] init]; poissonFilter.mix = .7;

iOS10 - can't render Sprite Kit scene within SceneKit with openGL

拥有回忆 提交于 2019-12-06 22:32:26
问题 Since I've updated to iOS 10, I'm not able anymore to render a Sprite Kit scene to a Scene Node while using openGL for rendering. Things work fine with Metal. The error logs: "Failed to create IOSurface image (texture)" I used to be able to do something like: class ViewController: UIViewController { @IBOutlet weak var scnView: SCNView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. scnView.showsStatistics = true

Why is glClear blocking in OpenGLES?

耗尽温柔 提交于 2019-12-06 22:18:33
问题 I'm trying to profile my renderer, and I'm seeing some weird profiling behavior that I can't explain. I'm using a glSurfaceView, which I have set to render continuously. This is how my onDrawFrame() is structured public void onDrawFrame(GL10 unused) { GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT); executeAllDrawCommands(); } This was behaving slowly under light load, so I created a timer class and started to profile this some. I was quite surprised by what I saw. I

Text only thing visible after pausing GLSurfaceView on Galaxy S3 - Text blur when moved. No button backgrounds

空扰寡人 提交于 2019-12-06 17:47:26
I'm getting some STRANGE behavior on a Galaxy S3 (none of my other test devices (not S3s) bug out like the following). Scenario: I'm taking YUV data via JNI from an RTSP stream processed by libffmpeg. I take these values and feed them into C++ code using openGL so they may be mapped to a texture. (Basically, display the video from an RTSP stream in openGL). Issues: I've been trying to add an overlay to the video (with normal Android widgets/views/xml) and I noticed on the Galaxy S3 (nowhere else) the backgrounds to buttons (whether they're an R.color, R.drawable, etc.) are all missing. **The

Marker based AR android application using Qualcomm SDK

让人想犯罪 __ 提交于 2019-12-06 16:48:48
I am developing an android application in which a specific video is played when the poster of a specific movie is shown infront of the camera in android. Earlier i was using AndAr project for this stuff and i did some changes in draw() function of customObject and got it working. But now my client wants me to use Qualcomm sdk . I was playing with image targets application but couldnt find anything to get in my head. Ok i got it working. The following is the solution to it which i got from this link https://ar.qualcomm.at/arforums/showthread.php?t=32 The imagetargets.cpp which i had was already

opengles view switching problem

感情迁移 提交于 2019-12-06 15:57:53
问题 I´m trying to make simple game using OpenGLES. I have two EAGLViews(menu and game view). Each view has its own viewController. Initializing of the views is done by initWithNIBName method of the viewController. And when I want to show the view, I simply use addSubview method of the main window. The game view is initialized only once at the launch time. Menu view is initialized only if it´s needed. Problem is, that when I go from game view to menu and then back, and then I redraw the game view,