Archived

This topic is now archived and is closed to further replies.

apocalexiz

how to display a .bmp if i dont want to use...

Recommended Posts

any asm, windows function, opengl, directx. But i dont know how, i cant write into the memory of my graphics board so that the .bmp appears onto my screen, right? So i need information about this. I''d like a good internet site or some pretty well done tutorials thx for help bye apo

Share this post


Link to post
Share on other sites
Well, you will obviously have to write SOME kind of code to output a bitmap on the screen.
The easiest way is to code it in DOS, using mode13, but the problem there is that you can only use 256 color bitmaps in 320x200...
If you choose that approach all you have to do is load the bitmap, set the palette of the bitmap and simply copy the bitmap into the vga memory (0xA0000).
If you would like to view higher resolution and more color bitmaps, you will have to either use svga mode (which is a bit tricky) or use windows functions to create a window and put the bitmap in there.
As far as I know you can''t access the videomemory which is used by the windows graphics driver directly...
Another approach is to write it in linux instead, using either the framebuffer or svgalib, or even write it in xlib.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Well if your writing code under windows you are going to have to use an API. This means GDI, OpenGL, DirectX or other variants. There are a few reasons why..first and foremost is that any of the new windows os''s such as Windows XP and Windows 2k have completely phased DOS out. This means there is no real way to access mode 13h anymore. Now you can''t access the video card directly under windows either because the OS has control of it for drawing windows/icons and the rest of that stuff. So that leaves you to choose an API as stated above in order to load and display a bitmap.

Share this post


Link to post
Share on other sites