1 / 12

Graphics Displays

Graphics Displays. Video graphics adapter. Monitor. CRT Raster Scanning. No e-beam in LCD’s. However, the logical sequence of setting discrete pixel colors is similar. Early graphics adapters. Frame buffer. CPU. System Memory. Scan Converter. video, vga. Pixel construction. Bus.

adele
Download Presentation

Graphics Displays

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Graphics Displays Video graphics adapter Monitor CS-321Dr. Mark L. Hornick

  2. CRT Raster Scanning No e-beam in LCD’s. However, the logical sequence of setting discrete pixel colors is similar. CS-321Dr. Mark L. Hornick

  3. CS-321Dr. Mark L. Hornick

  4. Early graphics adapters Frame buffer CPU SystemMemory Scan Converter video, vga Pixel construction Bus • CPU constructs “virtual image” in Frame Buffer in System Memory • Scan converter reads virtual image and converts to video or vga signals CS-321Dr. Mark L. Hornick

  5. Memory Mapping Example Video RAM 00 01 02 03 04 05 06 07 08 09 0a 0b … Display CS-321Dr. Mark L. Hornick

  6. Video Display Timing Example 1280 1024 Refresh rate = 85 Hz,n lines/s, x s/line. 1024 * 1280 =nn pixels 1280 pixels Pixel time = y s,z MHz clock CS-321Dr. Mark L. Hornick

  7. Later graphics adapters Multiple Frame buffers CPU SystemMemory Video RAM Scan Converter vga GPU Graphics primitives Bus CS-321Dr. Mark L. Hornick

  8. Today’s graphics adapters Multiple Frame buffers CPU SystemMemory Scan Converter svga GPUDP Xform engine, shader, spline gen, … Gr. Display cmds. Bus CS-321Dr. Mark L. Hornick

  9. Pixel Addressing • Integer coordinates • Horizontal • Left to right • Vertical • Top to bottom or bottom to top? • Usually top to bottom (Windows) • Memory bits map to pixels x y CS-321Dr. Mark L. Hornick

  10. Line Drawing Algorithms (x1, y1) (x0, y0) Which pixels should be set to represent the line? CS-321Dr. Mark L. Hornick

  11. Line Equations (x1, y1) (x0, y0) Equations implemented in lab1 sample code. CS-321Dr. Mark L. Hornick

  12. Setting a Pixel // SetPixel - write (x,y) pixel value into the fb #define PIX_PER_LINE 24 #define PIX_PER_WORD 4 #define BITS_PER_PIX 8 #define FBSIZE 256 // size of frame buffer #define FBADDR 0xffff // presumed hw addr of frame buffer int *vmem = FBADDR; // set a pointer to the frame buffer //int fb[FBSIZE]; // simulated frame buffer //int* vmem = fb; // ptr to simulated frame buffer void setPixel (int x, int y, int val) { int pix = y * PIX_PER_LINE + x; // linear pixel addr int addr = pix / PIX_PER_WORD; // base fb addr int ofst = pix % PIX_PER_WORD; // offset in fb word vmem[addr] = vmem[addr] | (val << (ofst * BITS_PER_PIX)); } CS-321Dr. Mark L. Hornick

More Related