Hi, im writing a C# plugin for vvvv to select one of the available cameras on my pc, actually i just got 4 small frames in a row instead of a full frame, doing this :
private CLEyeCameraResolution resolution = CLEyeCameraResolution.CLEYE_VGA;
private CLEyeCameraColorMode colorMode = CLEyeCameraColorMode.CLEYE_MONO_PROCESSED;
private float framerate = 60f;
private int bpp = 1;
texW = 640;
texH = 480;
this.imageBuffer = Marshal.AllocCoTaskMem(texW * texH * bpp);
Guid camId =CLEyeCameraDevice.CLEyeGetCameraUUID(cameraIndex);
cameraPointer = CLEyeCameraDevice.CLEyeCreateCamera(camId, this.colorMode, this.resolution, this.framerate);
CLEyeCameraDevice.CLEyeCameraStart(cameraPointer);
then to copy into texture :
var rect = texture.LockRectangle(0, LockFlags.Discard).Data;
CLEyeCameraDevice.CLEyeCameraGetFrame(cameraPointer, imageBuffer, 100);
rect.WriteRange(imageBuffer, 640 * 480* bpp);
texture.UnlockRectangle(0);
is it wrong the bufferSize ?