| Summary: | Direct3D 11 renderer emits error message when created | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Alex <fatlock> |
| Component: | render | Assignee: | Sam Lantinga <slouken> |
| Status: | NEW --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.10 | ||
| Hardware: | x86_64 | ||
| OS: | Windows 10 | ||
| Attachments: | Sample initialization | ||
It seems like ignoring commands without vertex data. Because code like this:
SDL_RenderClear(renderer);
SDL_RenderFlush(renderer);
just doesn't work.
So I looked at the sources and found this code:
if (D3D11_UpdateVertexBuffer(renderer, vertices, vertsize) < 0) {
return -1;
}
Then changed into:
if (vertsize > 0 && D3D11_UpdateVertexBuffer(renderer, vertices, vertsize) < 0) {
return -1;
}
Now works as expected but I'm not sure!
|
Created attachment 3927 [details] Sample initialization When creating a Direct3D 11 renderer you get some error messages. They are visible if debug logs are enabled. Here is an output from Visual Studio: D3D11 ERROR: ID3D11Device::CreateBuffer: The Dimensions are invalid. ByteWidth cannot be 0. [ STATE_CREATION ERROR #66: CREATEBUFFER_INVALIDDIMENSIONS] D3D11 ERROR: ID3D11Device::CreateBuffer: CreateBuffer returning E_INVALIDARG, meaning invalid parameters were passed. [ STATE_CREATION ERROR #69: CREATEBUFFER_INVALIDARG_RETURN] DEBUG: __FUNCTION__, ID3D11Device1::CreateBuffer [vertex buffer]: The parameter is incorrect. INFO: Created renderer: direct3d11