| Русский Русский | English English |
   
Главная Архив номеров
19 | 04 | 2024
10.14489/vkit.2014.08.pp.011-016

DOI: 10.14489/vkit.2014.08.pp.011-016

Шакаев В. Д., Шабалина О. А.
АБСТРАГИРОВАНИЕ НИЗКОУРОВНЕВЫХ API ПРИ СОЗДАНИИ КРОССПЛАТФОРМЕННЫХ ГРАФИЧЕСКИХ ПРИЛОЖЕНИЙ
(c. 11-16)

Аннотация. Рассмотрены проблемы разработки кроссплатформенных приложений компьютерной графики. Представлены техники объединения низкоуровневых графических API (Application Programming Interface), таких как OpenGL и Direct3D, под общим абстрактным интерфейсом для создания эффективных графических приложений. Предложена методология построения интерфейса, включающая рекомендации по выбору правильного уровня абстракции интерфейса и требования к нему. Рассмотрены некоторые проектные и технические решения по реализации грамотного интерфейса, соответствующего требованиям гибкости и функциональности, прозрачности и простоты использования, самодостаточности и производительности. В качестве примера грамотной реализации кроссплатформенного графического интерфейса на языке C/C++ рассмотрена библиотека bgfx. Даны описания архитектуры библиотеки и основные детали ее реализации, такие как техники построения эффективной абстракции над низкоуровневыми графическими API.

Ключевые слова: разработка видеоигр; кроссплатформенность; интерактивная компьютерная графика; низкоуровневый графический интерфейс.

 

Shakaev V. D., Shabalina О. А.
ABSTRACTING LOW-LEVEL APIS FOR CROSS-PLATFORM GRAPHICS APPLICATION DEVELOPMENT
(pp. 11-16)

Abstract. Nowadays, software portability is an important issue. Interactive graphics applications are no exception: currently, cross-platform videogames are some of the most profitable and successful software products. Modern real-time graphics is based on using specialized hardware. Low-level access to the graphics hardware is granted by graphics API (Application Programming Interface) such as OpenGL and Direct3D. This article discusses methods of abstracting low-level graphics APIs for creating portable graphics applications. Considera-tions for designing a practical API-agnostic graphics interface on top of low-level graphics APIs using the C/C++ programming language are outlined. Existing approaches to building a graphics abstraction layer are reviewed. Typical problems occurring in open-source graphics libraries are pointed out. Design solutions and implementation techniques for avoiding those problems are described. A methodology for building a viable graphics abstraction layer is proposed. Recommendations on choosing the right level of abstraction, designing a good public interface and implementing the graphics backend are presented. As a good example of a cross-API software abstraction layer the bgfx graphics library is shown. Its capabilities, high-level architecture and design choices along with several implementation details, in particular, the render state management and shader abstraction are described. Overall, bgfx is shown to be a compact and high-performance cross-platform graphics library making good use of efficient coding techniques and achieving optimal balance between feature set, flexibility, sim-plicity and performance. It is probably the only open-source submission-based renderer.

Keywords: Videogame development; Cross-platform; Interactive computer graphics; Low-level graphics application.

Рус

В. Д. Шакаев, О. А. Шабалина (Волгоградский государственный технический университет) E-mail: Этот e-mail адрес защищен от спам-ботов, для его просмотра у Вас должен быть включен Javascript  

Eng

V. D. Shakaev, О. А. Shabalina (Volgograd State Technical University) E-mail: Этот e-mail адрес защищен от спам-ботов, для его просмотра у Вас должен быть включен Javascript  

Рус

1. Sterna W. Porting Code between Direct3D9 and OpenGL 2.0 / GPU Pro : Advanced Rendering Techniques. A K Peters, Ltd., 2010. P. 529 – 540.
2. Koch D., Capens N. The ANGLE Project: Imple-menting OpenGL ES 2.0 on Direct3D / OpenGL Insights. A K Peters, Ltd. / CRC Press, 2012. P. 543 – 570.
3. Porting Source to Linux: Valve’s Lessons Learned. URL: https://developer.nvidia.com/sites/default/files/akamai/ gamedev/docs/Porting%20Source%20to%20Linux.pdf (дата обращения: 03.02.2014).
4. OGRE: офиц. сайт. URL: http://www.ogre3d.org/ (дата обращения: 03.02.2014).
5. XEngine: The Platform and API Independent 3D Engine. URL: http://xengine.sourceforge.net/ (дата обраще-ния: 03.02.2014).
6. Gfxapi Reference Documentation. URL: http://clb.de- mon.fi/gfxapi/reference.html (дата обращения: 03.02.2014).
7. Reinalter S. Visibility in a Real-World Cross-Platform Game Engine. URL: http://www.cg.tuwien.ac.at/research/ publications/2010/REINALTER_2010_VIS/REINALTER_ 2010_VIS-Thesis.pdf (дата обращения: 03.02.2014).
8. NVIDIA PerfHUD. URL: https://developer.nvidia. com/nvidia-perfhud (дата обращения: 03.02.2014).
9. Graphics Development / Advanced Micro Devices, Inc. URL: http://developer.amd.com/tools-and-sdks/graphics- development/ (дата обращения: 03.02.2014).
10. Cross-platform Rendering Library / GitHub URL: https://github.com/bkaradzic/bgfx (дата обращения: 03.02.2014).
11. Firaxis LORE. And other uses of D3D11. URL: http://developer.amd.com/wordpress/media/2012/10/Firaxis%20LORE.pps (дата обращения: 03.02.2014).
12. Persson E. Making it Large, Beautiful, Fast and Consistent – Lessons Learned Developing Just Cause 2 / GPU Pro : Advanced Rendering Techniques. A K Peters, Ltd., 2010. P. 571 – 596.
13. Cross Platform Shaders in 2012. URL: http://aras-p. info/blog/2012/10/01/cross-platform-shaders-in-2012/ (дата обращения: 03.02.2014).
14. Shakaev V., Shabalina O., Kamaev V. Interactive Graphics Applications Development: An Effect Framework for Directx 11 // World Applied Sciences Journal 24 (Infor-mation Technologies in Modern Industry, Education & Society). IDOSI Publications, 2013. P. 165 – 170.

Eng

1. Sterna W. (2010). Porting code between Direct3D9 and OpenGL 2.0. GPU PRO : Advanced rendering tech-niques. (pp. 529-540). A K Peters, Ltd.
2. Koch D., Capens N. (2012). The ANGLE Project: Implementing OpenGL ES 2.0 on Direct3D. OpenGL In-sights. (pp. 543 – 570). A K Peters, Ltd; CRC Press.
3. Porting Source to Linux: Valve’s Lessons Learned. Available at: https://developer.nvidia.com/sites/default/ files/akamai/gamedev/docs/Porting%20Source%20to%20Linux.pdf (Accessed: 03.02.2014).
4. OGRE: official site. Available at: http://www.ogre3d.org/ (Accessed: 03.02.2014).
5. XEngine: The Platform and API Independent 3D Engine. Available at: http://xengine.sourceforge.net/ (Ac-cessed: 03.02.2014).
6. Gfxapi Reference Documentation. Available at: http://clb.demon.fi/gfxapi/reference.html (Acces-sed: 03.02.2014).
7. Reinalter S. Visibility in a Real-World Cross-Platform Game Engine. Available at: http://www.cg.tuwien.ac.at/research/publications/2010/REINALTER_2010_VIS/REINALTER_2010_VIS-Thesis.pdf (Accessed: 03.02.2014).
8. NVIDIA PerfHUD. Available at: https://developer. nvidia.com/nvidia-perfhud (Accessed: 03.02.2014).
9. Graphics Development. Advanced Micro Devices, Inc. Available at: http://developer.amd.com/tools-and-sdks/graphics-development/ (Accessed: 03.02.2014).
10. Cross-platform Rendering Library. Available at: https://github.com/bkaradzic/bgfx (Accessed: 03.02.2014).
11. Firaxis LORE. And other uses of D3D11. Available at: http://developer.amd.com/wordpress/ media/2012/10/ Firaxis%20LORE.pps (Accessed: 03.02.2014).
12. Persson E. (2010). Making it Large, Beautiful, Fast and Consistent – Lessons Learned Developing Just Cause 2. GPU Pro : Advanced Rendering Techniques. (pp. 571-596). A K Peters, Ltd.
13. Cross Platform Shaders in 2012. Available at: http://aras-p.info/blog/2012/10/01/cross-platform-shaders-in-2012/ (Accessed: 03.02.2014).
14. Shakaev V., Shabalina O., Kamaev V. (2013). Inter-active graphics applications development: An effect frame-work for Directx 11. World Applied Sciences Journal 24 (Information Technologies in Modern Industry, Education & Society), IDOSI Publications, pp. 165-170.

Рус

Статью можно приобрести в электронном виде (PDF формат).

Стоимость статьи 250 руб. (в том числе НДС 18%). После оформления заказа, в течение нескольких дней, на указанный вами e-mail придут счет и квитанция для оплаты в банке.

После поступления денег на счет издательства, вам будет выслан электронный вариант статьи.

Для заказа статьи заполните форму:

{jform=1,doi=10.14489/vkit.2014.08.pp.011-016}

.

Eng

This article  is available in electronic format (PDF).

The cost of a single article is 250 rubles. (including VAT 18%). After you place an order within a few days, you will receive following documents to your specified e-mail: account on payment and receipt to pay in the bank.

After depositing your payment on our bank account we send you file of the article by e-mail.

To order articles please fill out the form below:

{jform=2,doi=10.14489/vkit.2014.08.pp.011-016}

 

 

 

 

 

.

.

 

 
Поиск
Баннер
Баннер
Rambler's Top100 Яндекс цитирования