Jump to content
  • Advertisement
Sign in to follow this  
3dcgmodeling

texture and gdi

This topic is 4269 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

any way to write pixel data into texture by windows gdi function and then I can map the texture to mesh by d3d? which function available? can I access d3d texture data by window gdi function?

Share this post


Link to post
Share on other sites
Advertisement
You can get the top surface level for the texture (IDirect3DTexture9::GetSurfaceLevel()), then use IDirect3DSurface9::GetDC() to get a HDC for that surface which you can draw to. Then release the DC (IDirect3DSurface9::ReleaseDC()) and release the surface.

Although, why do you want to do this? There's probably a more efficient way to do things...

Share this post


Link to post
Share on other sites
I work on a project that combine gdi and d3d. it use stretchDIBits createDIB**(i forgot the link). it seem to create a memory dc and a dibitmap.obtain a pointer to it.use outtext to output image.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!