TAILIEUCHUNG - Programming Linux Games phần 9

Trong chúng ta sẽ có rất nhiều người hỏi: "Thế Linux có gì hay ???". Linux, ngay từ ngày đầu, được tạo ra với 1 suy nghĩ về sự kết hợp cùng Internet. Vì thế Linux đã đi trước trong việc tạo ra 1 hệ thống : đa người dùng ( multi-user ), đa nhiệm ( multi-tasking ), hỗ trợ nhiều CPU cùng 1 lúc, . đã và đang đóng góp cho những hệ thống trọng điểm của Internet ngày nay. | GAMING WITH THE LINUX CONSOLE 327 Personally I think this design is seriously misguided a program can easily leave the console in an unusable state but it s entrenched at this point. It might be a good idea to create a script to restore the framebuffer s state in case you find yourself without a working display after a failed program run. Some programs partially overcome the problem by opening a new virtual terminal before setting the video mode and then switching back to the old one when they exit. How Video Scanning Works A video mode can be described by several key properties. Users and even programmers usually just speak of video modes in terms of resolution and color depth with an occasional mention of refresh rate. A more precise way of describing a video mode is to list the various time intervals involved in the video scanning process. This information has to be provided at some point regardless of how it is presented to the user or programmer the CRTC unit needs it in order to scan an image on the display. Although these numbers may seem mysterious at first they re pretty simple to work with once you understand what they mean. Figure 8-1 illustrates the different components involved in a single video refresh. The monitor s electron beam see the beginning of Chapter 4 starts in the upper left corner sweeping from left to right repeatedly as it moves from the top of the screen to the bottom. Each horizontal sweep is called a scanline. The process begins with a few wasted sweeps. This period is called the upper margin and it serves to get the electron beam in position for the actual image-drawing process. The upper margin is measured in scanlines. Now that the beam is positioned at the upper left corner of the visible portion of the monitor it can start producing pixels. It proceeds to generate a complete image by performing a number of sweeps equal to the vertical resolution of the display mode 480 scanlines in the case of Figure 8-1 . Each sweep begins with

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.