🎉 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
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?
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
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
Mvh Mario..
Edited by - dharma on January 7, 2002 12:42:30 PM
Edited by - dharma on January 7, 2002 12:43:07 PM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement