Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

2 Neutral

About romashka911

  • Rank

Personal Information

  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. romashka911

    Drawing multiple objects

    Mistake was foolish - calling DrawIndexed before setting buffers
  2. Hi everyone! I have some problem in drawing multiple objects. If i load and draw only one model, it draws correctly, but if i add more objects, some of them draw partially, and i have warning ID3D11DeviceContext::DrawIndexed: Index buffer has not enough space! [ EXECUTION WARNING #359: DEVICE_DRAW_INDEX_BUFFER_TOO_SMALL]. If i draw only one model, i don't have this warning. For each model in render function i do following actions: deviceContext->PSSetSamplers(0, 1, &m_samplerState); deviceContext->IASetInputLayout(m_layout); deviceContext->VSSetShader(m_vertexShader, NULL, 0); deviceContext->PSSetShader(m_pixelShader, NULL, 0); deviceContext->DrawIndexed(indexDrawAmount, indexStart, 0); unsigned int stride; unsigned int offset; stride = sizeof(VertexType); offset = 0; deviceContext->IASetVertexBuffers(0, 1, &m_vertexBuffer, &stride, &offset); deviceContext->IASetIndexBuffer(m_indexBuffer, DXGI_FORMAT_R32_UINT, offset); deviceContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST); deviceContext->PSSetSamplers(0, 0, NULL); deviceContext->IASetInputLayout(NULL); deviceContext->VSSetShader(NULL, NULL, 0); deviceContext->PSSetShader(NULL, NULL, 0); Each model has it's own vertex and index buffers, which being initialized when i load .obj file. Each index is unsigned int. When i'm trying to use Graphics Debugger in Visual Studio, i catch unhandled exception in line deviceContext->DrawIndexed(indexDrawAmount, indexStart, 0); dx11 2018-10-05 18-44-58-83.bmp
  3. romashka911

    Texture lagging

    Oh my god... Thank you)
  4. romashka911

    DX11 Texture lagging

    It's me again, i hope, i'm not annoying... I have trouble with textures... I ask here because i will never find the answer in google... diffuseLight.vs diffuseLight.ps
  5. romashka911

    Move view(camera) matrix

    I see world much difficult than it is...
  6. D3DXVECTOR3 m_pos; D3DXVECTOR3 pos; D3DXVECTOR3 lookAt; D3DXVECTOR3 up; D3DXMATRIX m_cameraMatrix; D3DXMATRIX translate, result; D3DXMatrixLookAtRH(&m_cameraMatrix, &pos, &lookAt, &up); D3DXMatrixIdentity(&translate); D3DXMatrixTranslation(&translate, m_pos.x, m_pos.y, m_pos.z); result = m_cameraMatrix * translate; return result; I want to move camera to m_pos position, as i do it with world matrix, but it seems it doesn't work, any ideas?
  7. romashka911

    Failing to draw faces in normal way

    Can anybody help me?
  8. romashka911

    Failing to draw faces in normal way

    i solved the problem, i should export model converted to editable mesh. No, it's stiil wrong.. dx11 2018-09-20 19-10-28-40.bmp
  9. romashka911

    Failing to draw faces in normal way

    It seems yes I didn't understand your advise firstly, then i converted model in 3d s max to Editable mesh and all works fine now. Thank you very much, kind man.
  10. Hi! I'm writing my first DX11 engine, and now i'm trying to load .obj file and draw it. Today i've already tried two classes from web, that should load .obj to vertices, indices etc... When i tried first loader, i saw an issue, see in picture. I thought that this .obj loader bad, and spent a half a day to implement other one, but the issue still existing. I use D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST, and export from 3dsmax with triangle faces. Maybe somebody can tell me, why does it draw like this? Thanks. dx11 2018-09-20 18-16-10-30.bmp dx11 2018-09-20 18-28-33-77.bmp
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!