wieden-kennedy / Cinder-KCB2

Cinder wrapper for Kinect 2 Common Bridge
48 stars 27 forks source link

Cinder 0.8.6 #16

Open zaherj opened 9 years ago

zaherj commented 9 years ago

Hi Guys,

I am trying to compile the project using Cinder 0.8.6 but I am getting lots of errors of datatypes not included in Cinder and being used in KinectV2.h

For example the file "cinder/gl/VboMesh.h" doesn't exist in Cinder.

The types Channel16uRef, Surface8uRef ..etc don't exist in Cinder

Any help would be really appropriated

Thanks

vijtad commented 9 years ago

I am getting same error.

Were you able to solve this.

Thanks

wouterverweirder commented 9 years ago

Had the same issue. You need to use Cinder from the master branch, not the precompiled 0.8.6 (which is almost a year old).

vijtad commented 9 years ago

Thank you.

I am able to progress further using master branch and compiling it as x64.

Now I am getting the following errors

1>------ Build started: Project: CinderProject, Configuration: Debug x64 ------ 1>cl : Command line warning D9030: '/Gm' is incompatible with multiprocessing; ignoring /MP switch 1> CinderProjectApp.cpp 1>..\src\CinderProjectApp.cpp(22): error C2039: 'draw' : is not a member of 'cinder::gl' 1>..\src\CinderProjectApp.cpp(22): error C2660: 'CinderProjectApp::draw' : function does not take 3 arguments 1>..\src\CinderProjectApp.cpp(36): error C2039: 'RendererGl' : is not a member of 'cinder::app' 1>..\src\CinderProjectApp.cpp(36): error C2061: syntax error : identifier 'RendererGl' 1> Kinect2.cpp 1>..\blocks\Cinder-KCB2\src\Kinect2.cpp(999): warning C4267: 'argument' : conversion from 'size_t' to 'UINT', possible loss of data 1>..\blocks\Cinder-KCB2\src\Kinect2.cpp(1023): warning C4267: 'argument' : conversion from 'size_t' to 'UINT', possible loss of data 1>..\blocks\Cinder-KCB2\src\Kinect2.cpp(1053): warning C4267: 'argument' : conversion from 'size_t' to 'UINT', possible loss of data 1>..\blocks\Cinder-KCB2\src\Kinect2.cpp(1067): warning C4267: 'argument' : conversion from 'size_t' to 'UINT', possible loss of data 1>..\blocks\Cinder-KCB2\src\Kinect2.cpp(1116): warning C4267: 'argument' : conversion from 'size_t' to 'UINT', possible loss of data 1>..\blocks\Cinder-KCB2\src\Kinect2.cpp(1137): warning C4267: 'argument' : conversion from 'size_t' to 'UINT', possible loss of data 1>..\blocks\Cinder-KCB2\src\Kinect2.cpp(1756): error C2039: 'appendVertices' : is not a member of 'cinder::TriMesh' 1> C:\Users\vijay\Documents\GitHub\Cinder\include\cinder/TriMesh.h(42) : see declaration of 'cinder::TriMesh' 1> C:\Users\vijay\Documents\GitHub\Cinder\include\cinder/TriMesh.h(42) : see declaration of 'cinder::TriMesh' 1>..\blocks\Cinder-KCB2\src\Kinect2.cpp(1756): error C2039: '__this' : is not a member of 'cinder::TriMesh' 1> C:\Users\vijay\Documents\GitHub\Cinder\include\cinder/TriMesh.h(42) : see declaration of 'cinder::TriMesh' 1> Generating Code... ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I changed cinderblock.xml as follows :-

<?xml version="1.0" encoding="UTF-8" ?>

``` src/*.cpp src/*.h src lib $(KINECTSDK20_DIR)/inc lib/x64/KCBv2.lib $(KINECTSDK20_DIR)/lib/x64/kinect20.lib $(KINECTSDK20_DIR)/lib/x64/Kinect20.Face.lib lib/x64/KCBv2.dll $(KINECTSDK20_DIR)Redist\Face\x64\Kinect20.Face.dll lib/x64/KCBv2.lib $(KINECTSDK20_DIR)/lib/x64/kinect20.lib $(KINECTSDK20_DIR)/lib/x64/Kinect20.Face.lib lib/x64/KCBv2.dll $(KINECTSDK20_DIR)Redist\Face\x64\Kinect20.Face.dll ```
vijtad commented 9 years ago

I was able to compile successfully after doing following changes to code generated by ToolBox

  1. kinect2.cpp Replace face.mMesh->appendVertices( &iter->mFaceModelVertices[ 0 ], sFaceModelVertexCount );

    with

    face.mMesh->appendPositions( &iter->mFaceModelVertices[ 0 ], sFaceModelVertexCount );

    as appendVertices is removed and replaced with appendPositions.

  2. CinderProjectApp.cpp Add

    include "cinder/gl/Draw.h"

at the top, to resolve the error on following line

ci::gl::draw( tex, tex->getBounds(), getWindowBounds() );