Jump to content
  • Advertisement

Archived

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

bower12345

Bitmap Loading With DirectX

This topic is 5646 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, Just have a quick question for all of you folks. A friend of mine from my university is giving me help when I need it with DirectX, but he said that I should be learning how to load bitmap files with my own functions, and not GDI functions. He said mixing GDI with DirectX isn''t a good idea. First of all, is this true or no? Second of all, are there any tutorials or text files I can access that give me an idea of the bitmap file structure or how I can go about starting to write my own bitmap loader? Thanks In advance. Mike

Share this post


Link to post
Share on other sites
Advertisement
hi,

just learn as needed, so right now, i don''t see why you still have to learn loading bitmap since dx has functions to do those stuffs for you,

and yeah mixing gdi with dx is bad but you won''t be using GDI anyway when the player is inside your game..,

what i mean by learn as needed is, of course there''s a lot of advantage if you study lots of stuffs even when you don''t use it but only if you have lots of time to spare, sorry i can''t explain much i just said this coz people most likely will contradict my statement,

Share this post


Link to post
Share on other sites
1) d3dx can load bitmaps, and it doesn''t seem to use gdi.

2) if you want to learn how to load bitmaps, by all means write your own loader. otherwise, it''s perfectly ok to use other people''s code. i don''t recall anyone recommending writing their own png or jpeg loaders without using libpng or libjpeg; similarly, you don''t have to write your own bitmap loaders if you don''t want to.

3) while the use of gdi is not recommended in performance-sensitive code, and some gdi/dx usage combinations are tricky to get right (fullscreen dialogs seem to be giving people a lot of trouble), in some cases you''d use both gdi and directx to get the job done. a good example is drawing text on screen, generating font texture at runtime.

Share this post


Link to post
Share on other sites
I would recommend using both GDI and DirectX
Each game has a set of tools to edit, load and save the data with which it works. You are going to have to make and update such tools and GDI has the main GUI tools that you need to navigate through the tasks you need to accomplish. You shouldn''t have to rebuild from scratch for every tool.

ZoomBoy
Developing a iso-tile 2D RPG with skills, weapons, and adventure. See my old Hex-Tile RPG GAME, character editor, diary, 3D Art resources at Check out my web-site

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!