Skip to main content
gamedev.net
🔒 Locked

D3D Programming Problem

Started by BrianDra2 Oct 21, 2000 at 12:07 PM 0 replies 200+ views
Original Post
BrianDra2
BrianDra2
Hello, This is more of a programming problem then a Direct3DRM problem, but it does include D3DRM functions, so here is the code that gives me compiler errors: DWORD dwnumofvisuals; LPDIRECT3DRMVISUALARRAY vis; LPDIRECT3DRMFRAME3 frame; . . . frame->GetVisuals(&dwnumofvisuals, NULL); //get num of visuals vis = (LPDIRECT3DRMVISUALARRAY) malloc( dwnumofvisuals * sizeof(LPDIRECT3DRMVISUALARRAY)); frame->GetVisuals(&dwnumofvisuals, vis); //get actual visuals I get the following error when I try to compile the program: error C2664: ''GetVisuals'' : cannot convert parameter 2 from ''struct IDirect3DRMVisualArray *'' to ''struct IUnknown ** '' So how do I fix this? Thanks, Briandra2
BrianDra2
BrianDra2
Okay, forget the first post. I figured out a way to get the program to work:


DWORD dwCount;
// Get the number of Visuals
frame->GetVisuals( &dwCount, NULL );
// Allocate space for the Visuals
LPUNKNOWN *ppVisuals = new LPUNKNOWN[dwCount];
frame->GetVisuals( &dwCount, ppVisuals);


But I`ve got another problem: How do I change this ppVisuals structure into a LPDIRECT3DRMVISUALARRAY structure?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.