Skip to main content
GameDev.net gamedev.net
🔒 Locked

DirectX Graphics Question

Started by Xeno Oct 10, 2001 at 11:50 AM 0 replies 500+ views
Original Post
Xeno
Xeno
hi i have a question about the IDirect3DResource interface: i want to load a bitmap to my resource , then i need to use the HRESULT IDirect3DResource ::GetPrivateData( REFGUID refguid, void* pData, DWORD* pSizeOfData); routine to get a pointer to the surface memory. but , i have no idea what should i pass to refguid (the first parameter)... anyone know , i coundnt find anything about it in the SDK. Thanks , roy.
------------------------------- Goblineye Entertainment------------------------------
Morten
Morten
The IDirect3DResource::GetPrivateData isn''t for accessing the resource''s data, but for retreiving the data you''ve attached with SetPrivateData. The GUID is to enable you to attach an arbitrary amount of objects to the resource (i.e. roll your own GUIDs).

Well confusing.

To get at the surface data, after IDirect3DDevice::CreateTexture, you can just do a IDirect3DTexture::Lock to get at the surface data and plonk your own stuff in there.. D3DX does colour-conversion, if that''s an issue.

-Morten-

Topic Locked

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

Sign in to reply to this topic.