Jump to content
  • Advertisement

Archived

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

Aardwolf

win32 fullscreen pixel in assembly with devcpp4

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

What assembly code do I have to add in devcpp4 to show a pixel at location x,y with color r,g,b in fullscreen in win32 at resolution I want? Or are there better ways with devcpp4 to do it? What's the fastest way, because every nanosecond can help here... Thanks. Edited by - aardwolf on February 18, 2002 10:01:54 PM

Share this post


Link to post
Share on other sites
Advertisement
Dev C++ uses a port of GCC to Windows, not DOS. In Windows you don''t have direct access to the screen buffer like you did in DOS. To still get graphics you''re almost forced to use OpenGL or DirectX. Take your pick . If you''re not really serious about it being fast you can use the GDI also.

Share this post


Link to post
Share on other sites
Well, fast it needs to be
What''s faster? OpenGL or DirectX?

Is DOS even faster?
If DOS is fastest, I may stick with that, but how can I do rgb color with it? (I think rgb color will make my thing faster, not slower)

Thanks.

Share this post


Link to post
Share on other sites
quote:
Original post by Aardwolf
What''s faster? OpenGL or DirectX?

A question to be avoided. They both rely on the hardware to do the rendering so they''re essentially the same.
quote:
Original post by Aardwolf
Is DOS even faster?

For plotting single pixels it may be. But for anything more advanced that can be hardware accelerated, it won''t be.


Share this post


Link to post
Share on other sites
Well, I'll go for OpenGL then, that's the not-microsoft one

Too bad I can't use hardware accelaration for this program, but I just want away from DOS. (well, it's a 3D raytracer that draws a cube based world pixel by pixel, I made it work with FirstBasic already but it's too slow and I can't do colored lighting with only 16 colors)

Edited by - aardwolf on February 18, 2002 10:36:30 PM

Share this post


Link to post
Share on other sites
I will be showing my complete lack of understading here... But how is it possible for Windows to control memory access.

I figured assembly is executed directly (as typed by the programmer). Where does the OS intervene ?

Share this post


Link to post
Share on other sites
umm, direct pixel acces is best done using DIBs (at the same resolution/color depth as the screen) or using directdraw. using opengl for per pixel access is just plain ignorent and doing it because its non microsoft is just plain stupid. if you hate ms that much, code for linux, NOT windows. in fact dont even use windows, show ms you really can get along without them instead of being stupid and using the wrong tool for the job.

NewDeal: quite simple, just like c compiled code, assembly is converted to a machine code excutable. assembly is not magically, just a closer langauge (1:1 for the most part since some "compilers" have special macros). since you are using actual machine instructions, but because of this you must rewrite the entire code if you plan on running on other cpus (since each cpu has a different "language"). i highly suggest learning some simple assembly just to understand how the cpu works, and also appreciate using higher level langauges like c/c++ and how complex cpus have gotten.

also in case i did not make it clear (which i may have not) when using assembly the code will run as coded by the programmer like any code in any langague. no mystical magic is granted except some tricks, optimization opurtunities, and ability to use things like mmx, sse, sse2, 3dnow even if the c/c++ compiler dont support them. heck you can even mix c/c++ and asm code (i do this in msvc++ for certain secions of code that need mmx).

Share this post


Link to post
Share on other sites
I''ve searched around there, but the only thing I found that may contain the ddraw.h file was a 165 MB exe file, and downloading this really is overkill. Is the ddraw.h file somewhere as seperate download, or if you have the file could you please send it to hybrid@altern.org?

Thanks a lot.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!