Jump to content
  • Advertisement

Archived

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

3DG

A Software Engine Question

This topic is 6370 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

A Software Engine Question Ok I have been coding in OpenGL for quite a while now, and I have a BSP engine running nicely, and also my Octree Engine is starting to come together as well. Anyway, I would like to start developing a Software Engine I am not aiming for anything amazing, dots then lines then polygons then texture mapping, and so on. Ok first things first in windows how do I just display or draw a simple dot, 1 pixel on a form in windows. I cant seem to find any windows functions to do this, in dos this would be very easy but how does windows do such a thing. If I can just find a way to draw the simplest of things a pixel of any color then the rest will fall into place without any help ie drawing lines, polygons etc So simple put, How do I draw a pixel of any color on a form in Windows? Any Info on this would be very helpful or pointers to a Tutorial if this is a difficult thing. Thanks 3DG

Share this post


Link to post
Share on other sites
Advertisement
You must use DirectDraw. Read some DirectX tutorials on how to use it. To plot pixels on a DirectDraw surface, you first Lock() it, draw stuff, then Unlock() it.

I just finished an affine texture mapped, gouraud shaded, z-buffered software renderer in MMX today. It took a little while, but it was worth it -- it's much faster than Direct3D's (although mine doesn't have perspective-corrected textures yet).

~CGameProgrammer( );



Edited by - CGameProgrammer on January 29, 2001 7:44:55 PM

Share this post


Link to post
Share on other sites
Just for the record: you can choose to do it all with Win32 using a DIB (device independent bitmap).
But much people have trouble setting this thing up, and it is slower then DX.

So like CGameProgrammer said - DirectDraw

Share this post


Link to post
Share on other sites
Ok Thanks,

I will defiantly look into using direct draw, but is there anyway to do it with out Direct Draw??


Thanks Again 3DG

Ps This was written before the message from baskuenen (thanks for the info) appeared for me thanks I will look into using a DIB (device independent bitmap), are there any other ways ? Anyone ?


Edited by - 3DG on January 29, 2001 8:16:11 PM

Share this post


Link to post
Share on other sites
Why don''t you want to use DirectDraw? It''s the best way. And learning to use it is much, much easier than writing an actual decent software renderer, so you might as well learn it.

~CGameProgrammer( );

Share this post


Link to post
Share on other sites
>>Why don''t you want to use DirectDraw?<<

a good reason is its gone the way of the dodo

http://members.xoom.com/myBollux

Share this post


Link to post
Share on other sites
>>Why don''t you want to use DirectDraw?<<

a good reason is ''cause its gone the way of the dodo''

http://members.xoom.com/myBollux

Share this post


Link to post
Share on other sites
Graphics using windows functions doesn''t have to use DIBs. You can simply use an HBITMAP. Then use SetPixel and GetPixel to plot individual pixels. BitBlt is a sprite blitter, PatBlt is a fast way of clearing the bitmap. Used properly, you can do Windows graphics pretty fast.

You don''t have to use DirectDraw at all. I''d be more inclined to recommend you use OpenGL, since it blends rather well with Windows.



"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..."

Share this post


Link to post
Share on other sites
Ok I will try to answer all the topics raised, and also first off thanks for all the input so far, OK then,

>CgameProgrammer

>Why don''t you want to use DirectDraw? It''s the best way. And learning to use it is >much, much easier than writing an actual decent software renderer, so you might as >well learn it.

>~CGameProgrammer( );

For the Software Engine I wish to write, well I had hoped to create something from scratch, the whole thing is intended to be more of a learning project than anything else, and also I had hoped that it could be entirely my own code nothing else needed. I do not at present care about the performance I just wish to experiment with the algorithms that go into a software engine.

---------------------------------------------------------------------

>>zedzeek

>>>>Why don''t you want to use DirectDraw?<<
>>a good reason is its gone the way of the dodo

Without looking I think DX8 combined Direct Draw and Direct3D. I would have to look to see if Direct Draw programs still work under DX8 but it does not look good.

---------------------------------------------------------------------

>>morfe

>>Graphics using windows functions doesn''t have to use DIBs. You can simply use >>an HBITMAP. Then use SetPixel and GetPixel to plot individual pixels. BitBlt is a >>sprite blitter, PatBlt is a fast way of clearing the bitmap. Used properly, you can do >>Windows graphics pretty fast.

Ok Thanks for this, I new it would be something simple, I will definitely be taking a look at this thanks.

>>You don''t have to use DirectDraw at all. I''d be more inclined to recommend you >>use OpenGL, since it blends rather well with Windows.

I could use OpenGL but I would like to take a stab at creating everything from the ground up, I hope and think it will stand as a great learning experience.

---------------------------------------------------------------------

Thanks for all your input I will take a look at both HBITMAP and DIB (device independent bitmap), thanks again for al your input. Happy Coding.


3DG

Share this post


Link to post
Share on other sites
Hi.

The "Direct Draw is extinct" argument is somewhat void.You can still (And will always be) able to use the Direct Draw 7 interfaces for straight DD stuff. You can use DD3 if you want to. Just because DX8 has merged DD and D3D does not mean that you cant or shouldn;t use the older interfaces.

Pete

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!