directdraw

error LNK2001: unresolved external symbol _IID_IDirectDraw2

孤街醉人 提交于 2020-01-04 11:04:15
问题 I work with piece of legacy code which uses direct draw and I'm in rather embarrassing situation. Not long ago I've updated my system and had to adapt to the new situation (loading ddraw.dll) and everything worked fine. Today I explored another legacy solution which also uses classes (files) I've changed, but I'm stuck with above mentioned linking error. I've checked and compared project properties and they seam fine. This is code for directX initialization, "troublesome" code is bold.

I thought *.DDS files were meant to be quick to load?

≡放荡痞女 提交于 2020-01-01 05:47:26
问题 Ok, so I'm trying to weigh up the pro's and con's of using various different texture compression techniques. I spend 99.999% of my time coding 2D sprite games for Windows machines using DirectX. So far I have looked at texture packing (SpriteSheets) with alpha-trimming and that seems like a decent way to get a bit more performance. Now I am starting to look at the texture format that they are stored in; currently everything is stored as *.PNGs. I have heard that *.DDS files are good,

Drawing video with text on top

拥有回忆 提交于 2019-12-30 08:54:28
问题 I am working on an application and I have a problem I just cant seem to find a solution for. The application is written in vc++. What I need to do is display a YUV video feed with text on top of it. Right now it works correctly by drawing the text in the OnPaint method using GDI and the video on a DirectDraw overlay. I need to get rid of the overlay because it causes to many problems. It wont work on some video cards, vista, 7, etc. I cant figure out a way to complete the same thing in a more

Drawing video with text on top

穿精又带淫゛_ 提交于 2019-12-30 08:54:10
问题 I am working on an application and I have a problem I just cant seem to find a solution for. The application is written in vc++. What I need to do is display a YUV video feed with text on top of it. Right now it works correctly by drawing the text in the OnPaint method using GDI and the video on a DirectDraw overlay. I need to get rid of the overlay because it causes to many problems. It wont work on some video cards, vista, 7, etc. I cant figure out a way to complete the same thing in a more

How to work with pixels using Direct2D

风流意气都作罢 提交于 2019-12-18 11:36:31
问题 Could somebody provide an example of an efficient way to work with pixels using Direct2D? For example, how can I swap all green pixels ( RGB = 0x00FF00 ) with red pixels ( RGB = 0xFF0000 ) on a render target? What is the standard approach? Is it possible to use ID2D1HwndRenderTarget for that? Here I assume using some kind of hardware acceleration. Should I create a different object for direct pixels manipulations? Using DirectDraw I would use BltFast method on the IDirectDrawSurface7 with

Windows Mobile / Directdraw: Rotate video stream

血红的双手。 提交于 2019-12-13 05:15:09
问题 Follow up from: Directdraw: Rotate video stream I managed to preview the camera's video stream, but the image is rotated by 90° to landscape mode. I'm now searching for a way to rotate the camera image back to normal, but the problem is I don't even know where to start: Is this done in the VideoCaptureFilter, the VideoInfoHeader, in a DDSURFACEDESC structure? Can the rotation only be done by using an additional filter? Is it a filter setting? 回答1: I found out that this is usually done with

is screenshotting by DirectDraw faster than GDI way?

让人想犯罪 __ 提交于 2019-12-11 15:48:26
问题 just to save some time, probably anybody tried this or saw somewhere related info. asking about DirectDraw and not about DirectX because I need to support Win2000 and up, and I cannot install DirectX on target PC 回答1: tried capturing by Direct3D and compared with GDI way. Results are not unambiguous. On my Win7 x64 with rather good video card D3D way shows ~2 times performance boost. On my WinXP 32bits laptop with not-integrated but old video card D3D works much much much longer. On another

DDS texture loading

瘦欲@ 提交于 2019-12-10 10:20:00
问题 How would I load a dds texture file into an OpenGL 2dtexture or cube map texture? 回答1: I believe you use the glCompressedTexImage2DARB method and its friends. This PDF seems to contain some promising info that may be helpful to you. 回答2: Depending on your needs, the DevIL library can take care of feeding OpenGL with a DDS file content. 回答3: If the DDS contains a compressed texture then use glCompressedTexImage2DARB(), if it contains uncompressed data the usual glTexImage2D procedure applies.

What's the fastest way to repeatedly fill a window with RGB data from an array?

做~自己de王妃 提交于 2019-12-07 04:24:56
问题 I'm currently writing a simple game. My graphics code runs once per frame (approximately 30 times per second), and writes RGB data to an array with 640 * 480 = 307200 entries. I have created a Win32 window with a client area exactly 640 x 480 pixels in size. What's the fastest way to get my RGB data displayed within the otherwise-empty window? The window will need to be updated every frame, so I need to avoid flickering. Should I use GDI for this? Or is there a faster approach using a

Delphi + webcam

核能气质少年 提交于 2019-12-06 09:57:23
问题 I am looking for a way to use my webcam in delphi, primary for grabbing a picture, by some reason I cannot use TWAIN drivers. 回答1: Try these resources DSPack DSPack is a set of Components and class to write Multimedia Applications using MS Direct Show and DirectX technologies. DSPack 2.3 is designed to work with DirectX 9 on Win9X, ME, 2000, and Windows XP operating systems using Delphi 5,6,7 and BCB6. or capCreateCaptureWindow function (sample code) The capCreateCaptureWindow function