Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

E_NOINTERFACE on Texture2D.AsSurface()

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 rtclawson   Members   

168
Like
0Likes
Like

Posted 16 January 2013 - 04:10 PM

I have created a texture with the following description. When I call the AsSurface() method on the texture, I get an error stating 

'E_NOINTERFACE: The requested COM interface is not available'

 

Texture2DDescription description = new Texture2DDescription

{

ArraySize = 1,

BindFlags = BindFlags.None,

CpuAccessFlags = CpuAccessFlags.None,

Format = _format,

Width = _width,

Height = _height,

OptionFlags = ResourceOptionFlags.None,

Usage = ResourceUsage.Default,

SampleDescription = new SlimDX.DXGI.SampleDescription(1,0),

MipLevels = _levelCount,

};

 

I am not using Direct2D, or older versions of Direct3D. Just Direct3D 11 and DXGI.

 

What are the conditions that cause this error for the AsSurface() method?

 

Thank you for your help.



#2 Mike.Popoloski   Members   

3257
Like
-1Likes
Like

Posted 16 January 2013 - 05:29 PM

I suspect it might want specific BindFlags, such as shader resource or render target. I'm not certain though.


Mike Popoloski | Journal | SlimDX




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.