delete(initData); // Delete data of regain memory
// Create constant buffer (size must be multiple of 16)
bufferDesc.BindFlags(D3D11_BIND_CONSTANT_BUFFER);
bufferDesc.Usage(D3D11_USAGE_DYNAMIC);
bufferDesc.CPUAccessFlags(D3D11_CPU_ACCESS_WRITE);
bufferDesc.ByteWidth((int) sizeOf(D3DXMATRIX.class));
final ID3D11Buffer constBuffer = device.CreateBuffer(bufferDesc, null);
final AtomicInteger angle = new AtomicInteger(0);
final D3DXMATRIX mat = new D3DXMATRIX();