×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Nokia Developer Champion
    Join Date
    Nov 2012
    Location
    Karachi
    Posts
    89

    Accessing Camera in Windows Phone Direct3d App

    I making a Direct3d wp8 app . I want to access camera. how can I access it?

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    India
    Posts
    1,174

    Re: Accessing Camera in Windows Phone Direct3d App

    Quote Originally Posted by Shayan Rais View Post
    I making a Direct3d wp8 app . I want to access camera. how can I access it?
    Did you checked this?

  3. #3
    Registered User
    Join Date
    Dec 2012
    Location
    Zagreb, Croatia
    Posts
    73

    Re: Accessing Camera in Windows Phone Direct3d App

    Hi Shayan,

    This is very hard/impossible. When you use Direct3D application template, you must use only native APIs and you cannot call managed ones. Your application is entirely unmanaged.

    Certain APIs can still be called from native code, but you have to write your own wrapper code. I have very little experience in this and you should consult MSDN for more information.

    If you really like managed code, I suggest that you start from scratch and use XAML + 3D application template. Direct3D is supposed to be used for those projects that are ported from other platforms and which are, almost entirely, already native. Take a look at MSDN: Which application model is right for your app?.

    Cheers

  4. #4
    Nokia Developer Champion
    Join Date
    Nov 2012
    Location
    Karachi
    Posts
    89

    Re: Accessing Camera in Windows Phone Direct3d App

    Hi to_pe,

    Actually I am using XAML + Direct 3D application template
    I want to implement Augmented Reality kinda thing in Direct 3D environment

  5. #5
    Registered User
    Join Date
    Dec 2012
    Location
    Zagreb, Croatia
    Posts
    73

    Re: Accessing Camera in Windows Phone Direct3d App

    Oh, great. Then I think you should wire up callbacks in the C++ code that will call C# functions. It is all messed up AFAIK since there is no easy model to call C# functions from unmanaged code. Take a look at this StackOverflow thread.

  6. #6
    Nokia Developer Champion
    Join Date
    Nov 2012
    Location
    Karachi
    Posts
    89

    Re: Accessing Camera in Windows Phone Direct3d App

    okay to_pe, i'll chk that out
    I know, it's not easy but it's gonna be very interesting

  7. #7
    Registered User
    Join Date
    May 2009
    Location
    Guatemala
    Posts
    186

    Re: Accessing Camera in Windows Phone Direct3d App

    Unfortunately the official documentation on the Camera APIs for native code (Windows Phone 8) is very bad (in my opinion).

    There is an article on the Wiki that includes some code, but it doesn't cover the topic in detail either. In case you want to take a look, here it is:

    Getting started with the Camera APIs for native code
    -CarlosDL

Similar Threads

  1. Replies: 1
    Last Post: 2013-02-14, 17:47
  2. Replies: 2
    Last Post: 2013-02-07, 10:58
  3. Accessing GPS device from qt desktop(windows) App
    By newtolinux in forum [Archived] Qt Mobility Project
    Replies: 1
    Last Post: 2010-11-02, 22:20
  4. accessing a windows network with n9500 ?
    By cmvr in forum General Development Questions
    Replies: 3
    Last Post: 2005-01-21, 22:42
  5. Replies: 1
    Last Post: 2002-07-16, 06:44

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×