- Game Programming Using Qt Beginner's Guide
- Witold Wysota Lorenz Haas
- 297字
- 2021-08-20 10:45:21
Chapter 5. Graphics with Qt
When it comes to graphics, we have so far been using only ready-made widgets for the user interface, which resulted in the crude approach of using buttons for a tic-tac-toe game. In this chapter, you will learn about much of what Qt has to offer with regard to custom graphics. This will let you not only create your own widgets, incorporating content that is entirely customized, but also integrate multimedia in your programs. You will also learn about employing your OpenGL skills to display fast 3D graphics. If you are not familiar with OpenGL, this chapter should give you a kick-start for further research in this topic. By the end of the chapter, you will be able to create 2D and 3D graphics for your games using classes offered by Qt and integrate them with the rest of the user interface.
When it comes to graphics, Qt splits this domain into two separate parts. One of them is raster graphics (used by widgets, for example). This part focuses on using high-level operations (such as drawing lines or filling rectangles) to manipulate colors of a grid of points that can be visualized on different devices, such as images or the display of your computer device. The other is vector graphics, which involves manipulating vertices, triangles, and textures. This is tailored for maximum speed of processing and display using hardware acceleration provided by modern graphics cards. Qt abstracts graphics by using the concept of a surface that it draws on. The surface (represented by the QSurface
class) can be of one of two types—RasterSurface
or OpenGLSurface
. The surface can be further customized using the QSurfaceFormat
class, but we will talk about that later as it is not important right now.
- UI設計基礎培訓教程
- Machine Learning with R Cookbook(Second Edition)
- Python Game Programming By Example
- 跟老齊學Python:輕松入門
- Getting Started with NativeScript
- Spring Boot企業級項目開發實戰
- 利用Python進行數據分析(原書第3版)
- Java零基礎實戰
- Web性能實戰
- Python預測分析與機器學習
- Applied Deep Learning with Python
- jQuery Mobile Web Development Essentials(Second Edition)
- 零基礎學SQL(升級版)
- JavaScript Unit Testing
- 透視C#核心技術:系統架構及移動端開發