CN111796812B - Image rendering method and device, electronic equipment and computer readable storage medium - Google Patents

Image rendering method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN111796812B
CN111796812B CN201910363701.4A CN201910363701A CN111796812B CN 111796812 B CN111796812 B CN 111796812B CN 201910363701 A CN201910363701 A CN 201910363701A CN 111796812 B CN111796812 B CN 111796812B
Authority
CN
China
Prior art keywords
image data
uniform
sending
shader
preset
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201910363701.4A
Other languages
Chinese (zh)
Other versions
CN111796812A (en
Inventor
王伟亮
林顺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Yaji Software Co Ltd
Original Assignee
Xiamen Yaji Software Co Ltd
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 Xiamen Yaji Software Co Ltd filed Critical Xiamen Yaji Software Co Ltd
Publication of CN111796812A publication Critical patent/CN111796812A/en
Application granted granted Critical
Publication of CN111796812B publication Critical patent/CN111796812B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures

Abstract

The application provides an image rendering method and device, electronic equipment and a computer readable storage medium, and relates to the field of image processing. The method comprises the following steps: after receiving the image data to be rendered, sending the image data to different types of shaders through preset interfaces so that the different types of shaders render the image data. In this way, the processing interface is uniform for the upper layer regardless of the type of the shader, so that a user can use high-performance components to improve the performance even on shaders that do not support high-level feature components, and the user does not worry about compatibility problems due to differences of shader types.

Description

Image rendering method and device, electronic equipment and computer readable storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to an image rendering method and apparatus, an electronic device, and a computer-readable storage medium.
Background
The Web game is also called Web game, endless online game, short for page game, and is a network online multi-player interactive game based on a Web browser, and a client does not need to be downloaded.
WebGL (full-write Web Graphics Library) is a 3D drawing protocol, the drawing technical standard allows JavaScript and OpenGL ES 2.0 to be combined together, and by adding one JavaScript binding of OpenGL ES 2.0, webGL can provide hardware 3D accelerated rendering for HTML5Canvas, so that Web developers can more smoothly display 3D scenes and models in a browser by means of a system display card, and complicated navigation and data visualization can be created. Obviously, the WebGL technical standard eliminates the trouble of developing web page-specific rendering plug-ins, can be used to create web site pages with complex 3D structures, can even be used to design 3D web games, and the like.
WebGL currently includes two versions: webgl1.0 and webgl2.0.WebGL1.0 is based on OpenGL ES 2.0 and provides an API for 3D graphics, using HTML5Canvas and allowing the use of document object model interfaces; webGL2.0 is based on OpenGL ES 3.0, ensures that a plurality of selective WebGL1.0 extensions are provided, introduces a new API, and can realize automatic memory management by utilizing part of Javascript.
In the prior art, webgl1.0 and webgl2.0 correspond to a set of shaders respectively, but according to the relevant provisions of the APIs, the shaders of webgl1.0 and the shaders of webgl2.0 are two sets of independent shaders, the two sets of shaders are incompatible, and the incompatible result is that if the two sets of shaders are required to be operated on two graphic APIs (webgl1.0 and webgl2.0) simultaneously, two sets of shaders need to be written, one set of shaders corresponds to webgl1.0, and one set of shaders corresponds to webgl2.0, so that the workload is large.
Disclosure of Invention
The purpose of the present application is to solve at least one of the above technical drawbacks, and to provide the following solutions:
in a first aspect, a method for rendering an image is provided, the method including:
receiving image data to be rendered;
and sending the image data to different types of shaders through preset interfaces so that the different types of shaders render the image data.
Preferably, the step of sending the image data to different types of shaders through a preset interface includes:
sending the image data to a shader based on WebGL1.0 through a preset first uniform buffer interface;
or the like, or, alternatively,
and sending the image data to a shader based on WebGL2.0 through a preset second uniform buffer interface.
Preferably, the webgl1.0-based shader is generated by:
performing text replacement on the source code of the shader based on the WebGL2.0 to generate the shader based on the WebGL1.0; the text replacement includes keyword replacement, function name replacement, filtering annotations, and source code merging.
Preferably, the first uniform buffer interface is a uniform buffer virtual interface;
the step of sending the image data to a shader based on webgl1.0 through a preset first uniform buffer interface includes:
sequentially acquiring the offset of each uniform in the uniform buffer virtual interface and the corresponding actual position of each uniform in a preset buffer area; the preset buffer area is used for storing the image data;
sequentially acquiring each image data block corresponding to each uniform according to the offset of each uniform in the uniform buffer virtual interface and the corresponding actual position of each uniform in the preset buffer area;
and sending each image data block to the WebGL1.0-based shader.
Preferably, the second uniform buffer interface is a uniform buffer component interface;
the step of sending the image data to a shader based on webgl2.0 through a preset second uniform buffer interface includes:
and sending the image data to the WebGL2.0-based shader through the uniform buffer component interface.
In a second aspect, an apparatus for image rendering is provided, the apparatus comprising:
the receiving module is used for receiving image data to be rendered;
and the sending module is used for sending the image data to different types of shaders through preset interfaces so that the different types of shaders render the image data.
Preferably, the sending module includes:
the first sending submodule is used for sending the image data to a shader based on WebGL1.0 through a preset first uniform buffer interface;
and the second sending submodule is used for sending the image data to a shader based on WebGL2.0 through a preset second uniform buffer interface.
Preferably, the webgl1.0-based shader is generated by:
performing text replacement on the source code of the shader based on the WebGL2.0 to generate the shader based on the WebGL1.0; the text replacement includes keyword replacement, function name replacement, filtering annotations, and source code merging.
Preferably, the first uniform buffer interface is a uniform buffer virtual interface;
the first transmission submodule includes:
the device comprises a first acquisition unit, a second acquisition unit and a control unit, wherein the first acquisition unit is used for sequentially acquiring the corresponding offset of each uniform in a uniform buffer virtual interface and the corresponding actual position of each uniform in a preset buffer area; the preset buffer area is used for storing the image data;
the second obtaining unit is used for obtaining each image data block corresponding to each uniform according to the offset corresponding to each uniform in the uniform buffer virtual interface and the actual position corresponding to each uniform in the preset buffer area;
and the sending unit is used for sending each image data block to the WebGL1.0-based shader.
Preferably, the second uniform buffer interface is a uniform buffer component interface;
the second sending submodule is specifically configured to: and sending the image data to the WebGL2.0-based shader through the uniform buffer component interface.
In a third aspect, an electronic device is provided, which includes:
a processor, memory, and a bus;
the bus is used for connecting the processor and the memory;
the memory is used for storing operation instructions;
the processor is configured to, by invoking the operation instruction, execute the executable instruction to enable the processor to perform an operation corresponding to the image rendering method according to the first aspect of the present application.
In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, which when executed by a processor, implements the method of image rendering as illustrated in the first aspect of the application.
The beneficial effect that technical scheme that this application provided brought is:
in the embodiment of the invention, after the image data to be rendered is received, the image data is sent to the shaders of different types through the preset interface, so that the shaders of different types render the image data. Therefore, the processing interface is uniform for the upper layer no matter what the type of the shader is, so that a user can use high-performance components to improve the performance even on the shader which does not support high-level characteristic components, and the compatibility problem caused by the difference of the types of the shaders is not worried.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments of the present application will be briefly described below.
Fig. 1 is a schematic flowchart of a method for rendering an image according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an image rendering apparatus according to another embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device for image rendering according to yet another embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The method, the apparatus, the electronic device and the computer-readable storage medium for image rendering provided by the present application aim to solve the above technical problems in the prior art.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
In one embodiment, a method of image rendering is provided, as shown in fig. 1, the method comprising:
step S101, receiving image data to be rendered;
in particular, embodiments of the present invention may be applied to a rendering engine that may render images of a web game. The rendering engine is provided with an abstract interface GFX of a rendering layer, and receives image data to be rendered (of a game) transmitted by scheduling and user level of upper layer logic through the GFX.
And S102, sending the image data to different types of shaders through preset interfaces so that the different types of shaders render the image data.
After receiving image data to be rendered, the rendering engine may submit the image data to a shader (shader) of corresponding webgl1.0, or a shader of webgl2.0, or other bottom-layer graphics api, such as a WebGPU; the shader is a GPU programming language, and the shader runs on the GPU through compiling of the driver, so that various rendering effects, illumination effects and coloring effects are achieved.
In the prior art, according to the relevant provisions of APIs, a shader of webgl1.0 and a shader of webgl2.0 are two sets of independent shaders, the two sets of shaders are incompatible, and the incompatible result is that if the two sets of shaders are required to simultaneously run on two graphics APIs (webgl1.0 and webgl2.0), two sets of shaders need to be written, one set of shaders corresponds to webgl1.0, and one set of shaders corresponds to webgl2.0.
In the embodiment of the invention, a developer can automatically generate two sets of shaders by writing one set of shaders by adopting a high-version language (such as # version 300 es), so that the webGL1.0 and webGL2.0 can be compatible by writing one set of shaders simultaneously.
In a preferred embodiment of the present invention, the webgl1.0 based shader is generated by:
performing text replacement on the source code of the shader based on the WebGL2.0 to generate the shader based on the WebGL1.0; the text replacement includes keyword replacement, function name replacement, filtering annotations, and source code merging.
Specifically, after being written, a developer can automatically generate two sets of shaders, which is realized through text replacement. After a developer writes a high-version shader (a shader corresponding to webGL2.0), a keyword and a function name differentiation part in the high-version shader are automatically replaced, namely, a keyword and a function name in a programming language are specifically corresponding to a low-version shader (a shader corresponding to webGL1.0) and converted to obtain the low-version shader.
To comply with the language specification, a text substitution is made. Besides the common text replacement technology, the embodiment of the invention also removes some comments, merges some codes and improves the execution efficiency of the shader through an external tool (such as simplifying addition, subtraction, multiplication and division, expanding functions and reducing function calls).
In a preferred embodiment of the present invention, the step of sending the image data to different types of shaders through a preset interface includes:
sending the image data to a shader based on WebGL1.0 through a preset first uniform buffer interface;
or the like, or a combination thereof,
and sending the image data to a shader based on WebGL2.0 through a preset second uniform buffer interface.
In practical applications, because webgl1.0 version is lower, webgl1.0 has no uniform buffer, and webgl1.0 can only access a single uniform. WebGL2.0 has the notion of uniform buffer. Therefore, in the embodiment of the present invention, unifonm is packaged and put together, and unifonm buffer is simulated on webgl1.0, whereas webgl2.0 belongs to a high version, a technical component unifonm buffer is already provided, so that, with respect to an upper layer, webgl1.0 and webgl2.0 are the same unifonm buffer interface.
In a preferred embodiment of the present invention, the first uniform buffer interface is a uniform buffer virtual interface;
the step of sending the image data to a shader based on WebGL1.0 through a preset first uniform buffer interface includes:
sequentially acquiring the offset of each uniform in the uniform buffer virtual interface and the corresponding actual position of each uniform in a preset buffer area; the preset buffer area is used for storing the image data;
sequentially acquiring each image data block corresponding to each uniform according to the offset of each uniform in the uniform buffer virtual interface and the corresponding actual position of each uniform in the preset buffer area;
and sending each image data block to the WebGL1.0-based shader.
Specifically, the offset of each uniform in the uniform buffer and the actual position of each uniform in the preset buffer are recorded in advance, and then the uniform is organized in a section of buffer in the memory according to different offsets, so that the uniform buffer is formed. Wherein, the offset records the specific position of the uniform parameter in the uniform buffer. That is, the process of simulating the uniform buffer is essentially a segment of memory buffer, in which all the uniform are organized together.
The image data blocks are partial data of the image data, and all the image data blocks form complete image data. That is, the uniform buffer includes a plurality of uniform, each of which corresponds to a portion of the image data (image data block), so that the uniform buffer corresponds to the complete image data.
When data transmission is performed through the uniform buffer virtual interface, information of the uniform offset can be acquired through a loader reflection mechanism, which is a general interface provided by the API. The uniform buffer packs and puts the independent uniform variables together, one buffer corresponds to one cache, one uniform is a set of multiple variables and is transmitted to the shader, and the shader calculates the uniform variables to obtain image data to be rendered. In a preferred embodiment of the present invention, the second uniform buffer interface is a uniform buffer component interface;
the step of sending the image data to a shader based on webgl2.0 through a preset second uniform buffer interface includes:
and sending the image data to the WebGL2.0-based shader through the uniform buffer component interface.
Since the webgl2.0 belongs to a high version and already has a corresponding technical component uniform buffer, the shader based on the webgl2.0 performs data interaction through the component uniform buffer interface.
In the embodiment of the invention, after the image data to be rendered is received, the image data is sent to the shaders of different types through the preset interface, so that the shaders of different types render the image data. In this way, the processing interface is uniform for the upper layer regardless of the type of the shader, so that a user can use high-performance components to improve the performance even on shaders that do not support high-level feature components, and the user does not worry about compatibility problems due to differences of shader types.
Furthermore, the embodiment of the invention can automatically convert the high-version shader into the low-version shader, so that a developer can generate two sets of shaders by compiling one set of shaders, one set corresponds to WebGL1.0 and the other set corresponds to WebGL2.0, and the compatibility of compiling one set of shaders with WebGL1.0 and WebGL2.0 is realized.
Fig. 2 is a schematic structural diagram of an image rendering apparatus according to another embodiment of the present application, and as shown in fig. 2, the apparatus according to the embodiment may include:
a receiving module 201, configured to receive image data to be rendered;
a sending module 202, configured to send the image data to different types of shaders through a preset interface, so that the different types of shaders render the image data.
In a preferred embodiment of the present invention, the sending module includes:
the first sending submodule is used for sending the image data to a shader based on WebGL1.0 through a preset first uniform buffer interface;
and the second sending submodule is used for sending the image data to a shader based on WebGL2.0 through a preset second uniform buffer interface.
In a preferred embodiment of the present invention, the webgl1.0 based shader is generated by:
performing text replacement on the source code of the shader based on the WebGL2.0 to generate the shader based on the WebGL1.0; the text replacement includes keyword replacement, function name replacement, filtering annotations, and source code merging.
In a preferred embodiment of the present invention, the first uniform buffer interface is a uniform buffer virtual interface;
the first transmission submodule includes:
the first obtaining unit is used for sequentially obtaining the offset of each uniform in the uniform buffer virtual interface and the corresponding actual position of each uniform in the preset buffer area; the preset buffer area is used for storing the image data;
the second obtaining unit is used for obtaining each image data block corresponding to each uniform according to the offset corresponding to each uniform in the uniform buffer virtual interface and the actual position corresponding to each uniform in the preset buffer area;
and the sending unit is used for sending each image data block to the WebGL1.0-based shader.
In a preferred embodiment of the present invention, the second uniform buffer interface is a uniform buffer component interface;
the second sending submodule is specifically configured to: and sending the image data to the WebGL2.0-based shader through the uniform buffer component interface.
The image rendering apparatus of this embodiment can execute the image rendering method shown in the first embodiment of this application, and the implementation principles thereof are similar, and are not described herein again.
In another embodiment of the present application, there is provided an electronic device including: a memory and a processor; at least one program stored in the memory for execution by the processor, which when executed by the processor, implements: in the embodiment of the invention, after the image data to be rendered is received, the image data is sent to the shaders of different types through the preset interface, so that the shaders of different types render the image data. Therefore, the processing interface is uniform for the upper layer no matter what the type of the shader is, so that a user can use high-performance components to improve the performance even on the shader which does not support high-level characteristic components, and the compatibility problem caused by the difference of the types of the shaders is not worried.
In an alternative embodiment, an electronic device is provided, as shown in fig. 3, an electronic device 3000 shown in fig. 3 comprising: a processor 3001 and a memory 3003. The processor 3001 is coupled to the memory 3003, such as via a bus 3002. Optionally, the electronic device 3000 may further comprise a transceiver 3004. It should be noted that the transceiver 3004 is not limited to one in practical applications, and the structure of the electronic device 3000 is not limited to the embodiment of the present application.
Processor 3001 may be a CPU, general purpose processor, DSP, ASIC, FPGA or other programmable logic device, transistor logic device, hardware component, or any combination thereof. Which may implement or execute the various illustrative logical blocks, modules, and circuits described in connection with the disclosure herein. The processor 3001 may also be a combination of computing functions, e.g., comprising one or more microprocessors, a combination of a DSP and a microprocessor, or the like.
Bus 3002 may include a path that conveys information between the aforementioned components. The bus 3002 may be a PCI bus or an EISA bus, etc. The bus 3002 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 3, but this does not mean only one bus or one type of bus.
Memory 3003 may be, but is not limited to, a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, an EEPROM, a CD-ROM or other optical disk storage, optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, blu-ray disk, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
The memory 3003 is used for storing application code that implements the aspects of the present application, and is controlled in execution by the processor 3001. The processor 3001 is configured to execute application program code stored in the memory 3003 to implement any of the method embodiments shown above.
Wherein, the electronic device includes but is not limited to: mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like.
Yet another embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, which, when run on a computer, enables the computer to perform the corresponding content in the aforementioned method embodiments. Compared with the prior art, in the embodiment of the invention, after the image data to be rendered is received, the image data is sent to the shaders of different types through the preset interface, so that the shaders of different types render the image data. In this way, the processing interface is uniform for the upper layer regardless of the type of the shader, so that a user can use high-performance components to improve the performance even on shaders that do not support high-level feature components, and the user does not worry about compatibility problems due to differences of shader types.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of execution is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The foregoing is only a partial embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method of image rendering, comprising:
receiving image data to be rendered;
sending the image data to different types of shaders through preset interfaces so that the different types of shaders render the image data;
wherein sending the image data to different types of shaders comprises: sending the image data to a WebGL1.0-based shader; the WebGL1.0-based shader is generated by performing text replacement on source code of the WebGL2.0-based shader;
the sending the image data to the WebGL1.0-based shader includes: sending the image data to a shader based on WebGL1.0 through a preset first uniform buffer interface; the first uniform buffer interface is a uniform buffer virtual interface, the uniform buffer comprises a plurality of uniform, and each uniform corresponds to a part of image data;
the sending of the image data to a shader based on WebGL1.0 through a preset first uniform buffer interface includes: sequentially acquiring each image data block corresponding to each uniform according to the offset of each uniform in the uniform buffer virtual interface and the corresponding actual position of each uniform in a preset buffer area, wherein the preset buffer area is used for storing the image data; and sending each image data block to the WebGL1.0-based shader.
2. The method for rendering an image according to claim 1, wherein the step of sending the image data to the different types of shaders through a preset interface comprises:
sending the image data to a WebGL2.0-based shader;
and sending the image data to a shader based on WebGL2.0 through a preset second uniform buffer interface.
3. The method of image rendering of claim 1, wherein the text replacement comprises keyword replacement, function name replacement, filtering annotations, and source code merging.
4. The method of image rendering according to claim 1,
before obtaining each image data block corresponding to each uniform according to the offset of each uniform in the uniform buffer virtual interface and the corresponding actual position of each uniform in the preset buffer area in sequence in the step of sending the image data to the shader based on webgl1.0 through the preset first uniform buffer interface, the method further includes:
and sequentially acquiring the offset of each uniform in the uniform buffer virtual interface and the corresponding actual position of each uniform in the preset buffer area.
5. The method for image rendering according to claim 2, wherein the second uniform buffer interface is a uniform buffer component interface;
the step of sending the image data to a shader based on webgl2.0 through a preset second uniform buffer interface includes:
and sending the image data to the WebGL2.0-based shader through the uniform buffer component interface.
6. An apparatus for image rendering, comprising:
the receiving module is used for receiving image data to be rendered;
the sending module is used for sending the image data to different types of shaders through a preset interface so as to render the image data by the different types of shaders;
wherein sending the image data to different types of shaders comprises: sending the image data to a WebGL1.0-based shader; the WebGL1.0-based shader is generated by performing text replacement on source codes of the WebGL2.0-based shader;
the sending the image data to the WebGL1.0-based shader includes: sending the image data to a shader based on WebGL1.0 through a preset first uniform buffer interface; the first uniform buffer interface is a uniform buffer virtual interface, the uniform buffer comprises a plurality of uniform, and each uniform corresponds to a part of image data;
the step of sending the image data to a shader based on webgl1.0 through a preset first uniform buffer interface includes: sequentially obtaining each image data block corresponding to each uniform according to the offset of each uniform in the uniform buffer virtual interface and the corresponding actual position of each uniform in a preset buffer area, wherein the preset buffer area is used for storing the image data; and sending each image data block to the WebGL1.0-based shader.
7. The apparatus for image rendering according to claim 6, wherein the sending module comprises:
the first sending submodule is used for sending the image data to a shader based on WebGL1.0 through a preset first uniform buffer interface;
and the second sending submodule is used for sending the image data to a shader based on WebGL2.0 through a preset second uniform buffer interface.
8. The image rendering apparatus of claim 6, wherein the text replacement comprises keyword replacement, function name replacement, filtering annotation, and source code merging.
9. An electronic device, comprising:
a processor, a memory, and a bus;
the bus is used for connecting the processor and the memory;
the memory is used for storing operation instructions;
the processor is used for executing the image rendering method of any one of the claims 1-5 by calling the operation instruction.
10. A computer-readable storage medium for storing computer instructions which, when executed on a computer, cause the computer to perform the method of image rendering of any of claims 1-5.
CN201910363701.4A 2019-04-04 2019-04-30 Image rendering method and device, electronic equipment and computer readable storage medium Active CN111796812B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2019102713947 2019-04-04
CN201910271394 2019-04-04

Publications (2)

Publication Number Publication Date
CN111796812A CN111796812A (en) 2020-10-20
CN111796812B true CN111796812B (en) 2022-11-04

Family

ID=72805393

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910363701.4A Active CN111796812B (en) 2019-04-04 2019-04-30 Image rendering method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111796812B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112614042B (en) * 2020-12-29 2022-09-27 完美世界(北京)软件科技发展有限公司 Data driving method and device for delayed rendering of map
CN116991600A (en) * 2023-06-15 2023-11-03 上海一谈网络科技有限公司 Method, device, equipment and storage medium for processing graphic call instruction

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107832108A (en) * 2016-09-14 2018-03-23 阿里巴巴集团控股有限公司 Rendering intent, device and the electronic equipment of 3D canvas web page elements
CN108805298A (en) * 2018-05-23 2018-11-13 浙江工业大学 A kind of data center's Visualized management system based on WebGL technologies

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7460119B2 (en) * 2005-01-27 2008-12-02 Siemens Medical Solutions Usa, Inc. Invisible space skipping with adaptive granularity for texture-based volume rendering
CN107609051A (en) * 2017-08-22 2018-01-19 阿里巴巴集团控股有限公司 A kind of image rendering method, device and electronic equipment
CN108765534B (en) * 2018-05-24 2022-06-21 武汉斗鱼网络科技有限公司 Image rendering method, device and equipment and storage medium
CN109168014B (en) * 2018-09-26 2021-05-28 广州虎牙信息科技有限公司 Live broadcast method, device, equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107832108A (en) * 2016-09-14 2018-03-23 阿里巴巴集团控股有限公司 Rendering intent, device and the electronic equipment of 3D canvas web page elements
CN108805298A (en) * 2018-05-23 2018-11-13 浙江工业大学 A kind of data center's Visualized management system based on WebGL technologies

Also Published As

Publication number Publication date
CN111796812A (en) 2020-10-20

Similar Documents

Publication Publication Date Title
CN108228188B (en) View component processing method, electronic device and readable storage medium
CN107393013B (en) Virtual roaming file generation and display method, device, medium, equipment and system
Sellers et al. Vulkan programming guide: The official guide to learning vulkan
Sanders et al. CUDA by example: an introduction to general-purpose GPU programming
EP2141651B1 (en) Framework to integrate and abstract processing of multiple hardware domains, data types and format
JP5679989B2 (en) Debug pipeline
US10207190B2 (en) Technologies for native game experience in web rendering engine
Anyuru Professional WebGL programming: developing 3D graphics for the Web
US20130097410A1 (en) Machine processor
RU2633161C2 (en) Linker support for graphic functions
US11900088B2 (en) Method for generating a binding between a C/C++ library and an interpreted language, and carrying out the method to transform a three- dimensional (3D) model
US20130198325A1 (en) Provision and running a download script
CN111796812B (en) Image rendering method and device, electronic equipment and computer readable storage medium
CN112423111A (en) Graphic engine and graphic processing method suitable for player
US9348676B2 (en) System and method of processing buffers in an OpenCL environment
US9575737B1 (en) Application access to native and bundled libraries
US20130103931A1 (en) Machine processor
CN111414150A (en) Game engine rendering method and device, electronic equipment and computer storage medium
US9448823B2 (en) Provision of a download script
CN112486807A (en) Pressure testing method and device, electronic equipment and readable storage medium
EP3752914B1 (en) Techniques for native runtime of hypertext markup language graphics content
CN114281773A (en) Animation display method and device, electronic equipment and computer readable storage medium
CN110930499B (en) 3D data processing method and device
Godwin-Jones New developments in web browsing and authoring
TWI556167B (en) System and method for multiple native software applications user interface composition

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant