Jump to content

  • Log In with Google      Sign In   
  • Create Account

Krauser

Member Since 12 May 2013
Offline Last Active Oct 07 2013 01:04 PM

Posts I've Made

In Topic: Assimp issue

16 May 2013 - 05:08 AM

I added the flag "aiProcess_PreTransformVertices" in my read function smile.png .


In Topic: Assimp issue

15 May 2013 - 01:39 PM

Great now it work! Problem solved. Thanks biggrin.png .


In Topic: Assimp issue

15 May 2013 - 06:40 AM

Rendering code:

void ModelClass::Render(ID3D11DeviceContext* deviceContext)
{
    unsigned int stride;
    unsigned int offset;


    // Set vertex buffer stride and offset.
    stride = sizeof(VertexType);
    offset = 0;
    
    // Set the vertex buffer to active in the input assembler so it can be rendered.
    deviceContext->IASetVertexBuffers(0, 1, &m_vertexBuffer, &stride, &offset);

    // Set the index buffer to active in the input assembler so it can be rendered.
    deviceContext->IASetIndexBuffer(m_indexBuffer, DXGI_FORMAT_R32_UINT, 0);

    // Set the type of primitive that should be rendered from this vertex buffer, in this case triangles.
    deviceContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);

    return;
}

void ShaderClass::Render(ID3D11DeviceContext* deviceContext, int indexCount)
{
    // Set the vertex input layout.
    deviceContext->IASetInputLayout(m_layout);

    // Set the vertex and pixel shaders that will be used to render this triangle.
    deviceContext->VSSetShader(m_vertexShader, NULL, 0);
    deviceContext->PSSetShader(m_pixelShader, NULL, 0);

    // Set the sampler state in the pixel shader.
    deviceContext->PSSetSamplers(0, 1, &m_sampleState);

    // Render the triangle.
    deviceContext->DrawIndexed(indexCount, 0, 0);

    return;
}

In Topic: Assimp issue

14 May 2013 - 02:36 PM

Ok Thanks for advise,

It doesn't work removing: sad.png

aiProcess_SplitLargeMeshes
aiProcess_SortByPType

m_LocalImporter.SetPropertyInteger(AI_CONFIG_PP_SBP_REMOVE, aiPrimitiveType_LINE);
 

But I am sure that work with separate drawcall, I'm trying tomorrow.

If I find an alternative solution I share here.


In Topic: Assimp issue

13 May 2013 - 09:15 AM

Thanks :D,

Direct link:

http://rs513p2.rapidshare.com/cgi-bin/rsapi.cgi?sub=download&fileid=1246163158&filename=Car.obj&cookie=D43D984F2E4AAF9B40F185DD2D28279357615E833B8E80DC2D92A141C94A16B373D0E30E4AE683200DF2331CE0130B0B&directstart=1


PARTNERS