Rendering optimization method and device based on static drawing sequence reconstruction and medium
By reconstructing the static drawing sequence and optimizing the display list, a high-efficiency rendering execution queue is generated, which solves the problem of low efficiency caused by the disorder of the rendering queue, improves rendering efficiency and resource utilization, and enhances the graphics display effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-03
AI Technical Summary
In existing rendering methods, the disordered rendering execution queue leads to frequent state switching, resulting in low rendering efficiency. This is especially true in complex scenes where screen stuttering and frame rate drops occur, and there is a lack of optimization for frequently called items.
By reconstructing the static drawing sequence, a new rendering execution queue is generated using a three-level classification system, and a display list is used to optimize high-frequency call items, reducing state switching and resource waste.
Significantly improves rendering efficiency, reduces GPU state switching costs, increases resource utilization, avoids repeated parsing of drawing instructions, and enhances the smoothness of graphics display.
Smart Images

Figure CN121785785A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to graphics rendering technology, and more particularly to a rendering optimization method, device and medium based on static drawing sequence reconstruction. Background Technology
[0002] In computer graphics rendering, the static drawing sequence is a crucial foundation for graphics data presentation, and its execution efficiency directly impacts the smoothness of graphics display and the utilization of system resources. Currently, in mainstream rendering methods, the rendering execution queue is typically constructed sequentially according to the order in which drawing instructions are received, without effectively classifying the type, attributes, and other characteristics of the drawn primitives. This disordered queue construction method leads to frequent switching of rendering states by the graphics processing unit (GPU) during rendering execution, such as shader programs, texture parameters, and rendering modes. Each state switch incurs additional system overhead, reducing rendering efficiency. This problem is particularly pronounced in complex scenes with a large number and diverse types of drawn primitives, easily resulting in stuttering and frame rate drops.
[0003] In real-time rendering scenarios, existing rendering methods lack optimization mechanisms for frequently invoked items. When a certain type of drawing item is invoked a large number of times within a certain period of time, traditional methods will still repeatedly execute the complete drawing instruction process, including instruction parsing, data transmission, and state configuration. This results in the repeated execution of the same or similar drawing operations, causing a significant waste of computing resources and time, further exacerbating the problem of low rendering efficiency, and failing to meet the needs of graphics application scenarios with high real-time requirements. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a rendering optimization method based on static drawing sequence reconstruction, which addresses the shortcomings of the prior art.
[0005] The technical solution adopted by this invention to solve its technical problem is: a rendering optimization method based on static drawing sequence reconstruction, comprising the following steps: 1) Obtain the static drawing sequence to be rendered; 2) Parse the static drawing sequence and extract the attribute information of each drawing primitive; the attribute information includes: primitive type, shader type, texture type and rendering mode; 3) Classify the drawing primitives in the static drawing sequence and construct a new rendering execution queue based on the classification results; 4) Rendering is performed according to the new rendering execution queue.
[0006] According to the above scheme, the static drawing sequence in step 1) includes multiple drawing primitives and corresponding drawing instructions, including vertex data, color information, texture coordinates, and rendering state parameters.
[0007] According to the above scheme, in step 3), the classification adopts a three-level classification, as follows: The first level is classified by primitive type; the second level is classified by shader type based on primitive type classification; and the third level is classified by a combination of texture type and rendering mode based on shader type classification.
[0008] According to the above scheme, in step 3), a new rendering execution queue is constructed based on the classification results, as follows: Classify the drawing primitives in the static drawing sequence, and obtain the corresponding smallest classification unit after classification; The drawing instructions corresponding to the drawing primitives in each smallest category unit are arranged sequentially to form a new rendering execution queue.
[0009] According to the above scheme, in step 4), rendering is performed in an adaptive manner by displaying a list, based on the new rendering execution queue.
[0010] According to the above scheme, step 4) is as follows: 4.1) Configure an independent call counter for the set of drawing instructions corresponding to each rendered queue item (the smallest category unit after classification) after reconstruction; 4.2) Count of calls; During the rendering process, each time a rendering queue item is called, the corresponding call counter is incremented by 1; The counter is reset to 0 at the end of each preset time period; 4.3) When the call counter value of a queue item reaches or exceeds a preset threshold within a preset time period, the queue item is determined to be a high-frequency call item, and the high-frequency call item is reused by displaying a list.
[0011] According to the above scheme, in step 4.3), frequently called items are reused by displaying a list, as follows: 4.3.1) Creating a display list for frequently accessed items: Extract all drawing instructions and related parameters corresponding to the frequently called item, including: vertex data cache address, texture binding information, and shader uniform variable values; The display list creation function of the graphics rendering interface encapsulates the extracted drawing instructions and parameters into an independent display list and assigns a unique identifier to the display list. 4.3.2) Switch the execution mode of the frequently called item to display list call. When the queue item needs to be executed in the future, the original drawing instructions will no longer be parsed and executed repeatedly. Instead, the corresponding display list will be called directly through the display list identifier, and the GPU will quickly execute the drawing operations stored in the display list.
[0012] According to the above scheme, in step 4.3), when the number of calls to a frequently called item in the display list is lower than the call threshold for K consecutive preset time periods, the corresponding display list is released.
[0013] The beneficial effects of this invention are: 1. This invention designs a rendering optimization method based on static drawing sequence reconstruction, which classifies and analyzes static drawing targets, regenerates a new high-efficiency drawing queue, and the drawing primitives in the same segment of the queue have completely consistent rendering states. The GPU can continuously execute all drawing operations in that segment, which significantly reduces the GPU state switching cost and greatly improves rendering efficiency.
[0014] 2. By adaptively calling the display list mechanism, rendering efficiency is improved while GPU resource utilization is enhanced. This avoids rendering and drawing through the display list throughout the entire process, which would consume a large amount of GPU resources and affect the rendering efficiency of other drawing tasks. Attached Figure Description
[0015] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This is a flowchart of a method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the three-level classification of static drawing sequences according to an embodiment of the present invention.
[0016] Figure 3 This is a schematic diagram of the adaptive display list scheduling according to an embodiment of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0018] like Figure 1 As shown, a rendering optimization method based on static drawing sequence reconstruction includes the following steps: 1) Obtain the static drawing sequence to be rendered; A static drawing sequence contains multiple drawing primitives and corresponding drawing instructions, including vertex data, color information, texture coordinates, and rendering state parameters; 2) Parse the static drawing sequence and extract the attribute information of each drawing primitive; the attribute information includes: primitive type, shader type, texture type and rendering mode; 3) Classify the drawing primitives in the static drawing sequence and construct a new rendering execution queue based on the classification results; like Figure 2The classification adopts a three-level classification system, as follows: The first level is classified by primitive type; the second level is classified by shader type based on primitive type classification; and the third level is classified by a combination of texture type and rendering mode based on shader type classification.
[0019] The first level of classification is based on the type of graphic element, grouping graphic elements of the same type into the same category, including "point graphic elements", "line graphic elements", "triangle graphic elements", etc. The second level of classification further subdivides each primitive type category according to shader type, grouping drawing primitives that use the same shader program into the same subclass, such as "Triangle Primitive - Shader A Subclass" and "Triangle Primitive - Shader B Subclass". The third level of classification: Under each shader subclass, further subdivision is made according to the combination of texture type and rendering mode. Drawing primitives with the same texture type and rendering mode are grouped into the same smallest classification unit, such as: "Triangle Primitive - Shader A - 2D Texture - Fill Mode Subclass".
[0020] Classify the drawing primitives in the static drawing sequence, and obtain the corresponding smallest classification unit after classification; Drawing primitives within the same smallest classification unit have the same primitive type, shader type, texture type, and rendering mode. They can be executed continuously without state switching during rendering, significantly reducing the system overhead caused by state switching.
[0021] The drawing instructions corresponding to the drawing primitives in each smallest category unit are arranged sequentially to form a new rendering execution queue.
[0022] 4) Rendering is performed according to the new rendering execution queue, using an adaptive display list approach; such as... Figure 3 The details are as follows: 4.1) Configure an independent call counter for the set of drawing instructions corresponding to each rendered queue item after reconstruction; each rendered queue item corresponds to the smallest classification unit after classification; A call counter is used to count the number of times the queue item is called within a preset time period. The calls include actions that cause the queue item to execute, such as drawing requests triggered by external programs or redraw requests caused by user interaction. 4.2) Count of calls; During the rendering process, each time a rendering queue item is called, the corresponding call counter is incremented by 1; The counter is reset to 0 at the end of each preset time period; 4.3) When the call counter value of a queue item reaches or exceeds a preset threshold within a preset time period, the queue item is determined to be a high-frequency call item, and the high-frequency call item is reused by displaying a list; The threshold can be adjusted according to the actual application scenario. For example, the optimal threshold can be determined through experimental testing based on the rendering frame rate requirements and system resource usage. For instance, in human-computer interaction rendering scenarios such as vehicle systems, the threshold can be set to 10 times per second, and the call counter value of each queue item can be monitored in real time and compared with the preset threshold.
[0023] For frequently accessed items, reuse is achieved through an adaptive display list, as detailed below: 4.3.1) Creating a display list for frequently accessed items: Extract all drawing instructions and related parameters corresponding to the frequently called item, including: vertex data cache address, texture binding information, and shader uniform variable values; The display list creation function of the graphics rendering interface, such as the glNewList function in OpenGL, encapsulates the extracted drawing instructions and parameters into an independent display list and assigns a unique identifier to the display list; 4.3.2) Switch the execution mode of the frequently called item to display list call. When the queue item needs to be executed in the future, the original drawing instructions will no longer be parsed and executed repeatedly. Instead, the corresponding display list will be called directly through the display list identifier, and the GPU will quickly execute the drawing operations stored in the display list.
[0024] When the drawing instructions or parameters corresponding to a queue item in the rendering execution queue change (such as vertex data modification, texture replacement, etc.), the original display list is automatically destroyed, and a new display list is recreated based on the updated drawing instructions and parameters to ensure the accuracy of the display list content. When the number of calls to a queue item is lower than a preset threshold for several consecutive preset time periods, the corresponding display list is automatically released to reclaim system memory resources and avoid resource waste.
[0025] It should be understood that those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. A rendering optimization method based on static drawing sequence reconstruction, characterized in that, Includes the following steps: 1) Obtain the static drawing sequence to be rendered; 2) Parse the static drawing sequence and extract the attribute information of each drawing primitive; The attribute information includes: primitive type, shader type, texture type, and rendering mode; 3) Classify the drawing primitives in the static drawing sequence and construct a new rendering execution queue based on the classification results; 4) Rendering is performed according to the new rendering execution queue.
2. The rendering optimization method based on static drawing sequence reconstruction according to claim 1, characterized in that, The static drawing sequence in step 1) includes multiple drawing primitives and corresponding drawing instructions, including vertex data, color information, texture coordinates, and rendering state parameters.
3. The rendering optimization method based on static drawing sequence reconstruction according to claim 1, characterized in that, In step 3), the classification adopts a three-level classification, as follows: The first level is classified by primitive type; the second level is classified by shader type based on primitive type classification; and the third level is classified by a combination of texture type and rendering mode based on shader type classification.
4. The rendering optimization method based on static drawing sequence reconstruction according to claim 1, characterized in that, In step 3), a new rendering execution queue is constructed based on the classification results, as follows: Classify the drawing primitives in the static drawing sequence, and obtain the corresponding smallest classification unit after classification; The drawing instructions corresponding to the drawing primitives in each smallest category unit are arranged sequentially to form a new rendering execution queue.
5. The rendering optimization method based on static drawing sequence reconstruction according to claim 1, characterized in that, In step 4), rendering is performed according to the new rendering execution queue, using an adaptive display list.
6. The rendering optimization method based on static drawing sequence reconstruction according to claim 5, characterized in that, Step 4) is as follows: 4.1) Configure an independent call counter for the set of drawing instructions corresponding to each rendered queue item after reconstruction; 4.2) Count of calls: During the rendering process, each time a rendering queue item is called, the corresponding call counter value is incremented by 1. The count value is reset to 0 at the end of each preset time period; 4.3) When the call counter value of a queue item reaches or exceeds a preset threshold within a preset time period, the queue item is determined to be a high-frequency call item, and the high-frequency call item is reused by displaying a list.
7. The rendering optimization method based on static drawing sequence reconstruction according to claim 6, characterized in that, In step 4.3), frequently accessed items are reused by displaying a list, as follows: 4.3.1) Creating a display list for frequently accessed items: Extract all drawing instructions and related parameters corresponding to the frequently called item, including: vertex data cache address, texture binding information, and shader uniform variable values; The display list creation function of the graphics rendering interface encapsulates the extracted drawing instructions and parameters into an independent display list and assigns a unique identifier to the display list. 4.3.2) Switch the execution mode of the frequently called item to display list call. When the queue item needs to be executed in the future, the original drawing instructions will no longer be parsed and executed repeatedly. Instead, the corresponding display list will be called directly through the display list identifier, and the GPU will quickly execute the drawing operations stored in the display list.
8. The rendering optimization method based on static drawing sequence reconstruction according to claim 6, characterized in that, In step 4.3), when the number of calls to a frequently called item in the display list is lower than the call threshold for K consecutive preset time periods, the corresponding display list is released.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 8.