Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8475303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:51:24+00:00 2026-06-10T17:51:24+00:00

I’m scratching my head over trying to implement some code to share textures between

  • 0

I’m scratching my head over trying to implement some code to share textures between D3D10 and D3D11 in SlimDX.

This method is causing the problem:

    public void InitialiseTextureSharing()
    {
        // A DirectX10 Texture2D sharing the DirectX11 Texture2D
        sharedResource = new SlimDX.DXGI.Resource(textureD3D11);
        textureD3D10 = device10_1.OpenSharedResource(sharedResource.SharedHandle);  // This fails to compile! 

    }

I get the following error from the compiler:

The type arguments for method ‘SlimDX.Direct3D10.Device.OpenSharedResource(System.IntPtr)’ cannot be inferred from the usage. Try specifying the type arguments explicitly.

The wierd thing (to me) is, this code is being ported straight from someone elses which is supposed to work. The original code is:

        // A DirectX10 Texture2D sharing the DirectX11 Texture2D
        SlimDX.DXGI.Resource sharedResource = new SlimDX.DXGI.Resource(textureD3D11);
        SlimDX.Direct3D10.Texture2D textureD3D10 = device10_1.OpenSharedResource(sharedResource.SharedHandle);

The difference with my implementation is I am instantiating the ‘sharedResource’ and ‘textureD3D10’ objects in the SlimDX Form.

I certainly didn’t expect a compilation error. The code I am basing this on is from: http://www.aaronblog.us/?p=36
… which is all about drawing text in SlimDX with DX11.

I’m totally stumped on this. I’ve had a look at posts which contain solutions to similar issues, but adapting this to mine is beyond me at present.

Any pointers would be uber-appreciated.

UPDATE:

Signature of OpenSharedResource from SlimDX API docs:

http://slimdx.org/docs/html/M_SlimDX_Direct3D11_Device_OpenSharedResource__1.htm

… and Resource:
http://slimdx.org/docs/html/T_SlimDX_DXGI_Resource.htm

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T17:51:25+00:00Added an answer on June 10, 2026 at 5:51 pm

    Based on the documentation, the reason you get an error is because the code is wrong. OpenSharedResource takes a generic argument that specifies which type to return, so it should be

    SlimDX.Direct3D10.Texture2D textureD3D10 = device10_1.OpenSharedResource<SlimDX.Direct3D10.Texture2D>(sharedResource.SharedHandle);
    

    In HTML, < and > are used for elements; because of this, it’s not uncommon for code snippets to get their generic arguments filtered out on people’s blogs without anyone realising. In that case, you need to reinsert them yourself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.