🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

loading and diplaying Graphics

Started by
4 comments, last by jim_rainor 22 years, 6 months ago
I''m trying to program a starcraft tileset viewer. I''ve loadet the pixeldata into an array and tryed to display the grafik with setpixel, but this is so slow! How do i display graphics faster?
Advertisement
Well what language and API (DirectX / OpenGL / Win32) are you using ?
-------------Ban KalvinB !
Visual c++, win32 api.
You should probably look up BitBlt() which is used for displaying graphics in win32.
-------------Ban KalvinB !
I''ve tried this:


HBITMAP hbitmap;

BYTE buffer[50]={ 0, 0, 0, 0, 0,
0,255,255,255, 0,
0,255, 0, 0, 0,
0,255, 0, 0, 0,
0,255,255,255, 0,
0, 0, 0,255, 0,
0, 0, 0,255, 0,
0, 0, 0,255, 0,
0,255,255,255, 0,
0, 0, 0, 0, 0
}; // Image





hbitmap = CreateBitmap (5, 10, 1, 8, &buffer);
HDC hdc = GetDC(hwnd);
HDC image_dc = CreateCompatibleDC(hdc);

HBITMAP old_hbitmap = (HBITMAP)SelectObject(image_dc,hbitmap);

BitBlt(hdc,0,0,5,10,image_dc,0,0,SRCCOPY);


but it don''t display anything
Have a look at http://www.winprog.org/tutorial-old/

Mvh Mario..

Edited by - dharma on January 7, 2002 12:42:30 PM

Edited by - dharma on January 7, 2002 12:43:07 PM
Warm regardsMario..

This topic is closed to new replies.

Advertisement