A 3D content display method, device, equipment, storage medium and product
By creating a combined layout of custom UI controls and native UI controls within the graphical user interface framework, the visual disconnect between the 3D rendering area and 2D controls is resolved, achieving a natural integration and hierarchical coordination between 3D content and the native interface, thus enhancing the user interaction experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YOU SAN DI TECHNOLOGY (SHANGHAI) CO LTD
- Filing Date
- 2026-03-26
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, there is a visual disconnect between the 3D rendering area and the 2D controls, and the 3D content cannot be naturally integrated into the system's view hierarchy, resulting in an inconsistent user interaction experience.
Custom UI controls are created based on native UI controls within the graphical user interface framework. These custom UI controls are then combined and laid out with native UI controls to form a unified interactive interface. The custom UI controls are associated with independent 3D content rendering carriers. Touch event callback functions are parsed into 3D content interaction instructions, scene state data is updated, and rendering instructions are generated. Real-time rendering is then performed through the display system.
It achieves a natural integration and hierarchical coordination between 3D content and native interface at the display level, eliminating the sense of visual disjointness and providing users with a unified visual experience.
Smart Images

Figure CN122308829A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, and in particular to a 3D content display method, apparatus, device, storage medium, and product. Background Technology
[0002] With the continuous improvement of computing power in mobile terminal hardware, native applications (Apps) have a large amount of redundant computing power under the traditional two-dimensional (2D) user interface (UI) logic. In order to efficiently utilize this redundant computing power and improve the visual performance of applications, introducing three-dimensional (3D) effects into applications has become an important technological development direction. By introducing 3D effects, the presentation dimension of applications can be extended from the 2D plane to the 3D solid space. Specifically, this includes real-time rendering of 3D models, construction of three-dimensional layers based on spatial coordinate systems, simulation of lighting and shadow effects based on real physical laws, and 3D restoration of material textures, which significantly enriches the visual presentation layers and user interaction dimensions, and fully releases the application value of redundant computing power.
[0003] While standalone 3D rendering technology can provide rich visual effects and immersive interactive experiences, it typically runs in a separate rendering window, creating a disconnect with native 2D UI systems. In existing technologies, 3D content is often presented as a separate window or overlay, making seamless integration and coordinated display with native 2D UI controls difficult. For example, in applications that need to display both 3D models and 2D user interfaces simultaneously, there is often a visual disconnect between the 3D rendering area and 2D controls, and the 3D content cannot naturally integrate into the system's view hierarchy, resulting in a disjointed user experience. Summary of the Invention
[0004] This invention provides a 3D content display method, apparatus, device, storage medium, and product to solve the problem that there is often a visual disconnect between the 3D rendering area and 2D controls, and that 3D content cannot be naturally integrated into the system's view hierarchy, resulting in an inconsistent user interaction experience.
[0005] In a first aspect, embodiments of the present invention provide a 3D content display method, including: Custom interface controls are created based on native interface controls within a graphical user interface framework, and these custom interface controls are combined and laid out with native interface controls to form a fusion interactive interface; wherein, the custom interface controls are associated with independent 3D content rendering carriers. In response to the touch event callback function associated with the custom interface control, the touch event input to the integrated interactive interface is parsed into 3D content interaction instructions; The scene state data of the 3D content is updated according to the 3D content interaction instructions. A rendering instruction is generated according to the updated scene state data and the preset 3D content parameters. The 3D content is then rendered in real time based on the rendering instruction and the 3D content rendering carrier. The rendered 3D content is displayed through a display system.
[0006] Secondly, embodiments of the present invention provide a 3D content display device, including... The interactive interface generation module is used to create custom interface controls based on native interface controls within a graphical user interface framework, and to combine and layout the custom interface controls with native interface controls to form a fusion interactive interface; wherein, the custom interface controls are associated with independent 3D content rendering carriers. The touch event parsing module is used to respond to the touch event callback function associated with the custom interface control and parse the touch events input to the integrated interactive interface into 3D content interaction instructions; The rendering module is used to update the scene state data of the 3D content according to the 3D content interaction instructions, generate rendering instructions according to the updated scene state data and preset 3D content parameters, and perform real-time rendering of the 3D content based on the rendering instructions and the 3D content rendering carrier. The display module is used to display rendered 3D content through the display system.
[0007] Thirdly, embodiments of the present invention provide an electronic device, the electronic device comprising: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, which is then executed by the at least one processor to enable the at least one processor to perform the 3D content display method according to any embodiment of the present invention.
[0008] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the 3D content display method described in any embodiment of the present invention.
[0009] Fifthly, embodiments of the present invention provide a computer program product including a computer program, which, when executed by a processor, implements the 3D content display method described in any embodiment of the present invention.
[0010] The technical solution of this invention involves creating custom interface controls based on native interface controls within a graphical user interface framework, and combining these custom controls with native interface controls to form a fusion interactive interface. Each custom interface control is associated with an independent 3D content rendering carrier. Responding to the touch event callback function associated with the custom interface control, touch events input to the fusion interactive interface are parsed into 3D content interaction commands. The scene state data of the 3D content is updated according to the 3D content interaction commands. Rendering commands are generated based on the updated scene state data and preset 3D content parameters, and the 3D content is rendered in real-time based on the rendering commands and the 3D content rendering carrier. The rendered 3D content is then displayed through a display system. By creating custom interface controls based on native interface controls and combining them with native interface controls, 3D content can be integrated into the system's view hierarchy in the form of native controls. Compared to existing technologies where 3D content is presented in a separate window or as a full-screen overlay, resulting in a visual disconnect from the native UI, this invention achieves a natural integration and hierarchical coordination of 3D content and the native interface at the display level, eliminating the visual disconnect and providing users with a unified visual experience.
[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 A flowchart of a 3D content display method provided in Embodiment 1 of the present invention; Figure 2 This is a flowchart of a 3D content display method provided in Embodiment 2 of the present invention; Figure 3 This is a schematic diagram of the structure of a 3D content display device provided in Embodiment 3 of the present invention; Figure 4 A schematic diagram of the structure of an electronic device for implementing the 3D content display method of this invention. Detailed Implementation
[0014] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention 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 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.
[0016] Example 1 Figure 1 This is a flowchart of a 3D content display method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where 3D content is displayed on a user interface. The method can be executed by a 3D content display device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes: S110. Create custom interface controls based on native interface controls within the graphical user interface framework, and combine and layout the custom interface controls with native interface controls to form a fused interactive interface; wherein, the custom interface controls are associated with independent 3D content rendering carriers.
[0017] A graphical user interface (GUI) framework is a toolset and specification for building GUIs. It provides a series of pre-built components and functions to help developers create the visual parts of an application (such as windows, buttons, menus, etc.) and the user interaction logic with these elements. In this embodiment, the GUI framework can be the OpenHarmonyArkUI framework. Native UI controls refer to user interface elements that are directly provided, created, and managed by the underlying native platform of the operating system or application framework. The XComponent control under the OpenHarmonyArkUI framework is specifically used as a native UI control to carry native content.
[0018] Custom UI controls can be considered as UI controls with special functions that developers create based on the mechanisms provided by existing frameworks, or on native UI controls in the graphical user interface framework (such as the XComponent control in the OpenHarmony ArkUI framework), according to their own business needs and after encapsulation.
[0019] In this embodiment, the custom interface control has the following characteristics: (1) It inherits the characteristics of native UI controls in appearance and behavior, and can receive and process all event types that native UI controls can receive; (2) An independent 3D content rendering carrier is associated internally to carry and display 3D content.
[0020] A 3D content rendering carrier refers to a low-level rendering object associated with a custom UI control, used to receive 3D graphics API drawing commands and output pixel data. In one specific embodiment, this 3D content rendering carrier is an OpenGLES-based rendering surface (EGLSurface) or an OpenGL Surface, bound to the native window handle (such as ANativeWindow) corresponding to the custom UI control. In other embodiments, the 3D content rendering carrier can also be a VkSurfaceKHR based on the Vulkan API, or an equivalent rendering surface based on other graphics APIs. Regardless of the underlying graphics API used, the core function of this carrier remains unchanged: to serve as the 3D content drawing target for the custom UI control, receive rendering commands, and ultimately output to the display device.
[0021] A converged interactive interface can be considered a unified interactive interface formed by combining and laying out custom UI controls and native UI controls according to application design requirements. In this interface, custom UI controls and native UI controls are visually coordinated and work together interactively. The 3D content displayed in the custom UI controls is naturally integrated with the surrounding native UI controls in terms of display hierarchy, forming a holistic interface without any visual disconnect.
[0022] In this embodiment, the graphical user interface framework can be the ArkUI framework of the OpenHarmony system, and the native interface controls can be XComponent controls. Multiple custom interface controls are created based on the XComponent controls, each corresponding to an independent 3D content rendering carrier. Then, according to the UI design requirements and functional scenarios of the target application, these custom interface controls are flexibly combined and laid out with the native ArkUI controls, embedding the custom interface controls into the native interface system to form a unified, integrated interactive interface.
[0023] It should be noted that custom UI controls inherit the characteristics of native UI controls, and can receive and process all event types that native UI controls can receive and process, so there is no difference in user experience compared to native UI controls.
[0024] S120, responding to the touch event callback function associated with the custom interface control, parses the touch events of the input integrated interactive interface into 3D content interaction instructions.
[0025] Touch event callback functions can be considered as event handling functions registered by custom UI controls to receive and process user touch input. When a user initiates a touch operation on the integrated interactive interface, the system calls this callback function to pass the original touch event to the application for processing. 3D content interaction commands can be considered as standardized operation commands generated after parsing user touch events, used to drive changes in objects or viewpoints in the 3D scene. These commands are the core link connecting user input and 3D scene response, transforming the original touch events into specific operations that the 3D rendering engine can recognize and execute.
[0026] In this embodiment, a touch event callback function, such as an XComponent / NativeWindow event callback function, is registered for each custom UI control to listen for and respond to core events, establishing an event communication link between the control and the engine. When responding to the touch event callback function associated with the custom UI control and receiving a touch event from the integrated interactive interface, the touch event is parsed into a 3D content interaction instruction.
[0027] S130. Update the scene state data of the 3D content according to the 3D content interaction instructions, generate rendering instructions according to the updated scene state data and preset 3D content parameters, and perform real-time rendering of the 3D content based on the rendering instructions and the 3D content rendering carrier.
[0028] In practical applications, a single user action may be parsed as a combination of multiple 3D content interaction commands. These commands are categorized by function, including but not limited to: viewpoint transformation commands, model transformation commands, and scene interaction commands. Viewpoint transformation commands change the user's perspective within the 3D scene, i.e., the position and orientation of the virtual camera; model transformation commands change the position, pose, and size of specific model objects within the 3D scene. Scene interaction commands trigger non-transformation operations within the 3D scene, including object selection, animation control, and state switching.
[0029] Rendering instructions can be considered a standardized set of commands that guide the rendering thread to perform specific drawing operations. Rendering instructions are a complete description of all visible elements and their attributes in a 3D scene. The rendering thread parses and executes these instructions to ultimately generate a displayable 2D image. Rendering instructions may include, for example, geometry drawing instructions, material and texture instructions, lighting and shadow instructions, transformation and matrix instructions, and rendering state instructions.
[0030] In this embodiment, different types of 3D content interaction commands can trigger different scene state data update operations. For example, based on the viewpoint transformation command, the position coordinates, orientation angle, or field of view parameters of the virtual camera can be updated; based on the model transformation command, the world matrix of the target 3D model can be updated, including the rotation matrix, translation matrix, and scaling matrix; based on the scene interaction command, the selection state, material parameters, animation playback progress, or physical simulation state of objects in the 3D scene can be updated.
[0031] The updated scene state data is a dynamically changing input, reflecting the impact of user interaction or animation systems on the 3D scene. Preset 3D content parameters, including but not limited to texture image resources and material presets, are relatively static inputs, defining the inherent properties of reusable resources in the 3D scene. The rendering instruction generator can combine and transform the dynamically changing updated scene state data and the relatively static preset 3D content parameters to generate a series of standardized rendering instructions. Then, based on each custom UI control associated with an independent 3D content rendering carrier, the abstract rendering instructions are converted into underlying graphics APIs, initiating the actual rendering and drawing to generate pixel data. Combining the dynamic scene state with static resource descriptions forms a standardized instruction format, driving the underlying graphics hardware to complete pixel generation. The final generated pixel data can be written to the rendering buffer associated with the custom UI control for subsequent reading and display by the display system.
[0032] In this embodiment, updating the scene state data directly affects the rendering result of the next frame, thereby achieving real-time linkage between user interaction and 3D content changes. By parsing user touch events into a variety of 3D content interaction commands, users can interact with 3D content in multiple dimensions and ways through natural gestures, significantly improving the immersiveness and intuitiveness of the user experience.
[0033] S140. Display the rendered 3D content through the display system.
[0034] In this embodiment, after rendering the 3D content is completed, the display system displays the rendered 3D content on the screen.
[0035] The technical solution of this invention involves creating custom interface controls based on native interface controls within a graphical user interface framework, and combining these custom controls with native interface controls to form a fusion interactive interface. Each custom interface control is associated with an independent 3D content rendering carrier. Responding to the touch event callback function associated with the custom interface control, touch events input to the fusion interactive interface are parsed into 3D content interaction commands. The scene state data of the 3D content is updated according to the 3D content interaction commands. Rendering commands are generated based on the updated scene state data and preset 3D content parameters, and the 3D content is rendered in real-time based on the rendering commands and the 3D content rendering carrier. The rendered 3D content is then displayed through a display system. By creating custom interface controls based on native interface controls and combining them with native interface controls, 3D content can be integrated into the system's view hierarchy in the form of native controls. Compared to existing technologies where 3D content is presented in a separate window or as a full-screen overlay, resulting in a visual disconnect from the native UI, this invention achieves a natural integration and hierarchical coordination of 3D content and the native interface at the display level, eliminating the visual disconnect and providing users with a unified visual experience.
[0036] Example 2 Figure 2 This is a flowchart of a 3D content display method provided in Embodiment 2 of the present invention. Based on the above embodiments, this embodiment further adds the following features: Before parsing the touch event input to the integrated interactive interface into a 3D content interaction instruction in response to the touch event callback function associated with the custom interface control, the method further includes: registering a touch event callback function and a lifecycle event callback function for the custom interface control; and performing full lifecycle management of the 3D content rendering carrier based on the lifecycle event callback function.
[0037] like Figure 2 As shown, the method includes: S210. Create custom interface controls based on native interface controls within the graphical user interface framework, and combine and layout the custom interface controls with native interface controls to form a fused interactive interface; wherein, the custom interface controls are associated with independent 3D content rendering carriers.
[0038] S220: Register touch event callback functions and lifecycle event callback functions for custom interface controls, and perform full lifecycle management of the 3D content rendering carrier based on the lifecycle event callback functions.
[0039] Among them, lifecycle event callback functions can be considered as a collection of event handling functions registered for custom UI controls to respond to and manage changes in the lifecycle of their associated 3D content rendering carriers. These callback functions are automatically invoked by the system at critical state transitions of the 3D content rendering carriers, enabling the application to promptly perceive and respond to changes in the underlying rendering resources, and perform corresponding initialization, update, and cleanup operations.
[0040] Optionally, the lifecycle event callback function includes: Create a callback function to receive and save the native window handle corresponding to the custom interface control, and use the native window handle as the core identifier to create the 3D content rendering carrier; The change callback function is used to update the associated parameters of the native window handle and trigger the reconstruction operation of the 3D content rendering carrier so that the 3D content rendering carrier can adapt to the updated associated parameters. The destruction callback function is used to remove the native window handle, destroy the 3D content rendering carrier associated with the native window handle, and release the associated hardware resources and memory space.
[0041] In this embodiment, necessary event callback functions are registered for the custom interface, including touch event callback functions and lifecycle event callback functions. Specifically, XComponent / NativeWindow event callback functions are registered for each custom interface control, explicitly listening to and responding to the following core events to establish an event communication link between the control and the engine: (1) Create callback function OnSurfaceCreated: A callback event triggered when the surface of the 3D content rendering carrier (such as OpenGL Surface) is created; (2) OnSurfaceChanged callback function: A callback event triggered when the surface size, format and other parameters of the 3D content rendering carrier (such as OpenGL Surface) change; (3) Destruction callback function OnSurfaceDestroyed: A callback event triggered when the surface of a 3D content rendering carrier (such as an OpenGL Surface) is destroyed; (4) Touch event callback function DispatchTouchEvent: Input event dispatch callback triggered when the user initiates a touch operation.
[0042] Among them, OnSurfaceCreated, OnSurfaceChanged, and OnSurfaceDestroyed are lifecycle event callback functions used to manage the entire lifecycle of the 3D content rendering carrier; DispatchTouchEvent is a touch event callback function.
[0043] In this embodiment, the 3D content rendering carrier is managed throughout its entire lifecycle based on registered lifecycle event callback functions. Specifically, for each custom UI control, in response to the creation callback function (OnSurfaceCreated), the engine's window management pool receives and saves the native window handle (such as ANativeWindow) corresponding to the current custom UI control, and uses this native window handle as the core identifier to create a 3D content rendering carrier (such as EGLSurface). In response to the change callback function (OnSurfaceChanged), the engine updates the associated parameters (such as size and format) of the corresponding native window handle in the window management pool, and triggers the reconstruction operation of the 3D content rendering carrier to adapt the 3D content rendering carrier to the updated associated parameters. In response to the destruction callback function (OnSurfaceDestroyed), the engine removes the corresponding native window handle from the window management pool, destroys the 3D content rendering carrier associated with the native window handle, and releases the associated hardware resources and memory space to avoid resource leaks.
[0044] S230, responding to the touch event callback function associated with the custom interface control, parses the touch events of the input integrated interactive interface into 3D content interaction instructions.
[0045] As an optional embodiment, the touch events input to the integrated interactive interface are parsed into 3D content interaction operation instructions, including: A1. The touch event callback function receives touch events input to the integrated interactive interface. When a user performs a touch operation on the integrated interactive interface, the system receives the raw touch event through the DispatchTouchEvent callback function registered for the custom interface control. This raw touch event includes information such as the coordinates (x, y) of the touch point, the type of touch action (e.g., press, move, release), the touch timestamp, and the touch point identifier.
[0046] A2. Filter and select the touch events to obtain target events related to 3D content interaction.
[0047] Specifically, upon receiving a raw touch event, the event handling module performs a filtering operation. First, the module determines whether the coordinates of the touch event fall within the display area of a custom UI control. If the touch event occurs within the custom UI control's area, it further determines whether the event is related to 3D content interaction. For example, touch events occurring in densely populated areas of 3D models are marked as related to 3D content interaction; touch events occurring in blank areas of the custom UI control may be filtered out. Through this filtering mechanism, target events related to 3D content interaction are obtained.
[0048] A3. Transform the target event into a unified, standardized input event within the engine and store it in the input event queue.
[0049] Specifically, the selected target events are transformed into a unified standardized input event format within the engine. The transformed standardized input events are then serialized and stored in the global input event queue, waiting for the rendering engine associated with the 3D content rendering carrier to read and consume the events.
[0050] A4. The rendering engine associated with the 3D content rendering carrier reads and parses standardized input events from the input event queue to obtain the corresponding 3D content interaction instructions.
[0051] Specifically, the rendering engine associated with the 3D content rendering carrier reads standardized input events from the input event queue and parses them according to the event type and parameters. After parsing, the rendering engine generates corresponding 3D content interaction instructions for use in subsequent scene state update steps.
[0052] S240. Update the scene state data of the 3D content according to the 3D content interaction instructions, generate rendering instructions according to the updated scene state data and preset 3D content parameters, and perform real-time rendering of the 3D content based on the rendering instructions and the 3D content rendering carrier.
[0053] As an optional embodiment, the step of generating rendering instructions based on updated scene state data and preset 3D content parameters, and performing real-time rendering of the 3D content based on the rendering instructions and the 3D content rendering carrier, includes: B1. The engine's main thread generates rendering instructions based on the updated scene state data and preset 3D content parameters, and then submits the rendering instructions to an independent rendering thread.
[0054] B2. After receiving the rendering instruction, the rendering thread calls the graphics API to render the 3D content in real time based on the 3D content rendering carrier, and writes the rendering result into the rendering buffer associated with the custom interface control.
[0055] In this embodiment, a dual-threaded architecture with separate engine main thread and independent rendering thread is used for real-time rendering of 3D content to optimize rendering performance and interactive response speed. Specifically, the engine main thread updates scene state data (such as camera position, model transformation matrix, material parameters, etc.) according to 3D content interaction instructions; generates standardized rendering instructions based on the updated scene state data and preset 3D content parameters (such as model geometry data, texture resources, shader programs, etc.); and submits the generated rendering instructions to the independent rendering thread through a thread-safe instruction queue.
[0056] A dedicated rendering thread is responsible for graphics rendering tasks. It continuously monitors the command queue to detect new rendering commands arriving; it retrieves the rendering commands from the queue, parses the command type and parameters; it calls the underlying graphics API to perform the actual rendering and drawing operations based on the 3D content rendering carrier, accurately reproducing the preset stereoscopic effects, lighting changes, and material textures; and it writes the rendering results to the rendering buffer associated with the custom UI controls. Throughout this process, the main thread is not blocked and can continue to respond to the user's next action, ensuring smooth interaction.
[0057] S250: Display the rendered 3D content through the display system.
[0058] As an optional embodiment, displaying the rendered 3D content through the display system includes: The rendering thread calls the buffer exchange interface to exchange the rendered 3D content in the rendering buffer with the display content in the display buffer; wherein, the exchange operation is executed synchronously with the refresh signal of the display system.
[0059] Specifically, after the rendering thread completes all drawing commands, the rendering buffer stores a complete frame of image. The rendering thread does not immediately perform buffer swapping but waits for the arrival of the next vertical sync signal. When the vertical sync signal arrives, the rendering thread calls a buffer swapping interface (such as the SwapBuffer interface), waits for all drawing commands from the current GPU to complete, ensuring the content in the rendering buffer is complete, swaps the memory pointers of the rendering buffer (back buffer) and the display buffer (foreground buffer), triggers a refresh of the display hardware, and displays the new foreground buffer content on the screen. The original foreground buffer becomes the new back buffer, ready for the next frame's rendering. After the swap is complete, the rendering thread begins rendering the next frame. Simultaneously, relying on the aforementioned integrated UI rendering architecture, it ensures that the rendered 3D content and native interface controls blend naturally and hierarchically at the display level, without any visual disconnect. Ultimately, it completes the entire process of merging 3D and 2D interface control display, achieving dual optimization of visual performance and interaction efficiency.
[0060] The technical solution of this invention involves creating custom interface controls based on native interface controls within a graphical user interface framework, and combining these custom interface controls with native interface controls to form a fusion interactive interface. Each custom interface control is associated with an independent 3D content rendering carrier. Touch event callback functions and lifecycle event callback functions are registered for the custom interface controls, and the 3D content rendering carrier undergoes full lifecycle management based on the lifecycle event callback functions. In response to the touch event callback functions associated with the custom interface controls, touch events input to the fusion interactive interface are parsed into 3D content interaction commands. Scene state data of the 3D content is updated according to the 3D content interaction commands. Rendering commands are generated based on the updated scene state data and preset 3D content parameters, and the 3D content is rendered in real-time based on the rendering commands and the 3D content rendering carrier. The rendered 3D content is then displayed through a display system.
[0061] By creating custom UI controls based on native UI controls and combining them with native UI controls in a layout, 3D content can be integrated into the system's view hierarchy as native controls. This achieves a natural fusion and hierarchical coordination between 3D content and the native interface at the display level, eliminating visual disjointness and providing users with a unified visual experience. Simultaneously, by registering lifecycle event callback functions for the custom UI controls, and using these callback functions to manage the entire lifecycle of the 3D content rendering carrier, it is ensured that the 3D content rendering carrier remains in the correct state throughout the entire usage process, resources are used efficiently, and system stability is guaranteed.
[0062] Example 3 Figure 3 This is a schematic diagram of the structure of a 3D content display device provided in Embodiment 3 of the present invention. Figure 3 As shown, the device includes: an interactive interface generation module 310, a touch event parsing module 320, a rendering module 330, and a display module 340; wherein: The interactive interface generation module 310 is used to create custom interface controls based on native interface controls in a graphical user interface framework, and to combine and lay out the custom interface controls with native interface controls to form a fused interactive interface; wherein, the custom interface controls are associated with independent 3D content rendering carriers. The touch event parsing module 320 is used to respond to the touch event callback function associated with the custom interface control and parse the touch event input to the integrated interactive interface into 3D content interaction instructions; The rendering module 330 is used to update the scene state data of the 3D content according to the 3D content interaction instructions, generate rendering instructions according to the updated scene state data and preset 3D content parameters, and perform real-time rendering of the 3D content based on the rendering instructions and the 3D content rendering carrier. Display module 340 is used to display rendered 3D content through a display system.
[0063] The technical solution of this invention involves creating custom interface controls based on native interface controls within a graphical user interface framework, and combining these custom controls with native interface controls to form a fusion interactive interface. Each custom interface control is associated with an independent 3D content rendering carrier. Responding to the touch event callback function associated with the custom interface control, touch events input to the fusion interactive interface are parsed into 3D content interaction commands. The scene state data of the 3D content is updated according to the 3D content interaction commands. Rendering commands are generated based on the updated scene state data and preset 3D content parameters, and the 3D content is rendered in real-time based on the rendering commands and the 3D content rendering carrier. The rendered 3D content is then displayed through a display system. By creating custom interface controls based on native interface controls and combining them with native interface controls, 3D content can be integrated into the system's view hierarchy in the form of native controls. Compared to existing technologies where 3D content is presented in a separate window or as a full-screen overlay, resulting in a visual disconnect from the native UI, this invention achieves a natural integration and hierarchical coordination of 3D content and the native interface at the display level, eliminating the visual disconnect and providing users with a unified visual experience.
[0064] Optionally, the touch event parsing module 320 is specifically used for: The touch event callback function receives touch events input to the integrated interactive interface. The touch events are filtered and selected to obtain target events related to 3D content interaction; The target event is transformed into a unified, standardized input event within the engine and stored in the input event queue; The rendering engine associated with the 3D content rendering carrier reads and parses standardized input events from the input event queue to obtain corresponding 3D content interaction instructions.
[0065] Optional, also includes: The rendering carrier management module is used to register touch event callback functions and lifecycle event callback functions for the custom interface control before parsing the touch events input to the integrated interactive interface into 3D content interaction instructions in response to the touch event callback functions associated with the custom interface control; and to perform full lifecycle management of the 3D content rendering carrier based on the lifecycle event callback functions.
[0066] Optionally, the lifecycle event callback function includes: Create a callback function to receive and save the native window handle corresponding to the custom interface control, and use the native window handle as the core identifier to create the 3D content rendering carrier; The change callback function is used to update the associated parameters of the native window handle and trigger the reconstruction operation of the 3D content rendering carrier so that the 3D content rendering carrier can adapt to the updated associated parameters. The destruction callback function is used to remove the native window handle, destroy the 3D content rendering carrier associated with the native window handle, and release the associated hardware resources and memory space.
[0067] Optionally, the rendering module 330 is specifically used for: The engine's main thread generates rendering instructions based on the updated scene state data and preset 3D content parameters, and then submits these rendering instructions to an independent rendering thread. Upon receiving the rendering instruction, the rendering thread calls the graphics API to render the 3D content in real time based on the 3D content rendering carrier, and writes the rendering result into the rendering buffer associated with the custom interface control.
[0068] Optionally, the display module 340 is specifically used for: The rendering thread calls the buffer exchange interface to exchange the rendered 3D content in the rendering buffer with the display content in the display buffer; wherein, the exchange operation is executed synchronously with the refresh signal of the display system.
[0069] The 3D content display device provided in the embodiments of the present invention can execute the 3D content display method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.
[0070] Example 4 Figure 4A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0071] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0072] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0073] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as 3D content display methods.
[0074] In some embodiments, the 3D content display method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the 3D content display method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the 3D content display method by any other suitable means (e.g., by means of firmware).
[0075] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include: implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0076] In some embodiments, the 3D content display method may be implemented as a computer program, which is inadvertently included in a computer program product. When executed by a processor, the computer program implements the 3D content display method of the present invention. The computer program product can be understood as a software product that primarily implements its solution through a computer program. The computer program used to implement the method of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer program causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer program may be executed entirely on a machine, partially on a machine, partially on a remote machine as a standalone software package, or entirely on a remote machine or server.
[0077] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0078] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0079] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0080] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0081] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0082] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A 3D content display method, characterized by, include: Custom interface controls are created based on native interface controls within a graphical user interface framework, and these custom interface controls are combined and laid out with native interface controls to form a fusion interactive interface; wherein, the custom interface controls are associated with independent 3D content rendering carriers. In response to the touch event callback function associated with the custom interface control, the touch event input to the integrated interactive interface is parsed into 3D content interaction instructions; The scene state data of the 3D content is updated according to the 3D content interaction instructions. A rendering instruction is generated according to the updated scene state data and the preset 3D content parameters. The 3D content is rendered in real time based on the rendering instruction and the 3D content rendering carrier. The rendered 3D content is displayed through a display system.
2. The method of claim 1, wherein, The touch events input to the integrated interactive interface are parsed into 3D content interaction operation instructions, including: The touch event callback function receives touch events input to the integrated interactive interface. The touch events are filtered and selected to obtain target events related to 3D content interaction; The target event is transformed into a unified, standardized input event within the engine and stored in the input event queue; The rendering engine associated with the 3D content rendering carrier reads and parses standardized input events from the input event queue to obtain corresponding 3D content interaction instructions.
3. The method according to claim 1, characterized in that, Before resolving the touch event input to the integrated interactive interface into 3D content interaction instructions in response to the touch event callback function associated with the custom interface control, the method further includes: Register touch event callback functions and lifecycle event callback functions for the custom interface control; The 3D content rendering carrier is managed throughout its entire lifecycle based on the lifecycle event callback function.
4. The method according to claim 3, characterized in that, The lifecycle event callback functions include: Create a callback function to receive and save the native window handle corresponding to the custom interface control, and use the native window handle as the core identifier to create the 3D content rendering carrier; The change callback function is used to update the associated parameters of the native window handle and trigger the reconstruction operation of the 3D content rendering carrier so that the 3D content rendering carrier can adapt to the updated associated parameters. The destruction callback function is used to remove the native window handle, destroy the 3D content rendering carrier associated with the native window handle, and release the associated hardware resources and memory space.
5. The method according to claim 1, characterized in that, The step of generating rendering instructions based on updated scene state data and preset 3D content parameters, and performing real-time rendering of the 3D content based on the rendering instructions and the 3D content rendering carrier, includes: The engine's main thread generates rendering instructions based on the updated scene state data and preset 3D content parameters, and then submits these rendering instructions to an independent rendering thread. Upon receiving the rendering instruction, the rendering thread calls the graphics API to render the 3D content in real time based on the 3D content rendering carrier, and writes the rendering result into the rendering buffer associated with the custom interface control.
6. The method according to claim 5, characterized in that, The process of displaying the rendered 3D content through a display system includes: The rendering thread calls the buffer exchange interface to exchange the rendered 3D content in the rendering buffer with the display content in the display buffer; wherein, the exchange operation is performed synchronously with the refresh signal of the display system.
7. A 3D content display device, characterized in that, include: The interactive interface generation module is used to create custom interface controls based on native interface controls within a graphical user interface framework, and to combine and layout the custom interface controls with native interface controls to form a fusion interactive interface; wherein, the custom interface controls are associated with independent 3D content rendering carriers. The touch event parsing module is used to respond to the touch event callback function associated with the custom interface control and parse the touch events input to the integrated interactive interface into 3D content interaction instructions; The rendering module is used to update the scene state data of the 3D content according to the 3D content interaction instructions, generate rendering instructions according to the updated scene state data and preset 3D content parameters, and perform real-time rendering of the 3D content based on the rendering instructions and the 3D content rendering carrier. The display module is used to display rendered 3D content through the display system.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the 3D content display method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the 3D content display method according to any one of claims 1-6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the 3D content display method according to any one of claims 1-6.