Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


e3d_ALiVE

Member Since 02 Jul 2008
Offline Last Active Aug 26 2011 01:18 AM

#4821212 [DX11] GUI rendering

Posted by e3d_ALiVE on 09 June 2011 - 12:26 AM

there is also anttweakbar http://www.antisphere.com/Wiki/tools:anttweakbar
it's free, has dx11 support and may be what u looking for


#4818583 [C++, DX11] How to get texture size?

Posted by e3d_ALiVE on 02 June 2011 - 03:16 AM

Hello. I load my texture using this code:

D3DX11CreateTextureFromFileA(device, sFilename, 0, 0, &textureResource, 0);

	D3D11_SHADER_RESOURCE_VIEW_DESC resourceDesc;
	resourceDesc.Format = DXGI_FORMAT_UNKNOWN;
	resourceDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
	resourceDesc.Texture2D.MostDetailedMip = 0;
	resourceDesc.Texture2D.MipLevels = -1;
	device->CreateShaderResourceView(textureResource, &resourceDesc, &shaderTextureResource);

But I can't seem figure how to get texture size/resolution which I need for interface rendering. Can anyone help please? Thank you in advance.


  • you have to query ID3D11Texture2D interface from shaderTextureResource,then you have to get description from it with GetDesc
  • if you don't want or don't know how to query, then u may just call GetDesc from textureResource, it will give you D3D11_TEXTURE2D_DESC structure with all the fields(w,h format e.t.c.) that you need
  • you can also call D3DX11GetImageInfoFromFile to retrieve information about the file



#4784297 Number of subsets in a ID3DX10Mesh

Posted by e3d_ALiVE on 11 March 2011 - 03:08 AM

usually it's the same as number of materials for that mesh
there is also functions to getattributetable, that can tell you exactly what amounts of subsets mesh has and for what vertices each subset is set


#4783912 Clearing a ID311Buffer

Posted by e3d_ALiVE on 10 March 2011 - 03:06 AM

as alternative to clearing the ID3D11Buffer with 400 elements with type R32_FLOAT
for example if it consists of floats and u need to clear them all to 1

std::vector<float> data;//make sure that this thing is aligned
data.resize(400);
devc11->UpdateSubResource(buffer,&data[0]);

as alternative u can map it with discard and clear there


#4766321 Generate Vertices Failed

Posted by e3d_ALiVE on 28 January 2011 - 01:56 PM

as i remember 16 bit indices limits model to ~ 65000 vertices.
try using some form of 32 bit indices
some variable u using in loop may be too small(it happens rarely, but check it anyway)
what fails? and with what hresult, what debug runtime says?
it's a good programming to alwaya check d3dx create calls with hresult!


PARTNERS