Multi-window display method and device, equipment, medium and program product

By introducing a multi-threaded rendering and display mechanism into the multi-window display method, utilizing the main thread to generate a shared context and fence object, and having the filtering thread and rendering thread collaborate to process data, the inefficiency problem caused by single-threaded rendering is solved, and efficient multi-window display is achieved.

CN121479862APending Publication Date: 2026-02-06CHENGDU GONGDING TECHNOLOGY CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511665702.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-13
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

Existing multi-window display methods use single-threaded rendering, resulting in low display efficiency.

Method used

The main thread generates a shared context, a fence object, and a rendering thread and a filtering thread for each window. The filtering thread generates rendering model data according to the filtering instructions and passes it to the rendering thread. The rendering thread renders the image data according to the shared context and displays it.

Benefits of technology

It improves the efficiency of multi-window display by displaying images through multi-threaded collaboration, avoiding the inefficiency caused by single-threaded rendering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121479862A_ABST
    Figure CN121479862A_ABST
Patent Text Reader

Abstract

The invention provides a multi-window display method and device, equipment, a medium and a program product. In the method, a shared context, a fence object and a rendering thread, a screening thread and a rendering context of each window are generated through a main thread according to acquired multi-window display data, and then when it is determined that all screening threads are idle, a screening instruction is sent to the screening thread of each window at the same time. And the screening thread generates rendering model data of the window according to the screening instruction and transmits the rendering model data to a rendering thread of the window. And the rendering thread performs rendering according to the shared context, the rendering model data of the window and the rendering context to obtain image data of the window, and further displays an image of the window according to the fence object and the image data of the window. According to the scheme, the main thread generates the corresponding screening thread and rendering thread for each window, the screening threads and the rendering threads cooperatively display the images of the corresponding windows, multi-window display is carried out through multiple threads, and the display efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a multi-window display method, apparatus, device, medium, and program product. Background Technology

[0002] In the automotive field, it is often necessary to construct a simulation scenario containing 3D simulation models related to vehicles for vehicle design or testing. When viewing the simulation scenario, staff often require viewing different 3D simulation models or from different perspectives through multiple windows, necessitating a multi-window display system for the 3D simulation models.

[0003] In existing technologies, the method for displaying stereoscopic simulation models in multiple windows usually involves obtaining image data for each window through single-threaded rendering, and then displaying the model based on the image data.

[0004] In summary, existing multi-window display methods use single-threaded rendering, resulting in low display efficiency. Summary of the Invention

[0005] The multi-window display method, apparatus, device, medium, and program products provided in this application are used to solve the problem of low display efficiency caused by the use of single-threaded rendering in existing multi-window display methods.

[0006] In a first aspect, embodiments of this application provide a multi-window display method, including:

[0007] The main thread generates a shared context, a fence object, and a rendering thread, a filtering thread, and a rendering context for each window based on the acquired multi-window display data. The multi-window display data includes simulation scene data and the viewing angle of each window.

[0008] When the main thread determines that all filtering threads are idle, it simultaneously sends a filtering instruction to the filtering thread of each window. The filtering instruction includes the simulation scene data and the viewing angle of the window.

[0009] For each window, the window's filtering thread generates rendering model data for the window according to the filtering instructions and passes it to the window's rendering thread; the rendering model data includes the window's model to be rendered and the viewing angle;

[0010] For each window, the rendering thread of the window renders according to the shared context, the rendering model data of the window, and the rendering context to obtain the image data of the window;

[0011] For each window, the window's rendering thread displays the window's image based on the fence object and the window's image data.

[0012] In one possible implementation, the window's filtering thread generates rendering model data for the window according to filtering instructions and passes it to the window's rendering thread, including:

[0013] The window's filtering thread selects the model to be rendered from the simulation scene data based on the window's viewing angle.

[0014] The window's filtering thread generates the window's rendering model data based on the window's model to be rendered and the viewing angle.

[0015] The window's filtering thread passes the window's rendering model data to the window's rendering thread.

[0016] In one possible implementation, the window's filtering thread passes the window's rendering model data to the window's rendering thread, including:

[0017] The window's filtering thread stores the window's rendering model data into the window's double-buffered queue;

[0018] The rendering thread of the window retrieves the rendering model data of the window from the window's double-buffered queue.

[0019] In one possible implementation, the window's rendering thread performs rendering based on the shared context, the window's rendering model data, and the rendering context to obtain the window's image data, including:

[0020] The rendering thread of the window determines the rendering data identifier based on the model to be rendered in the window;

[0021] The rendering thread of the window obtains rendering data based on each rendering data identifier, the shared context, and the rendering context of the window;

[0022] The rendering thread of the window renders the image data of the window based on the viewing angle of the window, the model to be rendered, and the rendering data.

[0023] In one possible implementation, the multi-window display data further includes shared rendering data and window rendering data for each window;

[0024] The shared context includes the shared rendering data;

[0025] For each window, the rendering context of the window includes the window rendering data of the window;

[0026] The rendering thread of the window obtains rendering data based on each rendering data identifier, the shared context, and the rendering context of the window, including:

[0027] For each rendering data identifier, the rendering thread of the window determines whether the rendering data identifier belongs to the shared context;

[0028] If the rendering data identifier belongs to the shared context, then the sub-rendering data corresponding to the rendering data identifier is obtained from the shared context;

[0029] If the rendering data identifier does not belong to the shared context, then the sub-rendering data corresponding to the rendering data identifier is obtained from the rendering context of the window;

[0030] The rendering data is generated based on the sub-rendering data corresponding to each rendering data identifier.

[0031] In one possible implementation, the window's rendering thread displays an image of the window based on the fence object and the window's image data, including:

[0032] The rendering thread of the window calls the fence object to determine whether the fence has been released;

[0033] If the fence is released, the rendering thread of the window will wake up all rendering threads except the rendering thread of the window, and display the image of the window according to the image data of the window.

[0034] In one possible implementation, the method further includes:

[0035] If the fence is not released, the rendering thread of the window enters a waiting state;

[0036] When the rendering thread of the window is awakened, the image of the window is displayed according to the image data of the window.

[0037] Secondly, embodiments of this application provide a multi-window display device, including:

[0038] The generation module is used to generate a shared context, a fence object, and a rendering thread, a filtering thread, and a rendering context for each window based on the acquired multi-window display data through the main thread. The multi-window display data includes simulation scene data and the viewing angle of each window.

[0039] The transmission module is used to determine, through the main thread, that when all filtering threads are idle, simultaneously send filtering instructions to the filtering threads of each window. The filtering instructions include the simulation scene data and the viewing angle of the window.

[0040] The processing module is used to generate rendering model data for each window according to the filtering instructions through the window's filtering thread and pass it to the window's rendering thread; the rendering model data includes the window's model to be rendered and the viewing angle;

[0041] The rendering module is used for:

[0042] For each window, the rendering thread of the window performs rendering based on the shared context, the rendering model data of the window, and the rendering context to obtain the image data of the window;

[0043] For each window, the window's rendering thread displays the window's image based on the fence object and the window's image data.

[0044] Thirdly, embodiments of this application provide an electronic device, including:

[0045] Processor, memory, communication interface;

[0046] The memory is used to store the executable instructions of the processor;

[0047] The processor is configured to execute the multi-window display method according to any one of the first aspects by executing the executable instructions.

[0048] Fourthly, embodiments of this application provide a readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the multi-window display method described in any of the first aspects.

[0049] Fifthly, embodiments of this application provide a computer program product, including a computer program, which, when executed by a processor, is used to implement the multi-window display method described in any of the first aspects.

[0050] The multi-window display method, apparatus, device, medium, and program product provided in this application embodiment generate a shared context, a fence object, and a rendering thread, a filtering thread, and a rendering context for each window based on the acquired multi-window display data via a main thread. Then, when all filtering threads are determined to be idle, filtering instructions are simultaneously sent to the filtering threads of each window. The filtering thread generates the window's rendering model data according to the filtering instructions and passes it to the window's rendering thread. The rendering thread performs rendering based on the shared context, the window's rendering model data, and the rendering context to obtain the window's image data, and then displays the window's image based on the fence object and the window's image data. In this solution, the main thread generates corresponding filtering and rendering threads for each window, and the filtering and rendering threads cooperate to display the corresponding window's image. Multi-threaded multi-window display improves display efficiency. Attached Figure Description

[0051] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0052] Figure 1a A flowchart illustrating an embodiment of the multi-window display method provided in this application;

[0053] Figure 1b A diagram showing the correspondence between windows, rendering contexts, filtering threads, and rendering threads provided in this application;

[0054] Figure 1c The timing diagrams of the filtering thread and rendering thread provided in this application;

[0055] Figure 2 A flowchart illustrating Embodiment 2 of the multi-window display method provided in this application;

[0056] Figure 3 A flowchart illustrating Embodiment 3 of the multi-window display method provided in this application;

[0057] Figure 4 This is a schematic diagram of the structure of an embodiment of the multi-window display device provided in this application;

[0058] Figure 5 This is a schematic diagram of the structure of an electronic device provided in this application.

[0059] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0060] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0061] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0062] With the continuous development of technology, simulation scenarios can be constructed during vehicle design or testing. These scenarios contain 3D simulation models related to the vehicle. Within these simulation scenarios, staff can observe changes in the models. However, staff often require viewing different 3D simulation models or from different perspectives through multiple windows, necessitating multi-window display of the 3D simulation models.

[0063] In existing technologies, the method for displaying 3D simulation models in multiple windows typically involves rendering the image data for each window sequentially using a single thread, and then displaying the model based on that image data. This single-threaded rendering method results in low display efficiency.

[0064] To address the problems existing in the prior art, the inventors, during their research on multi-window display methods, discovered that multi-threading can be used for rendering and display to improve display efficiency. The main thread generates a shared context, a fence object, and a rendering thread, filtering thread, and rendering context for each window based on the acquired multi-window display data. Then, when all filtering threads are idle, filtering instructions are simultaneously sent to the filtering threads of each window. The filtering threads generate the window's rendering model data according to the filtering instructions and pass it to the window's rendering thread. The rendering threads perform rendering based on the shared context, the window's rendering model data, and the rendering context to obtain the window's image data, and then display the window's image based on the fence object and the window's image data. Based on the above inventive concept, the multi-window display scheme of this application was designed.

[0065] In this application, the device that runs the main thread, the filtering thread, and the rendering thread can be a computer, or it can be a server, a terminal device, etc. This application does not limit it. The following description uses a computer as an example.

[0066] The following provides examples illustrating the application scenarios of the multi-window display method provided in this application.

[0067] For example, in this application scenario, the staff creates a simulation scene on the computer. The simulation scene contains multiple vehicles. The staff needs to view the tires of the first vehicle through the first window and the second window. The first and second windows have different viewing angles. The staff can view the doors of the second vehicle through the third window.

[0068] Staff set up shared rendering data, as well as the viewing angle and window rendering data for each window. The computer can then obtain this data. In order to display multiple windows, it is also necessary to obtain simulation scene data.

[0069] The main thread in the computer generates a shared context, a fence object, and a rendering thread, a filtering thread, and a rendering context for each window based on the data displayed in multiple windows. Then, when it is determined that all filtering threads are idle, it sends filtering instructions to the filtering thread of each window simultaneously.

[0070] The filtering thread generates the rendering model data for the window based on the filtering instructions and passes it to the rendering thread of the window.

[0071] The rendering thread renders the window based on the shared context, the window's rendering model data, and the rendering context, obtaining the window's image data. Then, based on the fence object and the window's image data, it displays the window's image.

[0072] Each window's rendering thread simultaneously displays the window's image based on the window's image data, allowing staff to view the tires and doors through three windows.

[0073] It should be noted that the above scenario is only an example of an application scenario provided by the embodiments of this application. The embodiments of this application do not limit the actual form of the various devices included in the scenario. In the specific application of the solution, it can be set according to actual needs.

[0074] The technical solution of this application will now be described in detail through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0075] Figure 1a This is a flowchart illustrating a first embodiment of the multi-window display method provided in this application. This embodiment describes how the main thread generates rendering threads and filtering threads for each window, and how the rendering and filtering threads of each window display the image of that window. The method in this embodiment can be implemented through software, hardware, or a combination of both. Figure 1a As shown, this multi-window display method specifically includes the following steps:

[0076] S101: The main thread generates a shared context, a fence object, and a rendering thread, a filtering thread, and a rendering context for each window based on the acquired multi-window display data.

[0077] In order to display multiple windows, after the main thread obtains the multi-window display data, it generates a shared context, a fence object, and a rendering thread, a filtering thread, and a rendering context for each window based on the multi-window display data.

[0078] The multi-window display data includes shared rendering data, simulation scene data, and the viewing angle and window rendering data of each window.

[0079] The main thread can create a hidden global window and a corresponding blank first context, and then put the shared rendering data into the first context to obtain the shared context.

[0080] The main thread creates a rendering thread, a filtering thread, and a blank second context for each window. For each window, its rendering data is placed into its second context to obtain the window's rendering context. Then, a shared relationship is established between each window's rendering context and the shared context.

[0081] It should be noted that the shared rendering data in the shared context can be texture data, cache data, shaders, etc., and the window rendering data in the rendering context includes state data, vertex arrays, frame buffer data, etc. This application embodiment does not limit the shared rendering data and window rendering data, and can be determined according to the actual situation.

[0082] It's worth noting that the filtering thread for each window can be assigned to different Central Processing Unit (CPU) cores, and the rendering thread can be assigned to different Graphics Processing Unit (GPU) cores. Alternatively, the filtering and rendering threads for each window can be assigned to different CPU cores, or different GPU cores. Assigning the filtering and rendering threads to different cores improves overall performance and thus enhances display efficiency.

[0083] For example, Figure 1b The diagram showing the correspondence between windows, rendering contexts, filtering threads, and rendering threads provided for this application is as follows: Figure 1bAs shown, each window has a corresponding rendering context, filtering thread, and rendering thread. Window 1 corresponds to rendering context 1, filtering thread, and rendering thread 1; window 2 corresponds to rendering context 2, filtering thread, and rendering thread 2; and window 3 corresponds to rendering context 3, filtering thread, and rendering thread 3.

[0084] S102: When the main thread determines that all filtering threads are idle, it simultaneously sends filtering instructions to the filtering threads of each window.

[0085] In this step, after the main thread generates the shared context, the fence object, and the rendering thread, filtering thread, and rendering context for each window, it needs to determine whether all filtering threads are idle in order to decide when to begin displaying the image of the current frame. Once it is determined that all filtering threads are idle, filtering instructions are simultaneously sent to the filtering threads of each window so that they can begin working concurrently.

[0086] The filtering instructions sent to the filtering thread of a window include the simulation scene data and the viewing angle of that window.

[0087] Because the filtering threads enter a waiting state after generation and after passing the rendering model data to the rendering thread, the main thread can determine that all filtering threads are idle once it detects that all filtering threads are in a waiting state.

[0088] Before the main thread sends a filtering instruction to the filtering thread, it will wake up each filtering thread simultaneously so that the filtering thread can run and then send the filtering instruction.

[0089] S103: For each window, the window's filtering thread generates the window's rendering model data according to the filtering instructions and passes it to the window's rendering thread.

[0090] In this step, after the main thread sends a filtering instruction to the filtering thread of each window, the filtering thread of each window can receive the filtering instruction, and then the filtering thread generates the rendering model data of the window according to the filtering instruction and passes it to the rendering thread of the window.

[0091] The rendering model data includes the model to be rendered in the window and the viewing angle.

[0092] The filtering thread can determine the model to be rendered based on the viewing angle, and then pass the model to be rendered and the viewing angle as rendering model data to the rendering thread.

[0093] S104: For each window, the rendering thread of that window renders the image data of that window based on the shared context, the rendering model data of that window, and the rendering context.

[0094] In this step, after the filtering thread of each window sends the rendering model data to the rendering thread, the rendering thread can now receive the rendering model data and then perform rendering based on the shared context, the rendering model data of the window, and the rendering context to obtain the image data of the window.

[0095] The rendering thread obtains rendering data from the shared context and rendering context based on the model to be rendered, and then combines the viewing perspective and the model to be rendered to render the image data of the window.

[0096] S105: For each window, the rendering thread of that window displays the image of that window based on the fence object and the image data of that window.

[0097] In this step, after the rendering thread obtains the image data, in order to enable all rendering threads to display the image simultaneously, it is necessary to display the image of the window based on the fence object and the image data of the window.

[0098] Specifically, the rendering thread for this window calls the fence object to determine whether the fence has been released. The fence object contains a counter, initially set to the number of windows. Each time the fence object is called, the counter is decremented by one. When the counter reaches zero, the fence is released. Therefore, the rendering thread can call the fence object to determine if the fence has been released.

[0099] If the fence is released, it means that each rendering thread has generated image data and can generate images simultaneously. In order for other rendering threads to generate images, the rendering thread of this window will wake up all rendering threads except the rendering thread of this window, and will display the image of this window according to the image data of this window.

[0100] If the fence is not released, it indicates that a rendering thread has not yet generated image data and cannot generate an image simultaneously. The rendering thread for that window then enters a waiting state. When the rendering thread for that window is awakened, the image for that window is displayed based on its image data.

[0101] It should be noted that each rendering thread displays an image, thus completing the display of the current frame, which is the first frame. The display process of the second frame and subsequent frames can begin from step S102.

[0102] For example, Figure 1c The timing diagrams for the filtering thread and rendering thread provided in this application are as follows: Figure 1cAs shown in the diagram, the gray bars represent working periods. Each window's filtering thread starts working simultaneously after being woken up, and each window's rendering thread generates an image simultaneously when the fence is released. After a window's filtering thread receives the rendering model data, it passes it to the rendering thread for execution. By having the filtering threads start working simultaneously and the rendering threads generate images simultaneously, synchronized window refreshes are guaranteed.

[0103] The multi-window display method provided in this embodiment generates a shared context, a fence object, and a rendering thread, a filtering thread, and a rendering context for each window based on the acquired multi-window display data via the main thread. Then, when all filtering threads are determined to be idle, filtering instructions are simultaneously sent to the filtering threads of each window. The filtering threads generate the window's rendering model data according to the filtering instructions and pass it to the window's rendering thread. The rendering threads perform rendering based on the shared context, the window's rendering model data, and the rendering context to obtain the window's image data. Finally, based on the fence object and the window's image data, the window's image is displayed. In this solution, the main thread generates corresponding filtering and rendering threads for each window, and the filtering and rendering threads collaborate to display the corresponding window's image. This multi-threaded multi-window display improves display efficiency.

[0104] In addition, each rendering thread uses its own corresponding rendering context for rendering, which will not cause state conflicts.

[0105] Figure 2 This is a flowchart illustrating a second embodiment of the multi-window display method provided in this application. Based on the above embodiments, this application describes the process of the filtering thread generating rendering model data and passing it to the rendering thread. Figure 2 As shown, this multi-window display method specifically includes the following steps:

[0106] S201: The filtering thread of this window selects the model to be rendered from the simulation scene data based on the viewing angle of this window.

[0107] In this step, after receiving the filtering instruction, the filtering thread of the window needs to filter out the model to be rendered from the simulation scene data based on the viewing angle of the window in order to determine what model needs to be displayed in the window.

[0108] The observation perspective includes the observation point and the range of observation angles. The simulation scene data includes each model, as well as the model's position, orientation, etc. Therefore, the observation range can be generated based on the observation point and the range of observation angles, and then the model within the observation range can be determined from the simulation scene data to obtain the model to be rendered for that window.

[0109] S202: The filtering thread of this window generates the rendering model data of this window based on the model to be rendered and the viewing angle.

[0110] In this step, after the filtering thread obtains the model to be rendered, it combines the model to be rendered in the window with the viewing angle to obtain the rendering model data of the window.

[0111] S203: The filtering thread of this window passes the rendering model data of this window to the rendering thread of this window.

[0112] In this step, after the filtering thread generates the rendering model data, it passes the rendering model data of the window to the rendering thread of the window.

[0113] Specifically, the filtering thread of the window stores the rendering model data of the window into the double-buffered queue of the window; the rendering thread of the window retrieves the rendering model data of the window from the double-buffered queue of the window.

[0114] The multi-window display method provided in this embodiment saves computational load on the rendering thread and improves display efficiency by filtering models through a filtering thread. It also reduces data transmission time and improves display efficiency by using a double-buffered queue to transfer rendering model data. The double-buffered queue has two queues, allowing the filtering thread to store data and the rendering thread to retrieve data simultaneously, thus improving data transfer and display efficiency.

[0115] Figure 3 This is a flowchart illustrating a third embodiment of the multi-window display method provided in this application. Based on the above embodiments, this application describes how the rendering thread renders image data according to a shared context, rendering model data, and the rendering context. For example... Figure 3 As shown, this multi-window display method specifically includes the following steps:

[0116] S301: The rendering thread of this window determines the rendering data identifier based on the model to be rendered in this window.

[0117] In this step, after the rendering thread receives the rendering model data, it needs to determine the rendering data identifier based on the model to be rendered in the window in order to render it.

[0118] The model to be rendered includes a rendering data identifier, so it can be determined that the rendering data identifier can be obtained from the model to be rendered.

[0119] S302: The rendering thread of this window obtains rendering data based on each rendering data identifier, the shared context, and the rendering context of this window.

[0120] In this step, after the rendering thread obtains the rendering data identifier, it retrieves the rendering data based on each rendering data identifier, the shared context, and the rendering context of the window.

[0121] Specifically, the rendering thread of the window determines whether each rendering data identifier belongs to the shared context.

[0122] If the rendering data identifier belongs to a shared context, then the sub-rendering data corresponding to the rendering data identifier is obtained from the shared context.

[0123] If the rendering data identifier does not belong to the shared context, the sub-rendering data corresponding to the rendering data identifier is obtained from the rendering context of the window.

[0124] Render data is generated based on the sub-render data corresponding to each render data identifier. The render data includes the sub-render data corresponding to each render data identifier.

[0125] S303: The rendering thread of this window renders the image data of the window based on the viewing angle of the window, the model to be rendered, and the rendering data.

[0126] In this step, after the rendering thread obtains the rendering data, it renders the image data of the window based on the viewing angle of the window, the model to be rendered, and the rendering data.

[0127] The multi-window display method provided in this embodiment obtains sub-rendering data from a shared context and a rendering context through a rendering thread. Different rendering threads can obtain data from the shared context, which saves memory resources. The rendering thread obtains sub-rendering data from the corresponding rendering context, enabling lock-free access.

[0128] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.

[0129] Figure 4 This is a schematic diagram of the structure of an embodiment of the multi-window display device provided in this application; as shown below. Figure 4 As shown, the multi-window display device 40 includes:

[0130] The generation module 41 is used to generate a shared context, a fence object, and a rendering thread, a filtering thread, and a rendering context for each window based on the acquired multi-window display data through the main thread. The multi-window display data includes simulation scene data and the viewing angle of each window.

[0131] The transmission module 42 is used to send filtering instructions to the filtering thread of each window when the main thread determines that all filtering threads are idle. The filtering instructions include simulation scene data and the window's viewing angle.

[0132] Processing module 43 is used to generate rendering model data for each window according to the filtering instructions through the window's filtering thread and pass it to the window's rendering thread; the rendering model data includes the window's model to be rendered and the viewing angle.

[0133] Rendering module 44 is used for:

[0134] For each window, the window's rendering thread performs rendering based on the shared context, the window's rendering model data, and the rendering context to obtain the window's image data;

[0135] For each window, the window's image is displayed using the window's rendering thread, based on the fence object and the window's image data.

[0136] Furthermore, processing module 43 is specifically used for:

[0137] The window's filtering thread selects the window's model to be rendered from the simulation scene data based on the window's viewing angle.

[0138] The window's filtering thread generates rendering model data for the window based on the window's model to be rendered and the viewing angle.

[0139] The window's rendering model data is passed to the window's rendering thread through the window's filtering thread.

[0140] Furthermore, processing module 43 is specifically used for:

[0141] The window's rendering model data is stored in the window's double-buffered queue through the window's filtering thread;

[0142] The window's rendering thread retrieves the window's rendering model data from the window's double-buffered queue.

[0143] Furthermore, the rendering module 44 is specifically used for:

[0144] The rendering thread of the window determines the rendering data identifier based on the model to be rendered in the window.

[0145] The window's rendering thread obtains rendering data based on each rendering data identifier, the shared context, and the window's rendering context;

[0146] The window's rendering thread renders the image data of the window based on the window's viewing angle, the model to be rendered, and the rendering data.

[0147] Furthermore, multi-window display data also includes shared rendering data and window rendering data for each window;

[0148] Shared context includes shared rendering data;

[0149] For each window, the window's rendering context includes the window's rendering data;

[0150] Rendering module 44 is specifically used for:

[0151] For each rendering data identifier, determine whether the rendering data identifier belongs to the shared context through the window's rendering thread;

[0152] If the rendering data identifier belongs to the shared context, then the sub-rendering data corresponding to the rendering data identifier is obtained from the shared context;

[0153] If the rendering data identifier does not belong to the shared context, the sub-rendering data corresponding to the rendering data identifier is obtained from the window's rendering context;

[0154] Rendering data is generated based on the sub-rendering data corresponding to each rendering data identifier.

[0155] Furthermore, the rendering module 44 is specifically used for:

[0156] The fence object is called through the window's rendering thread to determine whether the fence has been released.

[0157] If the barrier is released, the window's rendering thread will wake up all rendering threads except the window's rendering thread, and display the window's image based on the window's image data.

[0158] Furthermore, the rendering module 44 is also used for:

[0159] If the fence is not released, the window's rendering thread enters a waiting state;

[0160] When the window's rendering thread is awakened, the window's image is displayed based on the window's image data.

[0161] The multi-window display device provided in this embodiment is used to execute the technical solutions in any of the foregoing method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.

[0162] Figure 5 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 5 As shown, the electronic device 50 includes:

[0163] Processor 51, memory 52, and communication interface 53;

[0164] Memory 52 is used to store executable instructions of processor 51;

[0165] The processor 51 is configured to execute the technical solutions in any of the foregoing method embodiments by executing executable instructions.

[0166] Optionally, the memory 52 can be either standalone or integrated with the processor 51.

[0167] Optionally, when the memory 52 is a device independent of the processor 51, the electronic device 50 may further include:

[0168] Bus 54, memory 52 and communication interface 53 are connected to processor 51 through bus 54 and complete communication with each other. Communication interface 53 is used to communicate with other devices.

[0169] Optionally, the communication interface 53 can be implemented using a transceiver. The communication interface is used to enable communication between the database access device and other devices (e.g., clients, read-write databases, and read-only databases). The memory may include random access memory (RAM) and may also include non-volatile memory, such as at least one disk drive.

[0170] Bus 54 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus.

[0171] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0172] The electronic device is used to execute the technical solutions in any of the foregoing method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.

[0173] This application also provides a readable storage medium storing a computer program thereon, which, when executed by a processor, implements the technical solutions provided in any of the foregoing method embodiments.

[0174] This application also provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the technical solutions provided in any of the foregoing method embodiments.

[0175] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0176] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A multi-window display method, characterized in that, include: The main thread generates a shared context, a fence object, and a rendering thread, a filtering thread, and a rendering context for each window based on the acquired multi-window display data. The multi-window display data includes simulation scene data and the viewing angle of each window. When the main thread determines that all filtering threads are idle, it simultaneously sends a filtering instruction to the filtering thread of each window. The filtering instruction includes the simulation scene data and the viewing angle of the window. For each window, the window's filtering thread generates the window's rendering model data according to the filtering instructions and passes it to the window's rendering thread; The rendering model data includes the model to be rendered in the window and the viewing angle; For each window, the rendering thread of the window renders according to the shared context, the rendering model data of the window, and the rendering context to obtain the image data of the window; For each window, the window's rendering thread displays the window's image based on the fence object and the window's image data.

2. The method according to claim 1, characterized in that, The window's filtering thread generates the window's rendering model data according to the filtering instructions and passes it to the window's rendering thread, including: The window's filtering thread selects the model to be rendered from the simulation scene data based on the window's viewing angle. The window's filtering thread generates the window's rendering model data based on the window's model to be rendered and the viewing angle. The window's filtering thread passes the window's rendering model data to the window's rendering thread.

3. The method according to claim 2, characterized in that, The filtering thread of the window passes the rendering model data of the window to the rendering thread of the window, including: The window's filtering thread stores the window's rendering model data into the window's double-buffered queue; The rendering thread of the window retrieves the rendering model data of the window from the window's double-buffered queue.

4. The method according to claim 1, characterized in that, The rendering thread of the window performs rendering based on the shared context, the window's rendering model data, and the rendering context to obtain the window's image data, including: The rendering thread of the window determines the rendering data identifier based on the model to be rendered in the window; The rendering thread of the window obtains rendering data based on each rendering data identifier, the shared context, and the rendering context of the window; The rendering thread of the window renders the image data of the window based on the viewing angle of the window, the model to be rendered, and the rendering data.

5. The method according to claim 4, characterized in that, The multi-window display data also includes shared rendering data and window rendering data for each window; The shared context includes the shared rendering data; For each window, the rendering context of the window includes the window rendering data of the window; The rendering thread of the window obtains rendering data based on each rendering data identifier, the shared context, and the rendering context of the window, including: For each rendering data identifier, the rendering thread of the window determines whether the rendering data identifier belongs to the shared context; If the rendering data identifier belongs to the shared context, then the sub-rendering data corresponding to the rendering data identifier is obtained from the shared context; If the rendering data identifier does not belong to the shared context, then the sub-rendering data corresponding to the rendering data identifier is obtained from the rendering context of the window; The rendering data is generated based on the sub-rendering data corresponding to each rendering data identifier.

6. The method according to claim 1, characterized in that, The rendering thread of the window displays the image of the window based on the fence object and the image data of the window, including: The rendering thread of the window calls the fence object to determine whether the fence has been released; If the fence is released, the rendering thread of the window will wake up all rendering threads except the rendering thread of the window, and display the image of the window according to the image data of the window.

7. The method according to claim 6, characterized in that, The method further includes: If the fence is not released, the rendering thread of the window enters a waiting state; When the rendering thread of the window is awakened, the image of the window is displayed according to the image data of the window.

8. A multi-window display device, characterized in that, include: The generation module is used to generate a shared context, a fence object, and a rendering thread, a filtering thread, and a rendering context for each window based on the acquired multi-window display data through the main thread. The multi-window display data includes simulation scene data and the viewing angle of each window. The transmission module is used to determine, through the main thread, when all filtering threads are idle, to simultaneously send filtering instructions to the filtering threads of each window. The filtering instructions include the simulation scene data and the viewing angle of the window. The processing module is used to generate rendering model data for each window according to the filtering instructions through the window's filtering thread and pass it to the window's rendering thread; the rendering model data includes the window's model to be rendered and the viewing angle; The rendering module is used for: For each window, the rendering thread of the window performs rendering based on the shared context, the rendering model data of the window, and the rendering context to obtain the image data of the window; For each window, the window's rendering thread displays the window's image based on the fence object and the window's image data.

9. An electronic device, characterized in that, include: Processor, memory, communication interface; The memory is used to store the executable instructions of the processor; The processor is configured to execute the multi-window display method according to any one of claims 1 to 7 by executing the executable instructions.

10. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the multi-window display method according to any one of claims 1 to 7.

11. A computer program product, characterized in that, Includes a computer program, which, when executed by a processor, is used to implement the multi-window display method according to any one of claims 1 to 7.