directdraw

DDS texture loading

老子叫甜甜 提交于 2019-12-05 18:57:23
How would I load a dds texture file into an OpenGL 2dtexture or cube map texture? I believe you use the glCompressedTexImage2DARB method and its friends. This PDF seems to contain some promising info that may be helpful to you. Depending on your needs, the DevIL library can take care of feeding OpenGL with a DDS file content. If the DDS contains a compressed texture then use glCompressedTexImage2DARB(), if it contains uncompressed data the usual glTexImage2D procedure applies. Once for each mipmap level if the DDS file contains mipmaps, and once for each cubemap face if its a cubemap. For how

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

ⅰ亾dé卋堺 提交于 2019-12-05 10:15:43
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 different library - say, DirectDraw? Edit: Thanks for all the replies. Firstly, let me rule out Direct2D as an

Directdraw: Rotate video stream

旧时模样 提交于 2019-12-04 05:26:53
问题 Problem Windows Mobile / Directdraw: Rotate video stream The video preview is working, all I need now is a way to rotate the image. I think the only way to handle this is to write a custom filter based on CTransformFilter that will rotate the camera image for you. If you can help me to solve this problem, e.g. by helping me to develop this filter with my limited DirectDraw knowledge, the bounty is yours. Background / Previous question I'm currently developing an application for a mobile

“Exclusive” DirectDraw palette isn't actually exclusive

Deadly 提交于 2019-12-03 13:39:10
问题 We're maintaining an old video game that uses a full-screen 256-color graphics mode with DirectDraw. The problem is, some applications running in the background sometimes try to change the system palette while the game is running, which results in corrupted graphics. We can (sometimes) detect when this happens by processing the WM_PALETTECHANGED message. A few update versions ago we added logging (just log the window title/class/process name), which helped users identify offending

Why not use GDI to repeatedly fill a window with RGB data from an array?

寵の児 提交于 2019-12-03 11:31:06
问题 This is a follow-up to this question. I'm currently writing a simple game and am looking for the fastest way to (repeatedly) display an array of RGB data in a Win32 window, without flickering or other artifacts. Several different approaches were recommended in the answers to the previous question, but there was no consensus on which would be the fastest. So, I threw together a test program. The code simply displays a framebuffer on the screen repeatedly, as fast as possible. These are the

“Exclusive” DirectDraw palette isn't actually exclusive

橙三吉。 提交于 2019-12-03 03:40:54
We're maintaining an old video game that uses a full-screen 256-color graphics mode with DirectDraw. The problem is, some applications running in the background sometimes try to change the system palette while the game is running, which results in corrupted graphics. We can (sometimes) detect when this happens by processing the WM_PALETTECHANGED message. A few update versions ago we added logging (just log the window title/class/process name), which helped users identify offending applications and close them. MSN Live Messenger was a common culprit. The problem got worse when we found out that

Why not use GDI to repeatedly fill a window with RGB data from an array?

六月ゝ 毕业季﹏ 提交于 2019-12-03 01:55:35
This is a follow-up to this question . I'm currently writing a simple game and am looking for the fastest way to (repeatedly) display an array of RGB data in a Win32 window, without flickering or other artifacts. Several different approaches were recommended in the answers to the previous question, but there was no consensus on which would be the fastest. So, I threw together a test program. The code simply displays a framebuffer on the screen repeatedly, as fast as possible. These are the results I obtained, for 32-bit data running in a 32-bit video mode - they may surprise some people: -

How to load .dds files into a picturebox?

99封情书 提交于 2019-12-01 06:43:41
How do I load .dds texture files as an Image in C#? There's nothing useful on google that I could find. The more information with samples you give me,the better it will be for me to understand it. I think the short answer is that you don't. The documentation says that the supported formats are BMP, GIF, EXIG, JPG, PNG and TIFF. Update: there seem to be a number of converters to be found through Google , that might help you out. Also, as Wayne suggests, look at XNA (if you didn't already). The Texture2D.FromFile method seems to handle the .dds files, but I never used it myself so I can't say if

How to load .dds files into a picturebox?

别说谁变了你拦得住时间么 提交于 2019-12-01 04:12:57
问题 How do I load .dds texture files as an Image in C#? There's nothing useful on google that I could find. The more information with samples you give me,the better it will be for me to understand it. 回答1: I think the short answer is that you don't. The documentation says that the supported formats are BMP, GIF, EXIG, JPG, PNG and TIFF. Update: there seem to be a number of converters to be found through Google, that might help you out. Also, as Wayne suggests, look at XNA (if you didn't already).