Archived

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

programming graphics for vga?

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

hi, can any one explain me the difference b/w vga & agp in detail.i am also learning assembly(for dos),so will it be good for me to program vga for making graphics? or should i use libraries like opengl or directx? i also don''t understand that how and in which languages the libraries like opengl and directx are written?i am very much interested in developing a simple graphics lib of my own for the purpose of learning in assembly.if any one out there can help please reply.if u know some site also tell me that

Share this post


Link to post
Share on other sites
Here''s a brief (and probably inaccurate) description to tide you over until someone with more expertise answers.

AGP is a bus architecture - it''s used to send data to the video card, the advantage being that it has much better bandwidth than PCI/ISA.
VGA is a display type/mode - 640*480*8bpp I think.

I''m almost certain you can''t use DirectX in DOS, not sure about OpenGL but I doubt it. I also don''t know to what extent you could use them in assembly progs. Both libraries are probably written mostly in C/C++.

Share this post


Link to post
Share on other sites
NeverSayDie is correct agp is a data bus, vga is a graphic standard , svga is another standar for higher resolution in the old dos time , vga resolution was 320x240x256 , if you want to use that resolution under dos you have to use assembly , since there is not a standard library for an obsolete resolution like this , anyway , i got some code around my hardisk, the svga modes are better but you need univesa 2.0 to use a linear frame buffer without the hassle of memory segmentation, of course you have to supply everything in assembly for speed reasons, setupping a video mode, closing resolution mode ,and drawing a pixel with pallettized mode ( no rgb components ) , directx and opengl under dos cannot be used ( though openlg runs with glut )if you are going to learn some assembly use , those old standards but i wouldn''t bother so much in these days...

Share this post


Link to post
Share on other sites
Far as I know basic graphics in DOS asm aren''t too difficult - there''s lots of resources around the web for this - might even be some here on GameDev. Allegro is a fairly high level game dev library for DOS, btw, that handles graphics pretty well.

I assume you know what you''re doing getting into assembly btw - if you just want to get into game dev/graphics as a beginner you''d be much better off using a high-level lib like OpenGL or the graphics portion of DirectX.

Share this post


Link to post
Share on other sites
so u mean that agp is only a data bus or may be its a port(as its name suggest) used to accelerate the transfer of graphics data by taking off the load from processors data bus and the libs like opengl & directx also use the same old graphics hardware ie vga or svga.i mean to say that agp is not another vga type graphics card.If i m wrong in understanding it please tell me.And yes i m also using opengl but i m asking these things because i like to know how the low level routines are written and since my aim is to become a programmer therefore one must know about the hardware as well in order to write more efficient programs. please reply i m really hungry to know these things.

Share this post


Link to post
Share on other sites
Buzz - yeah, you could look at AGP as being a special kind of port for sending data to the video card. VGA is just a video mode.

No, OpenGL and such like do more than just display VGA graphics - modern video cards do an awful lot more than just implementing standard VGA hardware. Hardware acceleration and all that - high speed rendering of textured triangles. Newer ones also get invloved in calculating lighting, vertex tranforms, that kind of stuff - hardware T&L.

Share this post


Link to post
Share on other sites
now its all making sense.Thanx very much NeverSayDie, Cwizard and v71 for ur replies.also thanx for the link.and if any one can tell me more about the graphics hardware used today i will be waiting.and thanx again

Share this post


Link to post
Share on other sites
I won't tell you lot about todays hardware, eh... 'cus I really don't know lots of it. But I think you are on the right track looking back to the roots and build the basic knowledge. Kids are soo spoiled today, that they couldn't even plot a line on their own, and worse, they wouldn't even understand why they should know it. If you learn to do advanced graphics only using your own code, only talking with the hardware, without the use of any libraries etc, you'll be a killer when moving on to modern systems.

[edited by - CWizard on August 28, 2002 5:01:04 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by Serge K
[quote]Original post by Buzz1982
...will it be good for me to program vga for making graphics?
...
i am very much interested in developing a simple graphics lib of my own for the purpose of learning in assembly.


You don''t need to know VGA hardware to do custom graphics.
Anyhow, VGA is an obsolete way to deal with the limitations of the 16 bit PC platform - small address space, slow bus, etc...
Even if you work in DOS, it''s better to use 32 bit DOS extension + VESA 2.0. It provides linear frame buffer, VESA 1.0 (for 16bit DOS) - doesn''t.

The simplest way to practice hand-made graphics code in Win32 is to use DIB Section - it''s a bitmap you can access as memory array.

Also you may try SDL.
(putpixel in SDL surface)


Share this post


Link to post
Share on other sites
quote:
Original post by CWizard
Kids are soo spoiled today, that they couldn''t even plot a line on their own, and worse, they wouldn''t even understand why they should know it.

If you learn to do advanced graphics only using your own code, only talking with the hardware, without the use of any libraries etc, you''ll be a killer when moving on to modern systems.

it''s a good test to see if you can write a 3d engine, using at most direct draw to get surface access, but writing all the drawing and raster routines yourself. It''s also fun

since i did this the first time, it gave me such a deep understanding of EVERYTHING that''s going on under the hood, it''s helped me out greatly. Heck, maybe before my 17''th birthday (in two months) i can get some good dynamic shadows working.

as for a question about 3d hardware, read the directx docs that come with the directx sdk, and check out Nvidia''s website.

Share this post


Link to post
Share on other sites