Inheritance: NewTOAPIA.GL.GLTexture2D
Esempio n. 1
0
        public void SetupTexture()
        {
            //fCamera1 = VideoTexture.CreateFromDeviceIndex(GI, 0, 320, 240);
            //fCamera2 = VideoTexture.CreateFromDeviceIndex(GI, 1, 320, 240);
            fCamera1 = VideoTexture.CreateFromDeviceIndex(GI, 0, true);
            fCamera2 = VideoTexture.CreateFromDeviceIndex(GI, 1, true); 
            fPictureTexture = TextureHelper.CreateTextureFromFile(GI, "EELogo.jpg", false);

            flagTexture = fPictureTexture;
        }
Esempio n. 2
0
        public static VideoTexture CreateFromDevicePath(GraphicsInterface gi, string devicePath, int width, int height, bool autoStart)
        {
            VideoCaptureDevice vidCap = VideoCaptureDevice.CreateCaptureDeviceFromName(devicePath, width, height);
            if (null == vidCap)
                return null;

            VideoTexture tex = new VideoTexture(gi, vidCap, autoStart);

            return tex;
        }
Esempio n. 3
0
        public static VideoTexture CreateFromDeviceIndex(GraphicsInterface gi, int deviceIndex, bool autoStart)
        {
            int numDevices = VideoCaptureDevice.GetNumberOfInputDevices();

            if ((deviceIndex >= 0) && (deviceIndex <= numDevices - 1))
            {
                VideoCaptureDevice vidCap = VideoCaptureDevice.CreateCaptureDeviceFromIndex(deviceIndex,0,0);
                VideoTexture tex = new VideoTexture(gi, vidCap, autoStart);
                return tex;
            }

            // Return a checkerboard pattern
            return null;
        }