OpenGL Programming Guide. 8th Edition / OpenGL Руководство по программированию. 8-е издание

→What Is OpenGL?

OpenGL is an application programming interface---‘‘API’’ for short---which is merely a software library for accessing features in graphics hardware.

Version 4.3 of the OpenGL library (which this text covers) contains over 500 distinct commands that you use to specify the objects, images, and operations needed to produce interactive three-dimensional computer-graphics applications.

OpenGL is designed as a streamlined, hardware-independent interface that can be implemented on many different types of graphics hardware systems, or entirely in software (if no graphics hardware is present in the system) independent of a computer’s operating or windowing system. As such, OpenGL doesn’t include functions for performing windowing tasks or processing user input; instead, your application will need to use the facilities provided by the windowing system where the application will execute. Similarly, OpenGL doesn’t provide any functionality for describing models of three-dimensional objects, or operations for reading image files (like JPEG files, for example). Instead, you must construct your three-dimensional objects from a small set of geometric primitives---points, lines, triangles, and patches.

Since OpenGL has been around a while---it was first developed at Silicon Graphics Computer Systems with Version 1.0 released in July of 1994--- there are both many versions of OpenGL, as well as many software libraries built on OpenGL for simplifying application development, whether you’re writing a video game, creating a visualization for scientific or medical purposes, or just showing images. However, the more modern version of OpenGL differs from the original in significant ways. In this book, we describe how to use the most recent versions of OpenGL to create those applications.

The following list briefly describes the major operations that an OpenGL application would perform to render an image. (See ‘‘OpenGL’s Rendering Pipeline’’ for detailed information on these operations.)

• Specify the data for constructing shapes from OpenGL’s geometric primitives.
• Execute various shaders to perform calculations on the input primitives to determine their position, color, and other rendering attributes.
• Convert the mathematical description of the input primitives into their fragments associated with locations on the screen. This process is called rasterization.
• Finally, execute a fragment shader for each of the fragments generated by rasterization, which will determine the fragment’s final color and position.
• Possibly perform additional per-fragment operations such as determining if the object that the fragment was generated from is visible, or blending the fragment’s color with the current color in that screen location.

OpenGL is implemented as a client-server system, with the application you write being considered the client, and the OpenGL implementation provided by the manufacturer of your computer graphics hardware being the server. In some implementations of OpenGL (such as those associated with the X Window System), the client and server will execute on different machines that are connected by a network. In such cases, the client will issue the OpenGL commands, which will be converted into a window-system specific protocol that is transmitted to the server via their shared network, where they are executed to produce the final image.
0 Что такое OpenGL?

OpenGL - это !интерфейс программирования приложений! - сокращенно ‘‘API’’, которая просто является программной библиотекой для доступа к возможностям графического оборудования.

Версия 4.3 библиотеки OpenGL (которую охватывает эта книга) содержит более 500 !distinct/ясных! команд, которые вы используете для определения объектов, изображений и операций необходимых для обеспечения взаимодействия с трёхмерными графическими приложениями.

OpenGL спроектирован как !streamlined!, аппаратно-независимый интерфейс, который может быть реализован на многих различных типах аппаратных графических систем или полностью программно (если графического оборудования нет в системе) независимо от операционной системы компьютера или оконной системы. Как таковой, OpenGL не включает в себя функций для выполнения оконных задачи или обработку пользовательского ввода; вместо этого, вашему приложению придется использовать возможности, предоставляемые оконной системой, в которой она будет запускаться. Также, OpenGL не обеспечивает никакой возможности для описания моделей трехмерный объектов или операций для чтения графических файлов (как JPEG файлы, к примеру). Вместо этого вы должны построить свои трехмерные объекты из небольшого набора геометрических примитивов --- точки, линии, треугольники, и !pathes/многоугольников!.

!С тех пор как появился OpenGL! - он был впервые разработан Silicon Graphics Computer Systems, первая версия 1.0 вышла в июле 1994 - !появилось! много версий OpenGL, столько, сколько программных библиотек построено на OpenGL для упрощения разработки приложений, пишите ли вы видео игру, создаёте ли визуализацию для научных или медицинских целей или просто показываете изображения. Тем не менее, более современная версия OpenGL отличается от первоначального существенным образом. В этой книге мы опишем, как использовать последние версии OpenGL для создания этих приложений.
→This chapter introduces OpenGL. It has the following major sections:
• ‘‘What Is OpenGL?’’ explains what OpenGL is, what it does and doesn’t do, and how it works.
• ‘‘Your First Look at an OpenGL Program’’ provides a first look at what an OpenGL program looks like.
• ‘‘OpenGL Syntax’’ describes the format of the command names that OpenGL uses.
•"OpenGL's Rendering Pipeline’’ discusses the processing pipeline that OpenGL uses in creating images.
• ‘‘Our First Program: A Detailed Discussion’’ dissects the first program presented and provides more detail on the activities of each section of the program.
0 Эта глава знакомит с OpenGL. Она имеет следующие основные разделы:
• "Что такое OpenGL?" объясняет, чем является OpenGL, что оно делает, не делает, как он работает.
• "Ваш первый взгляд на OpenGL программу" даст первый взгляд на то, как выглядит OpenGL программа.
• "Синтаксис OpenGL" описывает формат имён команд, которые использует OpenGL.
• "Рендерный конвейер OpenGL" ˜обсуждает конвейер обработки, который OpenGL использует в создании изображений.
• "Наша первая программа: Подробное обсуждение" рассматривает первую представленную программу и предоставляет более подробную информацию о действиях каждой части программы.
→Chapter Objectives
After reading this chapter, you’ll be able to do the following:
• Describe the purpose of OpenGL, what it can and cannot do in
creating computer-generated images.
• Identify the common structure of an OpenGL application.
• Enumerate the shading stages that compose the OpenGL rendering
pipeline.
0 Цели Главы
После прочтения этой главы, вы сможете следующее:
• Дать характеристику OpenGL, что он может и не может сделать в создании !ПРОПУСК! изображений.
• Распознать общую структуру OpenGL приложений.
• Перечислить !шейдерные этапы!, из которых состоит !рендерный конвейер!.
Резюме
Пол:
существо
Родной язык:
русский
С нами:
с 10 августа 2014 г. (4452 дня) по приглашению notabenoid
Деятельность:
255 версий перевода с общим рейтингом 0
6 комментариев
Написать vk955 личное сообщение