c++ - DirectX9 Texture of arbitrary size (non 2^n) -


I am relatively new to DirectX and I have to work on existing C ++ DX9 application. The app monitors the camera images and displays some direct-more (i.e. 2D) content. There is an aspect ratio of 4: 3 (always) in the camera and the screen is undefined.

I want to load a texture and want to use this texture as a mask, so tracking and displaying content is done only within the masked area of ​​texture so I have a texture I would like to load, which has the same size as the camera's images.

I have completed all the steps to load texture, but when I call GetDesc () field width and The height of D3 DSURFCDUNDC is the next big power-of-2 size. I do not care that the actual memory used for texture has been optimized for the graphics card but I did not find any way to get the dimensions of the original image file on the hard disk.

Search for the possibility of loading the RAM in the computer (no graphic card is needed) without adding a new dependency to the code (and done but without success) code. Otherwise I have to use OpenCVI (which may be a good idea in terms of tracking), but for the moment I still try to avoid with OpenCV.

Thank you for your hints, Norbert

with parameters 3 and 4 < / P>

  D3DX_DEFAULT_NONPOW2. After this, you can use  
  D3 DSURACDACC DCC; M_Sprite-> GetLevelDesc (0, & Disco);  

To get the height & amp; Width


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -