Forum Discussion
raysan5
9 years agoHonored Guest
Oculus Rift CV1 HMDInfo device parameters
I'm working on an Oculus Rift CV1 stereo rendering simulator and my render does not match the one obtained directly using the Oculus PC SDK. If using DK2 default device parameters, results are similar...
galopin
9 years agoHeroic Explorer
If you are curious, here the code snippet to extract them for study purposes.
#include <fstream>
#include <vector>
#include <d3dcompiler.h>
struct Header {
unsigned int magic;
unsigned char sign[16];
unsigned int one;
unsigned int size;
unsigned int chunks;
};
int main() {
std::ifstream f(R"(C:\Program Files (x86)\Oculus\Support\oculus-runtime\OVRServer_x64.exe)",std::ios::binary|std::ios::ate);
if (!f)
return 1;
auto len = f.tellg();
f.seekg(0,std::ios::beg);
std::vector<char> file(len);
f.read(file.data(),len);
int val{};
for (std::size_t p = 0;p<file.size()-4;++p) {
if (file!='D' || file[p+1]!='X' ||file[p+2]!='B' ||file[p+3]!='C')
continue;
Header* head = (Header*)(file.data()+p);
char name[256];
sprintf_s(name,256,"dump%03d.cso",val);
std::ofstream out(name,std::ios::binary|std::ios::trunc);
out.write((char const*)head,head->size);
sprintf_s(name,256,"// dump%03d.cso ",val); // because disassemble put the comment before //, microsoft seriously ?
ID3DBlob* result{};
if (S_OK==D3DDisassemble(head,head->size,D3D_DISASM_ENABLE_COLOR_CODE|D3D_DISASM_ENABLE_INSTRUCTION_NUMBERING,name,&result)) {
sprintf_s(name,256,"_disa%03d.html",val);
std::ofstream out(name,std::ios::trunc);
out<<"<html>";
out.write((char const*)result->GetBufferPointer(),result->GetBufferSize());
out<<"</html>";
result->Release();
}
val++;
}
}
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 10 months ago
- 4 years ago
- 3 years ago
- 3 months ago