WO2023245494A1 - Method and apparatus for acquiring texture data from rendering engine, and electronic device - Google Patents

Method and apparatus for acquiring texture data from rendering engine, and electronic device Download PDF

Info

Publication number
WO2023245494A1
WO2023245494A1 PCT/CN2022/100445 CN2022100445W WO2023245494A1 WO 2023245494 A1 WO2023245494 A1 WO 2023245494A1 CN 2022100445 W CN2022100445 W CN 2022100445W WO 2023245494 A1 WO2023245494 A1 WO 2023245494A1
Authority
WO
WIPO (PCT)
Prior art keywords
opengl
thread
rendering engine
texture
data
Prior art date
Application number
PCT/CN2022/100445
Other languages
French (fr)
Chinese (zh)
Inventor
张峰
陈帅雷
刘宁
Original Assignee
云智联网络科技(北京)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 云智联网络科技(北京)有限公司 filed Critical 云智联网络科技(北京)有限公司
Priority to PCT/CN2022/100445 priority Critical patent/WO2023245494A1/en
Publication of WO2023245494A1 publication Critical patent/WO2023245494A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • the present application relates to the field of virtual live broadcast, specifically, to a method and device, electronic equipment and computer program for obtaining texture data from a rendering engine.
  • the anchor terminal uses a rendering engine to render, it often requires a large amount of memory and GPU computing.
  • This consumption of memory and GPU computing will cause Android terminals with lower configurations (for example, terminals with an Android operating system version lower than 8.0 or a terminal with less than 2G of memory) to become severely overheated, and even cause the live broadcast to freeze or crash.
  • the rendered data of the rendering engine is converted into a video stream through the anchor terminal (that is, a video stream is pushed on the anchor end), so that terminals with lower configurations (for example, terminals with Android operating system versions lower than 8.0) can use playback Video streaming can achieve better playback effects.
  • This application provides a method and device, electronic equipment and computer program for obtaining texture data from a rendering engine.
  • a method for obtaining texture data from a rendering engine is proposed.
  • the method is applied to a host terminal.
  • the host terminal includes a first OpenGL thread and a second OpenGL thread, and the first OpenGL thread is the
  • the OpenGL thread of the rendering engine the method includes monitoring whether the initialization of the rendering engine is completed in the first OpenGL thread; in response to the completion of the initialization of the rendering engine, obtaining the texture ID in the first OpenGL thread;
  • a callback function is used to obtain the texture ID.
  • obtaining the texture ID in the first OpenGL thread further includes obtaining, in the first OpenGL thread, attribute data of the image data corresponding to the texture ID.
  • the attribute data includes the width and height of the image data.
  • the method further includes obtaining a first drawing context in the first OpenGL thread in response to completion of initialization of the rendering engine.
  • the method further includes obtaining the drawing context of the first OpenGL thread in a second OpenGL thread.
  • the method further includes using the first OpenGL thread drawing context to create a second OpenGL thread in the second OpenGL thread.
  • the drawing context is used to create a second OpenGL thread in the second OpenGL thread.
  • the texture ID, the drawing context of the second OpenGL thread, and the attribute data of the image data are sent to the streaming unit.
  • the method is applied to Android systems.
  • a device for obtaining texture data from a rendering engine is proposed.
  • the device is applied to a host terminal.
  • the host terminal includes a first OpenGL thread and a second OpenGL thread, and the first OpenGL thread is the
  • the OpenGL thread of the rendering engine the device includes a monitoring unit for monitoring whether the initialization of the rendering engine is completed in the first OpenGL thread; a texture ID acquisition unit for responding to the completion of the initialization of the rendering engine.
  • a callback unit is used to obtain the texture ID in the second OpenGL thread using a callback function.
  • an electronic device including one or more processing units; a storage unit for storing one or more programs; when the one or more programs are processed by the one or more processing units Execution causes one or more processing units to implement the method as described in any of the previous embodiments.
  • a computer program including a computer program or an instruction.
  • the computer program or the instruction is executed by a processor, the method as described above is implemented.
  • the problem that the rendering engine is executing using the OpenGL thread is solved.
  • the problem of being unable to obtain the texture ID allows the anchor terminal to play the rendered data of the rendering engine in the form of a video.
  • FIG. 1 shows a flowchart 1000 of a method for obtaining texture data from a rendering engine according to an example embodiment of the present application.
  • FIG. 2 shows a flowchart 2000 of yet another method of obtaining texture data from a rendering engine according to an example embodiment of the present application.
  • Figure 3 shows a block diagram of a device for obtaining texture data from a rendering engine according to an example embodiment of the present application.
  • FIG. 4 shows an electronic device according to an example embodiment of the present application.
  • Example embodiments will now be described more fully with reference to the accompanying drawings.
  • Example embodiments may, however, be embodied in various forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concepts of the example embodiments. To those skilled in the art.
  • the same reference numerals in the drawings represent the same or similar parts, and thus their repeated description will be omitted.
  • the rendering engine is a game development engine that can be used to create real-time, visual 2D and 3D animations, games and other content. It is widely used in game development, virtual simulation, animation, education, architecture, movies and other industries.
  • OpenGL Open Graphics Library, referred to as Open Graphics Programming Interface
  • Open Graphics Programming Interface includes some functions for operating graphics and images, and standardizes the application programming interface for rendering 2D and 3D vector images.
  • the rendering engine uses OpenGL to perform rendering, it needs to use a drawing context, also called a state machine, to record the information and status required for OpenGL rendering.
  • a drawing context also called a state machine
  • the information that needs to be recorded includes the color currently used for drawing, whether there is lighting calculation, and the light source that is turned on.
  • a set of OpenGL state machines corresponds to a drawing context. If two windows correspond to two different drawing contexts, the two windows are in independent states and the drawing states will not affect each other.
  • OpenGL is a single-threaded working mode, and the drawing context of each OpenGL thread is a private variable of the OpenGL thread.
  • the drawing commands of each OpenGL thread can only act on its drawing context and cannot access the texture resources of other OpenGL threads.
  • the problem that the rendering engine is executing using the OpenGL thread is solved.
  • the problem of being unable to obtain the texture ID allows the anchor terminal to play the rendered data of the rendering engine in the form of video.
  • FIG. 1 shows a flowchart 1000 of a method for obtaining rendering data from a rendering engine according to an example embodiment of the present application.
  • a method of obtaining rendering data from a rendering engine according to an exemplary embodiment of the present application will be described in detail below based on FIG. 1 .
  • OpenGL is a single-threaded working mode.
  • the texture data of each OpenGL thread is a private variable of the OpenGL thread, and the texture resources of other OpenGL threads cannot be accessed.
  • the embodiment shown in Figure 1 is used to obtain the OpenGL thread of the rendering engine in the second OpenGL thread when the anchor terminal performs virtual live broadcast, that is, the rendering data in the first OpenGL thread, so that the anchor terminal can obtain the rendering data in the second OpenGL thread. Send the obtained rendering data to the streaming unit.
  • the second OpenGL thread is started in the anchor terminal, and the texture ID obtained in the first OpenGL thread is called back to The second OpenGL thread implements texture ID sharing.
  • step S101 the anchor terminal monitors whether the rendering engine initialization is completed in the first OpenGL thread.
  • the anchor terminal obtains the first OpenGL thread of the rendering engine. After the anchor terminal obtains the first OpenGL thread of the rendering engine, it uses the listening function in the first OpenGL thread of the rendering engine to monitor whether the initialization of the rendering engine is completed.
  • step S103 in response to completion of initialization of the rendering engine, the texture ID is obtained in the first OpenGL thread.
  • the texture ID is obtained using the drawing context. For example, obtain the drawing context in the first OpenGL thread, and use the drawing context to call the interface provided by the rendering engine to obtain the texture ID.
  • step S105 in the second OpenGL thread, a callback function is used to obtain the texture ID.
  • OpenGL is a single-threaded working mode
  • the drawing context of each OpenGL thread is a private variable of the OpenGL thread.
  • the drawing commands of each OpenGL thread can only act on its drawing context and cannot access the texture resources of other OpenGL threads.
  • the callback function In order to use the OpenGL thread of the rendering engine, that is, the texture ID in the first OpenGL thread, in step S105, in the second OpenGL thread, use the callback function to obtain the texture ID in the first OpenGL thread, thereby realizing the texture ID in different OpenGL threads. Data sharing of texture IDs.
  • the method shown in Figure 1 can be applied to the Android system.
  • the problem that the rendering engine uses the OpenGL thread is solved.
  • the problem of being unable to obtain the texture ID allows the anchor terminal to play the rendered data of the rendering engine in a virtual live broadcast.
  • FIG. 2 shows a flowchart 2000 of yet another method of obtaining rendering data from a rendering engine according to an example embodiment of the present application.
  • OpenGL operates in a single-threaded mode.
  • the texture data of each OpenGL thread is a private variable of the OpenGL thread, and the texture resources of other OpenGL threads cannot be accessed.
  • the second OpenGL thread is started in the anchor terminal, and by executing steps S201 to S211, not only the textures of the two OpenGL threads are realized Data is shared, and the rendered data of the rendering engine is converted into a video stream through the anchor terminal, so that terminals with lower configurations can realize virtual live broadcast by playing the video stream.
  • step S201 the anchor terminal monitors whether the rendering engine initialization is completed in the first OpenGL thread.
  • the anchor terminal obtains the first OpenGL thread of the rendering engine. After the anchor terminal obtains the first OpenGL thread of the rendering engine, it uses the listening function in the first OpenGL thread of the rendering engine to monitor whether the initialization of the rendering engine is completed.
  • step S203 after the rendering engine initialization is completed, the texture ID, attribute data of the image data, and drawing context are obtained in the first OpenGL thread.
  • Texture is often used to describe the details of a picture.
  • the texture ID is a pointer to the graphics data that needs to be rendered, and the texture ID is obtained from the pixels of the graphics data.
  • the attribute data of the image data obtained in step S203 is the characteristic data of the image data, for example, the width and height of the image data.
  • the rendering engine uses OpenGL to perform rendering, it needs to use the drawing context to record the information and status required for OpenGL rendering.
  • the information that needs to be recorded includes the color currently used for drawing, whether there is lighting calculation, and the light source that is turned on.
  • the anchor terminal monitors whether the rendering engine has completed initialization in the first OpenGL thread to obtain the drawing context after the rendering engine is initialized.
  • the drawing mechanism of OpenGL uses the OpenGL drawing context to determine the drawing results and sends the drawing results to the drawing context of the local window system.
  • OpenGL provides an application interface for operating the GPU.
  • OpenGL controls the running status of the graphics rendering pipeline state machine by sending relevant instructions to the GPU.
  • EGL Embedded Graphics Library, referred to as embedded graphics library
  • embedded graphics library provides an interface for communication between OpenGL and the local window system.
  • EGL14 when OpenGL needs to interact with the local window system, EGL14 can be used to communicate with the local window system.
  • the main function of EGL14 is to create a drawing context for OpenGL instructions, draw the target surface, configure frame buffer properties and submit drawing results, etc.
  • step S203 the anchor terminal obtains the drawing context EGLContext by calling the system function EGL14.eglGetCurrentContext() in the OpenGL thread of the rendering engine.
  • step S205 in the second OpenGL thread, the callback function is used to obtain the texture ID and attribute data of the image data.
  • OpenGL is a single-threaded working mode
  • the drawing context of each OpenGL thread is a private variable of the OpenGL thread.
  • the drawing commands of each OpenGL thread can only act on its drawing context and cannot access the texture resources of other OpenGL threads.
  • the callback function in order to use the OpenGL thread of the rendering engine, that is, the texture ID in the first OpenGL thread, in step S105, in the second OpenGL thread, use the callback function to obtain the texture ID and attribute data of the image data in the first OpenGL thread, and implement Sharing of texture data among different OpenGL threads.
  • step S207 in the second OpenGL thread, the drawing context of the first OpenGL thread is obtained.
  • the drawing context records the information and status required for OpenGL rendering. Therefore, in the second OpenGL, in order to send the rendering data in the first OpenGL to the push unit in the form of a push stream, it is necessary to obtain the drawing context in the first OpenGL thread. According to some embodiments, a post of EGL14 is used to obtain the drawing context in the first OpenGL thread.
  • step S209 in the second OpenGL thread, the drawing context of the second OpenGL thread is created using the drawing context of the first OpenGL thread.
  • the drawing context in the first OpenGL thread cannot be used directly in the second OpenGL thread. Therefore, in step S209, by reading the drawing context information in the first OpenGL thread, the drawing context in the second OpenGL thread is created.
  • the first OpenGL thread create an OpenGL display window of the second OpenGL thread, use the OpenGL display window to obtain the configuration information of the second OpenGL thread, and use the obtained drawing context of the first OpenGL thread and the OpenGL of the second OpenGL thread.
  • the display window and the configuration information of the second OpenGL thread create a drawing context for the second OpenGL thread.
  • step S211 in the second OpenGL thread, the texture ID, the drawing context of the second OpenGL thread, and the attribute data of the image data are sent to the streaming unit.
  • the streaming unit of the anchor terminal sends the rendering data and rendered image data to the stream pusher.
  • the stream pusher includes Tencent's TRTC, Zego, Agora, etc.
  • the streamer is used to encode image data into video and send it to the viewing end.
  • the method shown in Figure 2 can be applied to the Android system.
  • Figure 3 shows a block diagram of a device for obtaining rendering data from a rendering engine according to an example embodiment of the present application.
  • the device shown in Figure 3 is applied to the anchor terminal.
  • the anchor terminal includes a first OpenGL thread and a second OpenGL thread
  • the first OpenGL thread is an OpenGL thread of the rendering engine.
  • a device for obtaining rendering data from a rendering engine includes a listening unit 301 , a texture ID obtaining unit 303 and a callback unit 305 .
  • the listening unit 301 is used to monitor whether the rendering engine initialization is completed in the first OpenGL thread;
  • the texture ID acquisition unit 303 is used to respond to the completion of the rendering engine initialization and obtain the texture ID in the first OpenGL thread;
  • the callback unit 305 uses In the second OpenGL thread, use the callback function to obtain the texture ID.
  • the texture ID acquisition unit 303 is also used to acquire attribute data of the image data and the drawing context of the first OpenGL thread.
  • the callback unit 305 is also used to obtain attribute data of the image data in the first OpenG thread.
  • the device shown in Figure 3 further includes a drawing context unit, configured to obtain the drawing context in the first OpenGL thread, and use the obtained drawing context to create a drawing context of the second OpenGL thread.
  • a drawing context unit configured to obtain the drawing context in the first OpenGL thread, and use the obtained drawing context to create a drawing context of the second OpenGL thread.
  • the device shown in Figure 3 further includes a streaming unit for sending the texture ID, the drawing context of the second OpenGL thread and the attribute data of the image data to the streamer.
  • stream pushers include Tencent’s TRTC, Zego, and Agora. The streamer is used to encode image data into video and send it to the viewing end.
  • the device shown in Figure 3 is any electronic device used for the anchor terminal, such as a tablet, a mobile phone, etc.
  • FIG. 4 shows an electronic device according to an exemplary embodiment of the present application.
  • the electronic device 200 according to this embodiment of the present application is described below with reference to FIG. 4 .
  • the electronic device 200 shown in FIG. 4 is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.
  • electronic device 200 is embodied in the form of a general computing device.
  • the components of the electronic device 200 may include, but are not limited to: at least one processing unit 210, at least one storage unit 220, a bus 230 connecting different system components (including the storage unit 220 and the processing unit 210), a display unit 240, and the like.
  • the storage unit stores program code, and the program code can be executed by the processing unit 210, so that the processing unit 210 executes the methods described in this specification according to various exemplary embodiments of the present application.
  • the processing unit 210 may perform the method as shown in FIG. 1 .
  • the storage unit 220 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 2201 and/or a cache storage unit 2202, and may further include a read-only storage unit (ROM) 2203.
  • RAM random access storage unit
  • ROM read-only storage unit
  • Storage unit 220 may also include a program/utility 2204 having a set of (at least one) program modules 2205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples, or some combination, may include the implementation of a network environment.
  • program/utility 2204 having a set of (at least one) program modules 2205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples, or some combination, may include the implementation of a network environment.
  • Bus 230 may be a local area representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or using any of a variety of bus structures. bus.
  • Electronic device 200 may also communicate with one or more external devices 300 (e.g., keyboard, pointing device, Bluetooth device, etc.), may also communicate with one or more devices that enable a user to interact with electronic device 200, and/or with Any device that enables the electronic device 200 to communicate with one or more other computing devices (eg, router, modem, etc.). This communication may occur through input/output (I/O) interface 250.
  • the electronic device 200 may also communicate with one or more networks (eg, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 260.
  • Network adapter 260 may communicate with other modules of electronic device 200 via bus 230.
  • the technical solution according to the embodiment of the present application can be embodied in the form of a software product.
  • the software product can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network, including A plurality of instructions to cause a computing device (which may be a personal computer, a server, a network device, etc.) to execute the above method according to an embodiment of the present application.
  • a software product may take the form of one or more readable media in any combination.
  • the readable medium may be a readable signal medium or a readable storage medium.
  • the readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: electrical connection with one or more conductors, portable disk, hard disk, random access memory (RAM), read only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may include a data signal propagated in baseband or as part of a carrier wave carrying the readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above.
  • a readable storage medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transport the program for use by or in connection with an instruction execution system, apparatus, or device.
  • Program code contained on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
  • the program code for performing the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., as well as conventional procedural programming. Language—such as "C” or a similar programming language.
  • the program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server execute on.
  • the remote computing device may be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device, such as provided by an Internet service. (business comes via Internet connection).
  • LAN local area network
  • WAN wide area network
  • the computer-readable medium carries one or more programs. When the one or more programs are executed by a device, the computer-readable medium implements the aforementioned functions.
  • modules can be distributed in devices according to the description of the embodiments, or can be modified accordingly in one or more devices that are only different from this embodiment.
  • the modules of the above embodiments can be combined into one module, or further divided into multiple sub-modules.
  • a computer program including a computer program or instructions.
  • the above-described method can be performed.
  • the problem that the rendering engine is executing using the OpenGL thread is solved.
  • the problem of being unable to obtain the texture ID allows the anchor terminal to play the rendered data of the rendering engine in the form of video.

Abstract

Provided in the present application are a method and apparatus for acquiring texture data from a rendering engine, and an electronic device and a computer program. The method for acquiring texture data from a rendering engine is applied to a livestreaming terminal. The livestreaming terminal comprises a first OpenGL thread and a second OpenGL thread, wherein the first OpenGL thread is an OpenGL thread of a rendering engine. The method comprises: monitoring, in a first OpenGL thread, whether the initialization of a rendering engine is completed; in response to the initialization of the rendering engine being completed, acquiring a texture ID from the first OpenGL thread; and from a second OpenGL thread, acquiring the texture ID by using a callback function. According to some embodiments, the problem of it being impossible to acquire a texture ID when a rendering engine executes rendering by using an OpenGL thread is solved, such that a livestreaming terminal can play rendered data of the rendering engine by means of a video.

Description

从渲染引擎中获取纹理数据的方法及装置、电子设备Method, device and electronic device for obtaining texture data from rendering engine 技术领域Technical field
本申请涉及虚拟直播领域,具体而言,涉及一种从渲染引擎中获取纹理数据的方法及装置、电子设备和计算机程序。The present application relates to the field of virtual live broadcast, specifically, to a method and device, electronic equipment and computer program for obtaining texture data from a rendering engine.
背景技术Background technique
在虚拟直播过程中,主播终端利用渲染引擎进行渲染时,往往需要消耗大量的内存和GPU运算。这种对内存的消耗和GPU运算会导致配置较低的安卓终端(例如,安卓操作系统版本低于8.0或内存小于2G的终端)发热严重,甚至出现直播卡顿或崩溃。During the virtual live broadcast process, when the anchor terminal uses a rendering engine to render, it often requires a large amount of memory and GPU computing. This consumption of memory and GPU computing will cause Android terminals with lower configurations (for example, terminals with an Android operating system version lower than 8.0 or a terminal with less than 2G of memory) to become severely overheated, and even cause the live broadcast to freeze or crash.
目前,通过主播终端把渲染引擎的渲染后的数据转换为视频流(也即在主播端推送一路视频流),使得配置较低的终端(例如,安卓操作系统版本低于8.0的终端)利用播放视频流的方式可以达到较好的播放效果。Currently, the rendered data of the rendering engine is converted into a video stream through the anchor terminal (that is, a video stream is pushed on the anchor end), so that terminals with lower configurations (for example, terminals with Android operating system versions lower than 8.0) can use playback Video streaming can achieve better playback effects.
本发明人发现,渲染引擎在利用OpenGL线程执行渲染时,没有向外提供纹理数据的应用接口,因此,使得在一些平台(例如安卓平台)无法实现将渲染引擎的数据转换为视频流。The inventor found that when the rendering engine uses the OpenGL thread to perform rendering, there is no application interface for providing texture data to the outside. Therefore, it is impossible to convert the data of the rendering engine into a video stream on some platforms (such as the Android platform).
发明内容Contents of the invention
本申请提供了一种从渲染引擎中获取纹理数据的方法及装置、电子设备和计算机程序。This application provides a method and device, electronic equipment and computer program for obtaining texture data from a rendering engine.
根据本申请的一方面,提出一种从渲染引擎中获取纹理数据的方法,所述方法应用于主播终端,所述主播终端包括第一OpenGL线程和第二OpenGL线程,且第一OpenGL线程为所述渲染引擎的OpenGL线程,所述方法包括在所述第一OpenGL线程中监听渲染引擎初始化是否完成;响应于所述渲染引擎的初始化完成,在所述第一OpenGL线程中获取纹理ID;在所述第二OpenGL线程中,利用回调函数获取所述纹理ID。According to one aspect of the present application, a method for obtaining texture data from a rendering engine is proposed. The method is applied to a host terminal. The host terminal includes a first OpenGL thread and a second OpenGL thread, and the first OpenGL thread is the The OpenGL thread of the rendering engine, the method includes monitoring whether the initialization of the rendering engine is completed in the first OpenGL thread; in response to the completion of the initialization of the rendering engine, obtaining the texture ID in the first OpenGL thread; In the second OpenGL thread, a callback function is used to obtain the texture ID.
根据一些实施例,所述在所述第一OpenGL线程中获取纹理ID,还包括在所述第一OpenGL线程中获取与所述纹理ID对应的图像数据的属性数据。According to some embodiments, obtaining the texture ID in the first OpenGL thread further includes obtaining, in the first OpenGL thread, attribute data of the image data corresponding to the texture ID.
根据一些实施例,所述属性数据包括所述图像数据的宽和高。According to some embodiments, the attribute data includes the width and height of the image data.
根据一些实施例,所述方法还包括响应于所述渲染引擎的初始化完成,在所述第一OpenGL线程中获取第一绘制上下文。According to some embodiments, the method further includes obtaining a first drawing context in the first OpenGL thread in response to completion of initialization of the rendering engine.
根据一些实施例,在所述第一OpenGL线程中获取绘制上下文之后,所述方法还包括在第二OpenGL线程中获取所述第一OpenGL线程的绘制上下文。According to some embodiments, after obtaining the drawing context in the first OpenGL thread, the method further includes obtaining the drawing context of the first OpenGL thread in a second OpenGL thread.
根据一些实施例,在第二OpenGL线程中获取所述第一OpenGL线程绘制上下文之后,所述方法还包括在所述第二OpenGL线程中,利用所述第一OpenGL线程绘制上下文创建第二OpenGL线程的绘制上下文。According to some embodiments, after obtaining the first OpenGL thread drawing context in the second OpenGL thread, the method further includes using the first OpenGL thread drawing context to create a second OpenGL thread in the second OpenGL thread. The drawing context.
根据一些实施例,在所述第二OpenGL线程中,将所述纹理ID、第二OpenGL线程的绘制上下文、所述图像数据的属性数据发送给推流单元。According to some embodiments, in the second OpenGL thread, the texture ID, the drawing context of the second OpenGL thread, and the attribute data of the image data are sent to the streaming unit.
根据一些实施例,所述方法应用于安卓系统。According to some embodiments, the method is applied to Android systems.
根据本申请的一方面,提出一种从渲染引擎中获取纹理数据的装置,所述装置应用于主播终端,所述主播终端包括第一OpenGL线程和第二OpenGL线程,且第一OpenGL线程为所述渲染引擎的OpenGL线程,所述装置包括监听单元,用于在所述第一OpenGL线程中监听渲染引擎初始化是否完成;纹理ID获取单元,用于响应于所述渲染引擎的初始化完成,在所述第一OpenGL线程中获取纹理ID;回调单元,用于在所述第二OpenGL线程中,利用回调函数获取所述纹理ID。According to one aspect of the present application, a device for obtaining texture data from a rendering engine is proposed. The device is applied to a host terminal. The host terminal includes a first OpenGL thread and a second OpenGL thread, and the first OpenGL thread is the The OpenGL thread of the rendering engine, the device includes a monitoring unit for monitoring whether the initialization of the rendering engine is completed in the first OpenGL thread; a texture ID acquisition unit for responding to the completion of the initialization of the rendering engine. Obtain the texture ID in the first OpenGL thread; a callback unit is used to obtain the texture ID in the second OpenGL thread using a callback function.
根据本申请的一方面,提出一种电子设备,包括一个或多个处理单元;存储单元,用于存储一个或多个程序;当所述一个或多个程序被所述一个或多个处理单元执行,使得一个或多个处理单元实现如前任一所述的方法。According to one aspect of the present application, an electronic device is proposed, including one or more processing units; a storage unit for storing one or more programs; when the one or more programs are processed by the one or more processing units Execution causes one or more processing units to implement the method as described in any of the previous embodiments.
根据本申请的一方面,提出一种计算机程序,包括计算机程序或 指令,所述计算机程序或所述指令被处理器执行时实现权如前任一所述的方法。According to one aspect of the present application, a computer program is proposed, including a computer program or an instruction. When the computer program or the instruction is executed by a processor, the method as described above is implemented.
根据本申请的示例实施例,通过在渲染引擎的OpenGL线程中获取纹理ID,并利用回调函数将渲染引擎的OpenGL线程中的纹理ID发送给另一个OpenGL线程,解决了渲染引擎在利用OpenGL线程执行渲染时,无法获取纹理ID的问题,使得主播终端可以将渲染引擎的渲染后的数据能够以视频的方式播放。According to example embodiments of the present application, by obtaining the texture ID in the OpenGL thread of the rendering engine, and using the callback function to send the texture ID in the OpenGL thread of the rendering engine to another OpenGL thread, the problem that the rendering engine is executing using the OpenGL thread is solved. When rendering, the problem of being unable to obtain the texture ID allows the anchor terminal to play the rendered data of the rendering engine in the form of a video.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍。In order to explain the technical solutions in the embodiments of the present application more clearly, the drawings needed to be used in the description of the embodiments will be briefly introduced below.
图1示出根据本申请示例实施例的一种从渲染引擎中获取纹理数据的方法流程图1000。FIG. 1 shows a flowchart 1000 of a method for obtaining texture data from a rendering engine according to an example embodiment of the present application.
图2示出根据本申请示例实施例的又一种从渲染引擎中获取纹理数据的方法流程图2000。FIG. 2 shows a flowchart 2000 of yet another method of obtaining texture data from a rendering engine according to an example embodiment of the present application.
图3示出根据本申请示例实施例的一种从渲染引擎中获取纹理数据的装置框图。Figure 3 shows a block diagram of a device for obtaining texture data from a rendering engine according to an example embodiment of the present application.
图4示出根据本申请示例实施例的一种电子设备。FIG. 4 shows an electronic device according to an example embodiment of the present application.
具体实施方式Detailed ways
现在将参考附图更全面地描述示例实施例。然而,示例实施例能够以多种形式实施,且不应被理解为限于在此阐述的实施例;相反,提供这些实施例使得本申请将全面和完整,并将示例实施例的构思全面地传达给本领域的技术人员。在图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in various forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concepts of the example embodiments. To those skilled in the art. The same reference numerals in the drawings represent the same or similar parts, and thus their repeated description will be omitted.
所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施例中。在下面的描述中,提供许多具体细节从而给出对本公开的实施例的充分理解。然而,本领域技术人员将意识到,可以实践本公开的技术方案而没有这些特定细节中的一个或更多,或者可以采用其它的方式、组元、材料、装置或操作等。 在这些情况下,将不详细示出或描述公知结构、方法、装置、实现、材料或者操作。The described features, structures or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to provide a thorough understanding of embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of these specific details, or other manners, components, materials, devices, operations, etc. may be employed. In these cases, well-known structures, methods, devices, implementations, materials or operations will not be shown or described in detail.
附图中所示的流程图仅是示例性说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解,而有的操作/步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。The flowcharts shown in the drawings are only illustrative, and do not necessarily include all contents and operations/steps, nor must they be performed in the order described. For example, some operations/steps can be decomposed, and some operations/steps can be merged or partially merged, so the actual order of execution may change according to the actual situation.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。The terms "first", "second", etc. in the description and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than describing a specific sequence. Furthermore, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes Other steps or units inherent to such processes, methods, products or devices.
渲染引擎是一种游戏开发引擎,可用于创建能够创建实时、可视化的2D和3D动画、游戏等内容,被广泛应用于游戏开发、虚拟仿真、动漫、教育、建筑、电影等多个行业。The rendering engine is a game development engine that can be used to create real-time, visual 2D and 3D animations, games and other content. It is widely used in game development, virtual simulation, animation, education, architecture, movies and other industries.
OpenGL(Open Graphics Library,简称开放图形程序接口),包括一些操作图形、图像的函数,规范了用于渲染2D、3D矢量图像的应用程序编程接口。OpenGL (Open Graphics Library, referred to as Open Graphics Programming Interface), includes some functions for operating graphics and images, and standardizes the application programming interface for rendering 2D and 3D vector images.
渲染引擎在利用OpenGL执行渲染时,需要利用绘制上下文,也称为状态机,记录OpenGL渲染所需要的信息和状态。例如,需要记录的信息包括当前绘制使用的颜色、是否有光照计算以及开启的光源等。When the rendering engine uses OpenGL to perform rendering, it needs to use a drawing context, also called a state machine, to record the information and status required for OpenGL rendering. For example, the information that needs to be recorded includes the color currently used for drawing, whether there is lighting calculation, and the light source that is turned on.
OpenGL的一组状态机对应着一个绘制上下文。如果两个窗口分别对应两个不同的绘制上下文,则两个窗口彼此状态独立,绘制状态不会互相影响。OpenGL是单线程工作模式,每个OpenGL线程的绘制上下文为OpenGL线程的私有变量。每个OpenGL线程的绘制命令只能作用在其绘制上下文上,不能访问其他OpenGL线程的纹理资源。A set of OpenGL state machines corresponds to a drawing context. If two windows correspond to two different drawing contexts, the two windows are in independent states and the drawing states will not affect each other. OpenGL is a single-threaded working mode, and the drawing context of each OpenGL thread is a private variable of the OpenGL thread. The drawing commands of each OpenGL thread can only act on its drawing context and cannot access the texture resources of other OpenGL threads.
根据本申请的示例实施例,通过在渲染引擎的OpenGL线程中获 取纹理ID,并利用回调函数将渲染引擎的OpenGL线程中的纹理ID发送给另一个OpenGL线程,解决了渲染引擎在利用OpenGL线程执行渲染时,无法获取纹理ID的问题,使得主播终端可以将渲染引擎的渲染后的数据以视频的方式播放。According to example embodiments of the present application, by obtaining the texture ID in the OpenGL thread of the rendering engine, and using the callback function to send the texture ID in the OpenGL thread of the rendering engine to another OpenGL thread, the problem that the rendering engine is executing using the OpenGL thread is solved. During rendering, the problem of being unable to obtain the texture ID allows the anchor terminal to play the rendered data of the rendering engine in the form of video.
图1示出根据本申请示例实施例的一种从渲染引擎中获取渲染数据的方法流程图1000。FIG. 1 shows a flowchart 1000 of a method for obtaining rendering data from a rendering engine according to an example embodiment of the present application.
下面根据图1,对根据本申请示例实施例的一种从渲染引擎中获取渲染数据的方法进行详细说明。A method of obtaining rendering data from a rendering engine according to an exemplary embodiment of the present application will be described in detail below based on FIG. 1 .
OpenGL为单线程工作模式,每个OpenGL线程的纹理数据为OpenGL线程的私有变量,且不能访问其他OpenGL线程的纹理资源。图1所示的实施例用于在主播终端进行虚拟直播时,在第二OpenGL线程中获取渲染引擎的OpenGL线程,也即第一OpenGL线程中的渲染数据,以便主播终端在第二OpenGL线程中将获得的渲染数据发送给推流单元。为了能够获取渲染引擎的第一OpenGL线程中的纹理数据,根据本申请的实施例,在主播终端开启第二OpenGL线程,通过执行步骤S101~S105,将第一OpenGL线程中获取的纹理ID回调给第二OpenGL线程,实现了纹理ID的共享。OpenGL is a single-threaded working mode. The texture data of each OpenGL thread is a private variable of the OpenGL thread, and the texture resources of other OpenGL threads cannot be accessed. The embodiment shown in Figure 1 is used to obtain the OpenGL thread of the rendering engine in the second OpenGL thread when the anchor terminal performs virtual live broadcast, that is, the rendering data in the first OpenGL thread, so that the anchor terminal can obtain the rendering data in the second OpenGL thread. Send the obtained rendering data to the streaming unit. In order to obtain the texture data in the first OpenGL thread of the rendering engine, according to an embodiment of the present application, the second OpenGL thread is started in the anchor terminal, and the texture ID obtained in the first OpenGL thread is called back to The second OpenGL thread implements texture ID sharing.
在图1所示,在步骤S101,主播终端在第一OpenGL线程中监听渲染引擎初始化是否完成。As shown in Figure 1, in step S101, the anchor terminal monitors whether the rendering engine initialization is completed in the first OpenGL thread.
例如,在步骤S101,主播终端获取渲染引擎的第一OpenGL线程。主播终端获取渲染引擎的第一OpenGL线程之后,在渲染引擎的第一OpenGL线程中利用监听函数监听渲染引擎初始化是否完成。For example, in step S101, the anchor terminal obtains the first OpenGL thread of the rendering engine. After the anchor terminal obtains the first OpenGL thread of the rendering engine, it uses the listening function in the first OpenGL thread of the rendering engine to monitor whether the initialization of the rendering engine is completed.
在步骤S103,响应于渲染引擎的初始化完成,在第一OpenGL线程中获取纹理ID。In step S103, in response to completion of initialization of the rendering engine, the texture ID is obtained in the first OpenGL thread.
根据本申请的实施例,利用绘制上下文获取纹理ID。例如,在第一OpenGL线程中获取绘制上下文,利用绘制上下文调用渲染引擎 提供的接口得到纹理ID。According to an embodiment of the present application, the texture ID is obtained using the drawing context. For example, obtain the drawing context in the first OpenGL thread, and use the drawing context to call the interface provided by the rendering engine to obtain the texture ID.
在步骤S105,在第二OpenGL线程中,利用回调函数获取纹理ID。In step S105, in the second OpenGL thread, a callback function is used to obtain the texture ID.
如前所述,OpenGL是单线程工作模式,每个OpenGL线程的绘制上下文为OpenGL线程的私有变量。每个OpenGL线程的绘制命令只能作用在其绘制上下文上,不能访问其他OpenGL线程的纹理资源。为了使用渲染引擎的OpenGL线程,也即第一OpenGL线程中的纹理ID,在步骤S105,在第二OpenGL线程中,利用回调函数获取第一OpenGL线程中的纹理ID,实现了在不同OpenGL线程中纹理ID的数据共享。As mentioned before, OpenGL is a single-threaded working mode, and the drawing context of each OpenGL thread is a private variable of the OpenGL thread. The drawing commands of each OpenGL thread can only act on its drawing context and cannot access the texture resources of other OpenGL threads. In order to use the OpenGL thread of the rendering engine, that is, the texture ID in the first OpenGL thread, in step S105, in the second OpenGL thread, use the callback function to obtain the texture ID in the first OpenGL thread, thereby realizing the texture ID in different OpenGL threads. Data sharing of texture IDs.
作为一种选择,根据本申请的示例实施例,图1所示的方法可以应用于安卓系统。As an option, according to example embodiments of the present application, the method shown in Figure 1 can be applied to the Android system.
根据图1所示的实施例,通过在渲染引擎的OpenGL线程中获取纹理ID,并利用回调函数将渲染引擎的OpenGL线程中的纹理ID发送给另一个OpenGL线程,解决了渲染引擎在利用OpenGL线程执行渲染时,无法获取纹理ID的问题,使得主播终端可以将渲染引擎的渲染后的数据以虚拟直播的方式播放。According to the embodiment shown in Figure 1, by obtaining the texture ID in the OpenGL thread of the rendering engine, and using the callback function to send the texture ID in the OpenGL thread of the rendering engine to another OpenGL thread, the problem that the rendering engine uses the OpenGL thread is solved. When performing rendering, the problem of being unable to obtain the texture ID allows the anchor terminal to play the rendered data of the rendering engine in a virtual live broadcast.
图2示出根据本申请示例实施例的又一种从渲染引擎中获取渲染数据的方法流程图2000。FIG. 2 shows a flowchart 2000 of yet another method of obtaining rendering data from a rendering engine according to an example embodiment of the present application.
如前所述,OpenGL为单线程工作模式,每个OpenGL线程的纹理数据为OpenGL线程的私有变量,且不能访问其他OpenGL线程的纹理资源。As mentioned before, OpenGL operates in a single-threaded mode. The texture data of each OpenGL thread is a private variable of the OpenGL thread, and the texture resources of other OpenGL threads cannot be accessed.
为了能够获取渲染引擎的第一OpenGL线程中的纹理数据,在图2所示的实施例中,在主播终端开启第二OpenGL线程,通过执行步骤S201~S211,不仅实现了两个OpenGL线程的纹理数据共享,且通过主播终端把渲染引擎的渲染后的数据转换为视频流,使得配置较低的终端利用播放视频流的方式实现虚拟直播。In order to obtain the texture data in the first OpenGL thread of the rendering engine, in the embodiment shown in Figure 2, the second OpenGL thread is started in the anchor terminal, and by executing steps S201 to S211, not only the textures of the two OpenGL threads are realized Data is shared, and the rendered data of the rendering engine is converted into a video stream through the anchor terminal, so that terminals with lower configurations can realize virtual live broadcast by playing the video stream.
如图2所示,在步骤S201,主播终端在第一OpenGL线程中监听渲染引擎初始化是否完成。As shown in Figure 2, in step S201, the anchor terminal monitors whether the rendering engine initialization is completed in the first OpenGL thread.
例如,在步骤S201,主播终端获取渲染引擎的第一OpenGL线程。主播终端获取渲染引擎的第一OpenGL线程之后,在渲染引擎的第一OpenGL线程中利用监听函数监听渲染引擎初始化是否完成。For example, in step S201, the anchor terminal obtains the first OpenGL thread of the rendering engine. After the anchor terminal obtains the first OpenGL thread of the rendering engine, it uses the listening function in the first OpenGL thread of the rendering engine to monitor whether the initialization of the rendering engine is completed.
在步骤S203,在渲染引擎初始化完成后,在第一OpenGL线程中获取纹理ID、图像数据的属性数据及绘制上下文。In step S203, after the rendering engine initialization is completed, the texture ID, attribute data of the image data, and drawing context are obtained in the first OpenGL thread.
纹理常用来描述图片的细节,根据本申请的实施例,纹理ID为需要渲染的图形数据的指针,纹理ID通过图形数据的像素得到。Texture is often used to describe the details of a picture. According to the embodiment of the present application, the texture ID is a pointer to the graphics data that needs to be rendered, and the texture ID is obtained from the pixels of the graphics data.
根据一些实施例,在步骤S203中获取的图像数据的属性数据为图像数据的特征数据,例如,图像数据的宽和高。According to some embodiments, the attribute data of the image data obtained in step S203 is the characteristic data of the image data, for example, the width and height of the image data.
渲染引擎在利用OpenGL执行渲染时,需要利用绘制上下文记录OpenGL渲染所需要的信息和状态。例如,需要记录的信息包括当前绘制使用的颜色、是否有光照计算以及开启的光源等。When the rendering engine uses OpenGL to perform rendering, it needs to use the drawing context to record the information and status required for OpenGL rendering. For example, the information that needs to be recorded includes the color currently used for drawing, whether there is lighting calculation, and the light source that is turned on.
由于渲染引擎的渲染过程是在OpenGL线程中完成,因此,在执行步骤S203中,主播终端在第一OpenGL线程中监听渲染引擎是否完成初始化,以在渲染引擎初始化完成后获取绘制上下文。OpenGL的绘图机制为利用OpenGL的绘制上下文确定绘制结果,并把绘制结果发送给本地窗口系统的绘图上下文。OpenGL提供了操作GPU的应用接口,OpenGL通过向GPU发送相关指令,以控制图形渲染管线状态机的运行状态。EGL(Embedded Graphics Library,简称嵌入式图形库)提供了OpenGL和本地窗口系统之间通信的接口。Since the rendering process of the rendering engine is completed in the OpenGL thread, in step S203, the anchor terminal monitors whether the rendering engine has completed initialization in the first OpenGL thread to obtain the drawing context after the rendering engine is initialized. The drawing mechanism of OpenGL uses the OpenGL drawing context to determine the drawing results and sends the drawing results to the drawing context of the local window system. OpenGL provides an application interface for operating the GPU. OpenGL controls the running status of the graphics rendering pipeline state machine by sending relevant instructions to the GPU. EGL (Embedded Graphics Library, referred to as embedded graphics library) provides an interface for communication between OpenGL and the local window system.
以EGL14为例,当OpenGL需要与本地窗口系统进行交互时,可利用EGL14与本地窗口系统进行通信。EGL14的主要作用是为OpenGL指令创建绘制上下文、绘制目标表面、配置帧缓冲属性及提交绘制结果等。Taking EGL14 as an example, when OpenGL needs to interact with the local window system, EGL14 can be used to communicate with the local window system. The main function of EGL14 is to create a drawing context for OpenGL instructions, draw the target surface, configure frame buffer properties and submit drawing results, etc.
在步骤S203中,主播终端在渲染引擎的OpenGL线程中通过调用系统函数EGL14.eglGetCurrentContext()获取绘制上下文EGLContext。In step S203, the anchor terminal obtains the drawing context EGLContext by calling the system function EGL14.eglGetCurrentContext() in the OpenGL thread of the rendering engine.
在步骤S205,在第二OpenGL线程中,利用回调函数获取纹理ID、图像数据的属性数据。In step S205, in the second OpenGL thread, the callback function is used to obtain the texture ID and attribute data of the image data.
如前所述,OpenGL是单线程工作模式,每个OpenGL线程的绘制上下文为OpenGL线程的私有变量。每个OpenGL线程的绘制命令只能作用在其绘制上下文上,不能访问其他OpenGL线程的纹理资源。为了使用渲染引擎的OpenGL线程,也即第一OpenGL线程中的纹理ID,在步骤S105,在第二OpenGL线程中,利用回调函数获取第一OpenGL线程中的纹理ID和图像数据的属性数据,实现了在不同OpenGL线程中纹理数据的共享。As mentioned before, OpenGL is a single-threaded working mode, and the drawing context of each OpenGL thread is a private variable of the OpenGL thread. The drawing commands of each OpenGL thread can only act on its drawing context and cannot access the texture resources of other OpenGL threads. In order to use the OpenGL thread of the rendering engine, that is, the texture ID in the first OpenGL thread, in step S105, in the second OpenGL thread, use the callback function to obtain the texture ID and attribute data of the image data in the first OpenGL thread, and implement Sharing of texture data among different OpenGL threads.
在步骤S207,在第二OpenGL线程中,获取第一OpenGL线程的绘制上下文。In step S207, in the second OpenGL thread, the drawing context of the first OpenGL thread is obtained.
如前所述,绘制上下文记录了OpenGL渲染所需要的信息和状态。因此,在第二OpenGL中,为了将第一OpenGL中的渲染数据以推流的形式发送给推流单元,需要获取第一OpenGL线程中的绘制上下文。根据一些实施例,利用EGL14的post获取第一OpenGL线程中的绘制上下文。As mentioned earlier, the drawing context records the information and status required for OpenGL rendering. Therefore, in the second OpenGL, in order to send the rendering data in the first OpenGL to the push unit in the form of a push stream, it is necessary to obtain the drawing context in the first OpenGL thread. According to some embodiments, a post of EGL14 is used to obtain the drawing context in the first OpenGL thread.
在步骤S209,在第二OpenGL线程中,利用第一OpenGL线程的绘制上下文创建第二OpenGL线程的绘制上下文。如前所述,不同OpenGL的渲染数据不能共享,所以第一OpenGL线程中的绘制上下文并不能在第二OpenGL线程中直接使用。因此,在步骤S209,通过读取第一OpenGL线程中的绘制上下文信息,创建第二OpenGL线程中的绘制上下文。In step S209, in the second OpenGL thread, the drawing context of the second OpenGL thread is created using the drawing context of the first OpenGL thread. As mentioned before, the rendering data of different OpenGLs cannot be shared, so the drawing context in the first OpenGL thread cannot be used directly in the second OpenGL thread. Therefore, in step S209, by reading the drawing context information in the first OpenGL thread, the drawing context in the second OpenGL thread is created.
例如,在第一OpenGL线程中,创建第二OpenGL线程的OpenGL显示窗口,利用OpenGL显示窗口获取第二OpenGL线程的配置信息,并利用获取的第一OpenGL线程的绘制上下文、第二OpenGL线程的OpenGL显示窗口和第二OpenGL线程的配置信息创建第二OpenGL线程的绘制上下文。For example, in the first OpenGL thread, create an OpenGL display window of the second OpenGL thread, use the OpenGL display window to obtain the configuration information of the second OpenGL thread, and use the obtained drawing context of the first OpenGL thread and the OpenGL of the second OpenGL thread. The display window and the configuration information of the second OpenGL thread create a drawing context for the second OpenGL thread.
在步骤S211,在第二OpenGL线程中,将纹理ID、第二OpenGL线程的绘制上下文、图像数据的属性数据发送给推流单元。由主播终端的推流单元将渲染数据和渲染后的图像数据发送给推流器。In step S211, in the second OpenGL thread, the texture ID, the drawing context of the second OpenGL thread, and the attribute data of the image data are sent to the streaming unit. The streaming unit of the anchor terminal sends the rendering data and rendered image data to the stream pusher.
根据一些实施例,推流器包括腾讯的TRTC、即构Zego、声网Agora等。推流器用于将图像数据编码为视频发送给观看端。According to some embodiments, the stream pusher includes Tencent's TRTC, Zego, Agora, etc. The streamer is used to encode image data into video and send it to the viewing end.
作为一种选择,根据本申请的示例实施例,图2所示的方法可以应用于安卓系统。As an option, according to example embodiments of the present application, the method shown in Figure 2 can be applied to the Android system.
在图2所示的实施例中,不仅实现了两个OpenGL线程的纹理数据共享,且通过主播终端把渲染引擎的渲染后的数据转换为视频流,使得配置较低的终端能够正常观看主播终端将渲染引擎的渲染后的数据以虚拟直播的方式播放的视频。In the embodiment shown in Figure 2, not only texture data sharing between two OpenGL threads is realized, but also the rendered data of the rendering engine is converted into a video stream through the anchor terminal, so that terminals with lower configurations can normally watch the anchor terminal A video that plays the rendered data of the rendering engine in a virtual live broadcast.
图3示出根据本申请示例实施例的一种从渲染引擎中获取渲染数据的装置框图。Figure 3 shows a block diagram of a device for obtaining rendering data from a rendering engine according to an example embodiment of the present application.
根据本申请的实施例,图3所示的装置应用于主播终端。其中,主播终端包括第一OpenGL线程和第二OpenGL线程,且第一OpenGL线程为渲染引擎的OpenGL线程。According to an embodiment of the present application, the device shown in Figure 3 is applied to the anchor terminal. Wherein, the anchor terminal includes a first OpenGL thread and a second OpenGL thread, and the first OpenGL thread is an OpenGL thread of the rendering engine.
如图3所示的一种从渲染引擎中获取渲染数据的装置包括监听单元301、纹理ID获取单元303和回调单元305。其中,监听单元301用于在第一OpenGL线程中监听渲染引擎初始化是否完成;纹理ID获取单元303用于响应于渲染引擎的初始化完成,并在第一OpenGL线程中获取纹理ID;回调单元305用于在第二OpenGL线程中,利用回调函数获取纹理ID。As shown in FIG. 3 , a device for obtaining rendering data from a rendering engine includes a listening unit 301 , a texture ID obtaining unit 303 and a callback unit 305 . Among them, the listening unit 301 is used to monitor whether the rendering engine initialization is completed in the first OpenGL thread; the texture ID acquisition unit 303 is used to respond to the completion of the rendering engine initialization and obtain the texture ID in the first OpenGL thread; the callback unit 305 uses In the second OpenGL thread, use the callback function to obtain the texture ID.
根据本申请的实施例,纹理ID获取单元303还用于获取图像数据的属性数据和第一OpenGL线程的绘制上下文。回调单元305还用于获取第一OpenG线程中的图像数据的属性数据。According to an embodiment of the present application, the texture ID acquisition unit 303 is also used to acquire attribute data of the image data and the drawing context of the first OpenGL thread. The callback unit 305 is also used to obtain attribute data of the image data in the first OpenG thread.
根据一些实施例,图3所示的装置还包括绘制上下文单元,用于获取第一OpenGL线程中的绘制上下文,并利用获取的绘制上下文创建第二OpenGL线程的绘制上下文。According to some embodiments, the device shown in Figure 3 further includes a drawing context unit, configured to obtain the drawing context in the first OpenGL thread, and use the obtained drawing context to create a drawing context of the second OpenGL thread.
根据另一些实施例,图3所示的装置还包括推流单元,用于将纹 理ID、第二OpenGL线程的绘制上下文和图像数据的属性数据发送给推流器。其中,推流器包括腾讯的TRTC、即构Zego、声网Agora。推流器用于将图像数据编码为视频发送给观看端。According to some other embodiments, the device shown in Figure 3 further includes a streaming unit for sending the texture ID, the drawing context of the second OpenGL thread and the attribute data of the image data to the streamer. Among them, stream pushers include Tencent’s TRTC, Zego, and Agora. The streamer is used to encode image data into video and send it to the viewing end.
图三所示的装置为用于主播终端的任一电子装置,例如平板、手机等。The device shown in Figure 3 is any electronic device used for the anchor terminal, such as a tablet, a mobile phone, etc.
图4示出根据本申请示例性实施例的一种电子设备。下面参照图4来描述根据本申请的这种实施方式的电子设备200。图4显示的电子设备200仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。FIG. 4 shows an electronic device according to an exemplary embodiment of the present application. The electronic device 200 according to this embodiment of the present application is described below with reference to FIG. 4 . The electronic device 200 shown in FIG. 4 is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.
如图4所示,电子设备200以通用计算设备的形式表现。电子设备200的组件可以包括但不限于:至少一个处理单元210、至少一个存储单元220、连接不同系统组件(包括存储单元220和处理单元210)的总线230、显示单元240等。As shown in Figure 4, electronic device 200 is embodied in the form of a general computing device. The components of the electronic device 200 may include, but are not limited to: at least one processing unit 210, at least one storage unit 220, a bus 230 connecting different system components (including the storage unit 220 and the processing unit 210), a display unit 240, and the like.
其中,存储单元存储有程序代码,程序代码可以被处理单元210执行,使得处理单元210执行本说明书描述的根据本申请各种示例性实施方式的方法。例如,处理单元210可以执行如图1中所示的方法。The storage unit stores program code, and the program code can be executed by the processing unit 210, so that the processing unit 210 executes the methods described in this specification according to various exemplary embodiments of the present application. For example, the processing unit 210 may perform the method as shown in FIG. 1 .
存储单元220可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)2201和/或高速缓存存储单元2202,还可以进一步包括只读存储单元(ROM)2203。The storage unit 220 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 2201 and/or a cache storage unit 2202, and may further include a read-only storage unit (ROM) 2203.
存储单元220还可以包括具有一组(至少一个)程序模块2205的程序/实用工具2204,这样的程序模块2205包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。 Storage unit 220 may also include a program/utility 2204 having a set of (at least one) program modules 2205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples, or some combination, may include the implementation of a network environment.
总线230可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。 Bus 230 may be a local area representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or using any of a variety of bus structures. bus.
电子设备200也可以与一个或多个外部设备300(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设备200交互的设备通信,和/或与使得该电子设备200能与一个 或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口250进行。并且,电子设备200还可以通过网络适配器260与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。网络适配器260可以通过总线230与电子设备200的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备200使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。 Electronic device 200 may also communicate with one or more external devices 300 (e.g., keyboard, pointing device, Bluetooth device, etc.), may also communicate with one or more devices that enable a user to interact with electronic device 200, and/or with Any device that enables the electronic device 200 to communicate with one or more other computing devices (eg, router, modem, etc.). This communication may occur through input/output (I/O) interface 250. Furthermore, the electronic device 200 may also communicate with one or more networks (eg, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 260. Network adapter 260 may communicate with other modules of electronic device 200 via bus 230. It should be understood that, although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage system, etc.
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。根据本申请实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、或者网络设备等)执行根据本申请实施方式的上述方法。Through the above description of the embodiments, those skilled in the art can easily understand that the example embodiments described here can be implemented by software, or can be implemented by software combined with necessary hardware. The technical solution according to the embodiment of the present application can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.) or on the network, including A plurality of instructions to cause a computing device (which may be a personal computer, a server, a network device, etc.) to execute the above method according to an embodiment of the present application.
软件产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。A software product may take the form of one or more readable media in any combination. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: electrical connection with one or more conductors, portable disk, hard disk, random access memory (RAM), read only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
计算机可读存储介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读存储介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。可读存储介质上包含的程序代码可 以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。A computer-readable storage medium may include a data signal propagated in baseband or as part of a carrier wave carrying the readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable storage medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transport the program for use by or in connection with an instruction execution system, apparatus, or device. Program code contained on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
可以以一种或多种程序设计语言的任意组合来编写用于执行本申请操作的程序代码,程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。The program code for performing the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., as well as conventional procedural programming. Language—such as "C" or a similar programming language. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server execute on. In situations involving remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device, such as provided by an Internet service. (business comes via Internet connection).
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该设备执行时,使得该计算机可读介质实现前述功能。The computer-readable medium carries one or more programs. When the one or more programs are executed by a device, the computer-readable medium implements the aforementioned functions.
本领域技术人员可以理解上述各模块可以按照实施例的描述分布于装置中,也可以进行相应变化唯一不同于本实施例的一个或多个装置中。上述实施例的模块可以合并为一个模块,也可以进一步拆分成多个子模块。Those skilled in the art can understand that the above-mentioned modules can be distributed in devices according to the description of the embodiments, or can be modified accordingly in one or more devices that are only different from this embodiment. The modules of the above embodiments can be combined into one module, or further divided into multiple sub-modules.
根据本申请的实施例,提出一种计算机程序,包括计算机程序或指令,该计算机程序或指令被处理器执行时,可以执行以上描述的方法。According to an embodiment of the present application, a computer program is proposed, including a computer program or instructions. When the computer program or instructions are executed by a processor, the above-described method can be performed.
根据本申请的示例实施例,通过在渲染引擎的OpenGL线程中获取纹理ID,并利用回调函数将渲染引擎的OpenGL线程中的纹理ID发送给另一个OpenGL线程,解决了渲染引擎在利用OpenGL线程执行渲染时,无法获取纹理ID的问题,使得主播终端可以将渲染引擎的渲染后的数据以视频的方式播放。According to example embodiments of the present application, by obtaining the texture ID in the OpenGL thread of the rendering engine, and using the callback function to send the texture ID in the OpenGL thread of the rendering engine to another OpenGL thread, the problem that the rendering engine is executing using the OpenGL thread is solved. During rendering, the problem of being unable to obtain the texture ID allows the anchor terminal to play the rendered data of the rendering engine in the form of video.
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明仅用于帮助理解本申请的方法及其核心思想。同时,本领域技术人员依据本申请 的思想,基于本申请的具体实施方式及应用范围上做出的改变或变形之处,都属于本申请保护的范围。综上所述,本说明书内容不应理解为对本申请的限制。The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and the core idea of the present application. At the same time, any changes or deformations made by those skilled in the art based on the ideas of the present application and the specific implementation modes and application scope of the present application shall fall within the scope of protection of the present application. In summary, the contents of this specification should not be construed as limiting this application.

Claims (11)

  1. 一种从渲染引擎中获取纹理数据的方法,所述方法应用于主播终端,所述主播终端包括第一OpenGL线程和第二OpenGL线程,且第一OpenGL线程为所述渲染引擎的OpenGL线程,其特征在于,所述方法包括:A method of obtaining texture data from a rendering engine. The method is applied to a host terminal. The host terminal includes a first OpenGL thread and a second OpenGL thread, and the first OpenGL thread is the OpenGL thread of the rendering engine. Characteristically, the method includes:
    在所述第一OpenGL线程中监听渲染引擎初始化是否完成;Monitor whether the rendering engine initialization is completed in the first OpenGL thread;
    响应于所述渲染引擎的初始化完成,在所述第一OpenGL线程中获取纹理ID;In response to completion of initialization of the rendering engine, obtain a texture ID in the first OpenGL thread;
    在所述第二OpenGL线程中,利用回调函数获取所述纹理ID。In the second OpenGL thread, a callback function is used to obtain the texture ID.
  2. 根据权利要求1所述的方法,其特征在于,所述在所述第一OpenGL线程中获取纹理ID,还包括:The method according to claim 1, wherein obtaining the texture ID in the first OpenGL thread further includes:
    在所述第一OpenGL线程中获取与所述纹理ID对应的图像数据的属性数据。Obtain the attribute data of the image data corresponding to the texture ID in the first OpenGL thread.
  3. 根据权利要求2所述的方法,其特征在于,所述属性数据包括所述图像数据的宽和高。The method of claim 2, wherein the attribute data includes width and height of the image data.
  4. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method of claim 2, further comprising:
    响应于所述渲染引擎的初始化完成,在所述第一OpenGL线程中获取第一绘制上下文。In response to completion of initialization of the rendering engine, a first drawing context is obtained in the first OpenGL thread.
  5. 根据权利要求4所述的方法,其特征在于,在所述第一OpenGL线程中获取绘制上下文之后,所述方法还包括:The method according to claim 4, characterized in that, after obtaining the drawing context in the first OpenGL thread, the method further includes:
    在第二OpenGL线程中获取所述第一OpenGL线程的绘制上下文。Obtain the drawing context of the first OpenGL thread in the second OpenGL thread.
  6. 根据权利要求5所述的方法,其特征在于,在第二OpenGL线程中获取所述第一OpenGL线程绘制上下文之后,所述方法还包括:The method according to claim 5, characterized in that, after obtaining the first OpenGL thread drawing context in the second OpenGL thread, the method further includes:
    在所述第二OpenGL线程中,利用所述第一OpenGL线程绘制上 下文创建第二OpenGL线程的绘制上下文。In the second OpenGL thread, the drawing context of the second OpenGL thread is created using the first OpenGL thread drawing context.
  7. 根据权利要求6所述的方法,其特征在于,所述方法还包括:The method of claim 6, further comprising:
    在所述第二OpenGL线程中,将所述纹理ID、第二OpenGL线程的绘制上下文、所述图像数据的属性数据发送给推流单元。In the second OpenGL thread, the texture ID, the drawing context of the second OpenGL thread, and the attribute data of the image data are sent to the streaming unit.
  8. 根据权利要求1所述的方法,其特征在于,所述方法应用于安卓系统。The method according to claim 1, characterized in that the method is applied to Android system.
  9. 一种从渲染引擎中获取纹理数据的装置,所述装置应用于主播终端,所述主播终端包括第一OpenGL线程和第二OpenGL线程,且第一OpenGL线程为所述渲染引擎的OpenGL线程,其特征在于,所述装置包括:A device for obtaining texture data from a rendering engine. The device is applied to a host terminal. The host terminal includes a first OpenGL thread and a second OpenGL thread, and the first OpenGL thread is the OpenGL thread of the rendering engine. Characteristically, the device includes:
    监听单元,用于在所述第一OpenGL线程中监听渲染引擎初始化是否完成;A monitoring unit configured to monitor whether the rendering engine initialization is completed in the first OpenGL thread;
    纹理ID获取单元,用于响应于所述渲染引擎的初始化完成,在所述第一OpenGL线程中获取纹理ID;A texture ID acquisition unit configured to acquire a texture ID in the first OpenGL thread in response to the completion of initialization of the rendering engine;
    回调单元,用于在所述第二OpenGL线程中,利用回调函数获取所述纹理ID。A callback unit, configured to use a callback function to obtain the texture ID in the second OpenGL thread.
  10. 一种电子设备,其特征在于,包括:An electronic device, characterized by including:
    一个或多个处理单元;one or more processing units;
    存储单元,用于存储一个或多个程序;A storage unit used to store one or more programs;
    当所述一个或多个程序被所述一个或多个处理单元执行,使得一个或多个处理单元实现如权利要求1-8中任一所述的方法。When the one or more programs are executed by the one or more processing units, the one or more processing units implement the method as described in any one of claims 1-8.
  11. 一种计算机程序,包括计算机程序或指令,其特征在于,所述计算机程序或所述指令被处理器执行时实现权如利要求1-8任一所述的方法。A computer program, including a computer program or instructions, characterized in that when the computer program or instructions are executed by a processor, the method according to any one of claims 1-8 is implemented.
PCT/CN2022/100445 2022-06-22 2022-06-22 Method and apparatus for acquiring texture data from rendering engine, and electronic device WO2023245494A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/100445 WO2023245494A1 (en) 2022-06-22 2022-06-22 Method and apparatus for acquiring texture data from rendering engine, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/100445 WO2023245494A1 (en) 2022-06-22 2022-06-22 Method and apparatus for acquiring texture data from rendering engine, and electronic device

Publications (1)

Publication Number Publication Date
WO2023245494A1 true WO2023245494A1 (en) 2023-12-28

Family

ID=89378815

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/100445 WO2023245494A1 (en) 2022-06-22 2022-06-22 Method and apparatus for acquiring texture data from rendering engine, and electronic device

Country Status (1)

Country Link
WO (1) WO2023245494A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108509240A (en) * 2018-03-09 2018-09-07 广东欧珀移动通信有限公司 Picture method for drafting and Related product
CN109168014A (en) * 2018-09-26 2019-01-08 广州虎牙信息科技有限公司 A kind of live broadcasting method, device, equipment and storage medium
CN110191314A (en) * 2019-05-07 2019-08-30 百度在线网络技术(北京)有限公司 Camera data processing method, device and mobile unit based on android system
CN113535371A (en) * 2020-04-13 2021-10-22 北京沃东天骏信息技术有限公司 Method and device for multithreading asynchronous loading of resources

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108509240A (en) * 2018-03-09 2018-09-07 广东欧珀移动通信有限公司 Picture method for drafting and Related product
CN109168014A (en) * 2018-09-26 2019-01-08 广州虎牙信息科技有限公司 A kind of live broadcasting method, device, equipment and storage medium
CN110191314A (en) * 2019-05-07 2019-08-30 百度在线网络技术(北京)有限公司 Camera data processing method, device and mobile unit based on android system
CN113535371A (en) * 2020-04-13 2021-10-22 北京沃东天骏信息技术有限公司 Method and device for multithreading asynchronous loading of resources

Similar Documents

Publication Publication Date Title
WO2021008373A1 (en) Display method and apparatus, electronic device, and computer-readable medium
WO2022127278A1 (en) Method and apparatus for rendering virtual scene
CN102707986B (en) Shared storage between child partition and father's subregion
CN102576470B (en) Automatic real-time shader modification for texture fetch instrumentation
US10600140B2 (en) Method for selecting a display capturing mode
US9928637B1 (en) Managing rendering targets for graphics processing units
JP5313225B2 (en) Display data management techniques
CN116185743B (en) Dual graphics card contrast debugging method, device and medium of OpenGL interface
CN113784049A (en) Camera calling method of android system virtual machine, electronic device and storage medium
CN110362375A (en) Display methods, device, equipment and the storage medium of desktop data
WO2024082878A1 (en) Rendering processing method and apparatus, electronic device, computer-readable storage medium, and computer program product
US8634695B2 (en) Shared surface hardware-sensitive composited video
WO2023245494A1 (en) Method and apparatus for acquiring texture data from rendering engine, and electronic device
CN113411661B (en) Method, apparatus, device, storage medium and program product for recording information
CN111355960A (en) Method and device for synthesizing video file, mobile terminal and storage medium
CN112367295B (en) Plug-in display method and device, storage medium and electronic equipment
CN117065357A (en) Media data processing method, device, computer equipment and storage medium
CN113559503A (en) Video generation method, device and computer readable medium
CN112433696A (en) Wallpaper display method, device, equipment and medium
CN116055540B (en) Virtual content display system, method, apparatus and computer readable medium
WO2023245495A1 (en) Method and apparatus for converting rendered data into video stream, and electronic device
TW201224925A (en) System and method for multiple native software applications user interface composition
US20240040162A1 (en) Effect display method, apparatus and device, storage medium, and product
CN116389801B (en) Multi-terminal integrated cloud streaming client implementation method
US8587599B1 (en) Asset server for shared hardware graphic data

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22947273

Country of ref document: EP

Kind code of ref document: A1