i'm using cocos2d-x 3.7 on windows, visual studio 2013 and GAF_VERSION 5.0.
i'v downloaded "Cocos2dxGAFPlayer" and copied it into cocos2d/external, after that i added the gafplayer project to my cocos2dx project solution. i'm not sure but i think i have configured it properly as its running while it has this code in "HelloWorld::init()" :
auto animation = GAFAsset::createWithBundle("anim1.zip", "anim1/anim1.gaf", nullptr);
object = animation->createObjectAndRun(true);
object->setAnchorPoint(Vec2::ANCHOR_MIDDLE);
object->setPosition(Director::getInstance()->getVisibleSize() / 2);
this->addChild(object,1);
but by using this only the png file, containing parts of animation is shown( i have attached the file i mean).
when i use the zip file generated by gap in the GAFTest project by only replacing the recourse (not the source code) it works fine.
i've searched the net for a solution, and a correct way to integrate cocos2d-x and gaf. but i couldn't find a way.
please guide me.
is there any tutorial about how to integrate cocos2d-x with gaf on visual studio so i make sure i'm doing the configuration right?
tnx
A member of GAFmedia forum suggested something which solved the problem : http://gafmedia.com/forum/viewtopic.php?f=8&t=447
Postby Dmitry Bushtets » October 7th, 2015, 7:36 am
I have one idea. Have you method call to CODE: SELECT ALL
cocos2d::Director::setContentScaleFactor
in the code? (it can be in AppDelegate.cpp) If yes - try to remove
this call (set content scale factor to 1) and check result. Or
convert swf to gaf with CSF 1 and 2 (and 3, 4 maybe :) ). You can find
this option in GAF Converter. [Texture Atlas -> Scale Settings ->
Advanced]
Related
I am developing a QT GUI for my application using QT Creator (4.11.0).
Recently, our IT updated my OS to Ubuntu 20.04 (from 18.04) - maybe the error is related to that.
I have not touched to project in some month but yesterday wanted to continue developing it.
However, within the IDE there are now thousands of errors highlighted at almost every line of my code. (with highlighted I mean that there is this red background and a red dot beside the line number)
On the very top, it says:
Warning: The code model could not parse an included file, which might lead to incorrect code completion and highlighting, for example.
cstddef:50:10: fatal error: 'stddef.h' file not found
...
The errors that are listed in the IDE are very wired like:
type `QMainWindow`is not a direct or virtual base of `MainWindow` (my class is called `MainWindow`)
I'm pretty sure it is not related to my code:
the code compiles and works fine - it is really just the IDE that is highlighting errors at every line of my code.
I have the same code on a Windows Computer and there no errors are listed in the IDE.
even if I start a brand new QT Widget project the errors appear within the template code provided by the QT Creator.
Since the GCC version changed with the update of the OS, I thought maybe I have to define a new KIT but this also did not help.
Is there anything I can do to fix the issue?
Do I have to reinstall the QT Creator?
I know, pictures are not very well-liked but here I think it might help to understand what I mean with "IDE is highlighting errors":
1. First
~/.profile :
CPATH="/usr/include/clang/10/include:$CPATH"
C_INCLUDE_PATH="/usr/include/clang/10/include:$C_INCLUDE_PATH"
CPLUS_INCLUDE_PATH="/usr/include/clang/10/include:$CPLUS_INCLUDE_PATH"
export CPATH
export C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH
maybe /usr/include/clang/10/include see in you file system.
2. Second
Logout / login.
3. Third
Specifying Build Settings (Projects -> Build -> in every config build) in Build Environment section: [unset] CPATH, C_INCLUDE_PATH and CPLUS_INCLUDE_PATH
or [edit] replace this variable with the necessary values
I fixed this issue by sudo apt install clang-8.
Source: https://bugs.launchpad.net/ubuntu/+source/qtcreator/+bug/1890434
I have been using dlib object detection successfully on mac. Now I want to use it in an iOS app. However, after spending countless hours, dlib object detector always returns zero rectangles.
ifstream fin(dataDir + "/object_detector.svm", ios::binary);
typedef dlib::scan_fhog_pyramid<dlib::pyramid_down<6> > image_scanner_type;
dlib::object_detector<image_scanner_type> detector;
dlib::deserialize(detector, fin);
vector<dlib::rectangle> dets = detector(dlibImage);
To make sure it’s not due to a different image, I am using exact same image for which detector returns 1 hit on mac. I have also printed uchar from part of the image in both mac and iOS, and it’s returning same values. So image data is exactly the same.
Probably dlib library is not built correctly for iOS. I have tried multiple approaches for this. From /example/build dir, below command was invoked.
cmake -G Xcode ..
cmake --build . --config Release
It generated dlib.xcodeproj project in dlib_build dir. I opened the project in xcode, changed architecture to iOS (armv7, arm64) and rebuild the library. This library was linked to my project. I got zero results with this approach. dlib was built in debug mode; I did not get any assertion errors.
Second approach tried was to use dlib/all/source.app in my project. I used all the proprocessing flags that are used by cmake or dlib.xcodeproj project. No errors, but still no matches.
I have compared build settings of my xcode project with examples.xcodeproj generated by cmake and it’s same. Also checked the xcode project from https://github.com/zweigraf/face-landmarking-ios, but no help.
Strange thing is detector takes couple of seconds to process and comes back with zero matches. So it’s doing something. I wish there was a debug logging that I can turn on for the detector.
I am out of ideas. Will appreciate if anyone can help. dlib is a wonderful library, I just wish it would have been easier to work with on iOS.
dlib is working fine on iOS too. Kicking myself for it, but I mixed up the detector instances. The detector on which I called below line was not used for object detection.
dlib::deserialize(detector, fin);
I was just using an empty detector instance, and it was returning 0 detections. By empty detector, I mean it was defined but deserialize method was not invoked. It would have been nice if dlib returned an error or warning, if a detector not loaded with object_detector.svm file is used for detection.
I have observed the same behavior with shape detector too. If sp.dat is not loaded, it silently reports 0 parts detected. Posting this as answer, in case someone else also makes such a silly mistake.
I am trying to migrate a program from vtk5.10 to vtk7.0 (QT 5.7, Visual Studio 2013). I have managed to do the proper changes in some functions. Although, now I get an error on a removed function (in vtk6) the CopyInformation.
newOutput->CopyInformation(mapper->GetInput());
Is there any other fuction that could substitute this one in vtk7.0? I have searched on the vtk6 migration guides, but I couldn't find any helpful information (for substitution). I am new in vtk, so any advice could help.
Thank you.
I see that in version 3 of Opencv , "CommandLineParser" is used much ;but I don't get how it works.I am new with programming.can anyone give me some help please?
another question is that , before I was working with Opencv 2 version , and reading image is quite simple by "Imread("file address",type)" but I see that in new version it is mostly done by commandine arguments . what is advantage of this,and how it works exactly?
I am working with Visual studio 2015 on Windows 10
thanks
I am trying to get started with EDSDK to control my Canon 500D. I'm new to cpp, and windows XP apps and I'm using visual studio. After a great deal of blind trial and error I have finally managed to get the app to compile the basic sample code from the documentation. To do this I have the EDSDK.h, EDSDKTypes.h and EDSDKErrors.h headers in the right places and the EDSDK.dll and EDSDK.lib in the same folder as the code. It seems to be picking these up. I have got the 500D to be recognised by the PC so I believe the USB drivers are there.
The code is just trying to pick up the camera:
EdsError err=EDS_ERR_OK;
EdsCameraListRef cameraList=NULL;
err = EdsGetCameraList(&cameraList);
if(err == EDS_ERR_OK)
{...}
However, when I run this console app the error is picked up as 10 - which suggests, according to the document, that there is a missing subcomponent. This happens both if the camera is connected or not, so I'm thinking this is something missing from the compile. But I am getting nowhere with the documentation.
I have installed the edsdk 2.4 Windows version from a download not the official route, so this may be an issue.
Can anyone help? Specifically how can I find out what the missing subcomponent might be so I might include it. Is this a subcmponent of the build like a header file or something like a driver?
I know, old question but still it might help someone with the same problem.
From the documentation:
All DLLs are required in order to execute an EDSDK client application.
All of the modules in the DLL folder must be copied into the same folder where the EDSDK client application is in.
This means you'll have to have all DLLs beside your *.exe. Namely these DLLs:
DPPDLL.dll
DPPLibCom.dll
DPPRSC.dll
EDSDK.dll
EdsImage.dll
Mlib.dll
Ucs32P.dll