So what I want to do is:
//in class.h:
ID3D11Buffer* vertexBuffer;
//and the definition:
void calcLodLevel(ID3D11Buffer **vertexBufferIn);
//in class.cpp
void chunk::calcLodLevel(ID3D11Buffer **vertexBufferIn){
...
d3d11Device->CreateBuffer( &vertexBufferDesc, &vertexBufferData, vertexBufferIn);
}
//and in the init() of the class:
calcLodLevel(&vertexBuffer);
//Updated with Captacha's suggestion, keeps crashing the graphicdriver
There really isn't more codeI just want to fill the buffer I pass into the function with the CreateBuffer D3D11 function, which takes a reference.
Well, not much stuff. But it causes my graphic driver to crash.
Can you tell me what I'm doing wrong?(My basic c++ sucks thought)
Thanks
Edited by gnomgrol, 24 July 2012 - 01:45 AM.






