I recently upgraded to cocos2d v2.0 and box2d 2.1.2 and my debug draw stopped working. The game still works fine but the bodies are not being drawn anymore. Ive read it has something to do with the fact that cocos2d v2.0 uses GLES 2.0 but nobody has been able to give me a solution, the forums have not responded.
Chipmunk debugdraw also broke but I got a CPDebugLayer class file and i restored it. Box2d is the only one I've been unable to get working properly.
Anybody run into the same situation?
First, install the cocos2d 2.0 templates in the usual way:
./install-templates.sh -f
Then create a new cocos2d with Box2D project from the template. Replace your project's GLES-Render.h/.m files with the ones from the cocos2d+Box2D template project. That should be all.
It's worth mentioning that if you did any custom OpenGL drawing in your app, you will have to modify the rendering code to use OpenGL ES 2.0 functions exclusively, even if the old code still compiles. Some OpenGL ES 1.1 functions are still available and you can use them, but they usually don't work or worse cause OpenGL errors. That can have a variety of rendering side-effects.
Related
I have these errors:
Cocoa.h File Not Found (in GPUImageView.h)
Unknown Type Name: **NSOpenGLContext, CVOpenGLESTextureCacheRef (GPUImageContext)
Now, I tried to fix all these errors, but ended up making things worse.
I know OpenGL ES is deprecated in iOS 12, but as I understand deprecation, it should still be working for the moment, right?
For error #1, I don't understand what's a MAC OS framework (cocoa.h) doing in here (some of the references are not surrounded with #IFDEF MAC_OS statements).
As for error #2, these types are defined within the AppKit framework (also a MAC_OS framework, not an iOS framework).
I have considered switching to GPUImage2, but it's a ton of work as it's not as easy as swapping the frameworks, I'll have a lot of code to rewrite. I also see Brad Larson (the semi-God behind this framework) has already started working on GPUImage3 which will use Metal instead of OpenGL ES but it's still work-in-progress but it won't be a simple swap from GPUImage v1 to GPUImage v3.
I found a way to fix it. Maybe it will help someone with the same problem. The GPUImage main folder contains the iOS and the MAC projects.
Go to the framework folder, and delete the GPUImageMac.xcodeproj file.
Then go to the Source folder located within the framework folder, and delete the whole folder named Mac.
Clean your project and rebuild. VoilĂ !
Good luck!
Hello? I am a Korean developer who is developing using the Tango Unity SDK.
I'm using the GanKino version and are now updating to the IKarioTikos version.
Is there a specific reason to use TangoCamera instead of Tango ARCamera in IKarioTikos's Demo Sence, AreaLearning?
Actually the change has been made since Gankino's update in may 2017. If you look at the release notes, it says:
SDK updates: The Tango Unity SDK now has a single TangoCamera prefab
that supports the TangoARCamera and TangoDeltaCamera use cases.
What I understand is that they just grouped the different prefabs they used to have (TangoARCamera, TangoDeltaCamera) into one single prefab called TangoCamera. The point is that they didn't update the examples so AreaLearning example still uses the now deprecated TangoARCamera.
Except the fact that they say it is now deprecated, I personnally have no problem of still using TangoARCamera prefab in my app. I might change when the examples and tutorials will be fully updated.
TangoARCamera and TangoDeltaCamera have been deprecated in the latest release. You can just use TangoCamera now. Just remember to enable the TangoARScreen script component in order to enable AR functionality.
I've successfully built and run AR apps with TangoSDK_Ikariotikos_Unity5 on Unity 5.6.3f1 using the above approach. Do note that initial releases of Unity 2017 does not support the Tango downloaded package so best to use 5.6.xxx
I used kinetic-v3.10.4.js for almost all my work.
Now the requirement changed and I need to add few more functionality that are available in newer versions.
So I started using kinetic-v4.0.1.js.
I made a sample file and it is working fine but few functions like saveImageData();,DetectionType.etc. are not working in 4.0.1 as they have been updated and instead of saveImageData(), createBufferImage() is the new function.
I am redoing everything with kinetic v4.0.1 now.
I can't find the old example in the website that was using createBufferImage() for image event detection as it has been updated to 4.3.3
So anyone having any old example that help in pixel detection/image detection with 4.0.1
How about searching from archived internet contents, archive.org
http://web.archive.org/web/*/http://html5canvastutorials.com
I installed cocos2D 2.0 beta on my Mac.
But, my Xcode4 cannot find the class of CCRibbon.
So, I look for CCRibbon in the templates, but there is no CCRibbon.
Maybe it's an unstable version I think, but I'm not sure.
How can I use CCRibbon on my Xcode?
Do I install old version of cocos2D?
Cocos2D 2.0 beta does not include CCRibbon, but v1.x does.
I'm not aware of any plans to re-add CCRibbon. I consider it unlikely that it will be added again because it's just one of the classes that were hardly used at all, and would require rewriting the class as a shader program.
I am modifying the version of the android version of the 2d texture example from OpenGl ES2.0 programming guide to change the fragment shader. this is written in pure Java and doesn't use the NDK.
The vanilla example works just fine on my phone, but when I change the shader code it no longer works. This is because my modified shader doesn't compile (obviously), but I can't find the cause of the problem as glGetShaderInfoLog returns an empty string.
I've done a search on this issue, and apparently, as of Jul 22nd, it was a known issue, but I was wondering what ways there are of getting around it. One post I found said they had written an NDK wrapper for the function, but being new to Android development I don't really know how to do this.
You're suffering from a bug. I worked around by using the old GL ES 2.0 bindings to get a functioning glGetShaderInfoLog. Like this:
import com.badlogic.gdx.backends.android.AndroidGL20;
...
AndroidGL20 gl2 = new AndroidGL20();
Log.e(TAG, gl2.glGetShaderInfoLog(shader));
I still use the standard GLES20 wrapper library for everything else, so this was simple to drop into my codebase. The two wrappers apparently can coexist without any problems.
Just incase anyone does find this question as they have encountered the same problem, the only way I have found to "get around it" is to compile the shader with another App (such as Rendermonkey). Not ideal, but it got me further in my project!
I had the same problem.
Make sure you have the following in ApplicationManufest.xml:
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
Call this after initializing a GLSurfaceView
glSurfaceView.SetEGLContextClientVersion(2);