CN108765539B - OpenGLES-based image rendering method, device, equipment and storage medium - Google Patents
OpenGLES-based image rendering method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN108765539B CN108765539B CN201810508764.XA CN201810508764A CN108765539B CN 108765539 B CN108765539 B CN 108765539B CN 201810508764 A CN201810508764 A CN 201810508764A CN 108765539 B CN108765539 B CN 108765539B
- Authority
- CN
- China
- Prior art keywords
- vertex
- vertex data
- auxiliary
- coordinate
- texture
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/04—Texture mapping
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2200/00—Indexing scheme for image data processing or generation, in general
- G06T2200/04—Indexing scheme for image data processing or generation, in general involving 3D image data
Landscapes
- Engineering & Computer Science (AREA)
- Computer Graphics (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Generation (AREA)
Abstract
The embodiment of the invention discloses an OpenGLES-based image rendering method, device, equipment and storage medium. The method comprises the following steps: determining target vertex data according to the shape of the image to be rendered and a triangle drawing rule, wherein the target vertex data comprises required vertex data and auxiliary vertex data corresponding to the image to be rendered, and each vertex data comprises a spatial position coordinate and a texture coordinate; constructing a polygon corresponding to the target vertex data according to the triangle drawing rule and the target vertex spatial position coordinates in the target vertex data; and rendering the image according to the texture corresponding to the graph to be rendered, the texture coordinates of the target vertex in the target vertex data and the polygon. By the technical scheme, the problem of abnormal rendering of the image during image rendering based on OpenGLES is solved, and the image rendering based on OpenGLES is more accurately performed, so that the display picture of the application program is more correct and smooth, and the user experience is improved.
Description
Technical Field
The embodiment of the invention relates to an image processing technology, in particular to an OpenGLES-based image rendering method, device, equipment and storage medium.
Background
When image rendering applications are developed for both mobile terminals and non-mobile terminal devices, an Embedded Open Graphics Library (OpenGLES) can be used as an image rendering tool, and particularly, when an image rendering application is developed for a mobile terminal device, OpenGLES is usually used as an image rendering tool.
However, for some terminal devices with older display card drivers, an application developed based on OpenGLES may have a problem that a rendered image is distorted or broken during an operation process, so that a display screen is abnormal, and user experience is affected.
Disclosure of Invention
Embodiments of the present invention provide an OpenGLES-based image rendering method, apparatus, device, and storage medium, so as to implement more accurate OpenGLES-based image rendering, make a display screen of an application more correct and smooth, and improve user experience.
In a first aspect, an embodiment of the present invention provides an OpenGLES-based image rendering method, including:
determining target vertex data according to the shape of the image to be rendered and a triangle drawing rule, wherein the target vertex data comprises required vertex data and auxiliary vertex data corresponding to the image to be rendered, and each vertex data comprises a spatial position coordinate and a texture coordinate;
according to the triangle drawing rule and the target vertex space position coordinates in the target vertex data, a polygon corresponding to the target vertex data is constructed;
and rendering the image according to the texture corresponding to the image to be rendered, the texture coordinates of the target vertex in the target vertex data and the polygon.
Optionally, the determining target vertex data according to the shape of the image to be rendered and a triangle drawing rule includes:
determining the required vertex data according to the shape and the triangle drawing rule;
determining auxiliary vertex space position coordinates in the auxiliary vertex data according to the requirement vertex space position coordinates in the requirement vertex data so as to enable the polygon to be a convex polygon;
and determining auxiliary vertex texture coordinates in the auxiliary vertex data according to the required vertex texture coordinates in the required vertex data so as to enable a texture sampling area corresponding to the target vertex texture coordinates in the target vertex data to be consistent with a texture sampling area corresponding to the required vertex texture coordinates.
Further, the spatial location coordinates include an x-coordinate, a y-coordinate, and a z-coordinate.
Correspondingly, the determining the auxiliary vertex space position coordinates in the auxiliary vertex data according to the requirement vertex space position coordinates in the requirement vertex data comprises:
setting an auxiliary vertex z coordinate in the auxiliary vertex space position coordinate as a requirement vertex z coordinate in the requirement vertex space position coordinate;
respectively will supplementary summit x coordinate and supplementary summit y coordinate in the supplementary summit space position coordinate sets up to be greater than or equal to demand summit x coordinate and the demand summit y coordinate that corresponds in the demand summit space position coordinate, just supplementary summit x coordinate with supplementary summit y coordinate does not simultaneously equal to corresponding demand summit x coordinate and corresponding demand summit y coordinate.
Further, the determining the auxiliary vertex texture coordinates in the auxiliary vertex data according to the required vertex texture coordinates in the required vertex data includes:
and setting the auxiliary vertex texture coordinates one by one as one of the texture coordinates of the demand vertex.
Optionally, on the basis of the above technical solution, the method further includes: determining the quantity of auxiliary vertex data corresponding to at least one auxiliary triangle according to the triangle drawing rule;
correspondingly, the determining the auxiliary vertex space position coordinate in the auxiliary vertex data according to the requirement vertex space position coordinate in the requirement vertex data comprises:
determining auxiliary vertex space position coordinates in the quantity of auxiliary vertex data according to the requirement vertex space position coordinates in the requirement vertex data;
correspondingly, the determining the auxiliary vertex texture coordinates in the auxiliary vertex data according to the required vertex texture coordinates in the required vertex data includes:
and determining the auxiliary vertex texture coordinates in the auxiliary vertex data according to the required vertex texture coordinates in the required vertex data.
Further, the determining, according to the triangle drawing rule, the amount of the auxiliary vertex data corresponding to at least one auxiliary triangle includes:
and determining the number of auxiliary vertex data corresponding to one auxiliary triangle to be 1 according to a triangle STRIP drawing rule GL _ TRIANGE _ STRIP.
Optionally, the constructing a polygon corresponding to the target vertex data according to the triangle drawing rule and the target vertex spatial position coordinate in the target vertex data includes:
calling a graph drawing function according to a triangle STRIP drawing rule GL _ TRIANGE _ STRIP, the target vertex space position coordinates and the element sequence of the target vertex data in a vertex array, and constructing a polygon corresponding to the target vertex data;
wherein the element sequence of the target vertex data in the vertex array is as follows: the element positions of the auxiliary vertex data in the vertex array are arranged behind the element positions of the required vertex data in the vertex array.
In a second aspect, an embodiment of the present invention further provides an OpenGLES-based image rendering apparatus, where the apparatus includes:
the target vertex data determining module is used for determining target vertex data according to the shape of the image to be rendered and a triangle drawing rule, wherein the target vertex data comprises required vertex data and auxiliary vertex data corresponding to the image to be rendered, and each vertex data comprises a spatial position coordinate and a texture coordinate;
the polygon construction module is used for constructing a polygon corresponding to the target vertex data according to the triangle drawing rule and the target vertex spatial position coordinates in the target vertex data;
and the image rendering module is used for rendering the image according to the texture corresponding to the image to be rendered, the texture coordinate of the target vertex in the target vertex data and the polygon.
Optionally, the target vertex data determining module includes:
the required vertex data determining submodule is used for determining the required vertex data according to the shape and the triangle drawing rule;
the auxiliary vertex space position coordinate determination submodule is used for determining an auxiliary vertex space position coordinate in the auxiliary vertex data according to the requirement vertex space position coordinate in the requirement vertex data so as to enable the polygon to be a convex polygon;
and the auxiliary vertex texture coordinate determining submodule is used for determining an auxiliary vertex texture coordinate in the auxiliary vertex data according to the required vertex texture coordinate in the required vertex data so as to enable a texture sampling area corresponding to the target vertex texture coordinate in the target vertex data to be consistent with a texture sampling area corresponding to the required vertex texture coordinate.
Further, the spatial location coordinates include an x-coordinate, a y-coordinate, and a z-coordinate.
Accordingly, the auxiliary vertex spatial location coordinate determination submodule is specifically configured to:
setting an auxiliary vertex z coordinate in the auxiliary vertex space position coordinate as a requirement vertex z coordinate in the requirement vertex space position coordinate;
respectively will supplementary summit x coordinate and supplementary summit y coordinate in the supplementary summit space position coordinate sets up to be greater than or equal to demand summit x coordinate and the demand summit y coordinate that corresponds in the demand summit space position coordinate, just supplementary summit x coordinate with supplementary summit y coordinate does not simultaneously equal to corresponding demand summit x coordinate and corresponding demand summit y coordinate.
Further, the auxiliary vertex texture coordinate determination sub-module is specifically configured to:
and setting the auxiliary vertex texture coordinates one by one as one of the texture coordinates of the required vertex.
Optionally, on the basis of the above apparatus, the apparatus further includes: the auxiliary vertex data quantity determining module is used for determining the quantity of auxiliary vertex data corresponding to at least one auxiliary triangle according to the triangle drawing rule;
accordingly, the auxiliary vertex spatial location coordinate determination submodule is specifically configured to:
determining auxiliary vertex space position coordinates in the quantity of auxiliary vertex data according to the requirement vertex space position coordinates in the requirement vertex data;
accordingly, the auxiliary vertex texture coordinate determination submodule is specifically configured to:
and determining the auxiliary vertex texture coordinates in the auxiliary vertex data according to the required vertex texture coordinates in the required vertex data.
Further, the auxiliary vertex data quantity determination module is specifically configured to:
and determining the number of auxiliary vertex data corresponding to one auxiliary triangle to be 1 according to a triangle STRIP drawing rule GL _ TRIANGE _ STRIP.
Optionally, the polygon construction module is specifically configured to:
calling a graph drawing function according to a triangle STRIP drawing rule GL _ TRIANGE _ STRIP, the target vertex space position coordinates and the element sequence of the target vertex data in a vertex array, and constructing a polygon corresponding to the target vertex data;
wherein the element sequence of the target vertex data in the vertex array is as follows: the element positions of the auxiliary vertex data in the vertex array are arranged behind the element positions of the required vertex data in the vertex array.
In a third aspect, an embodiment of the present invention further provides an apparatus, where the apparatus includes:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the OpenGLES-based image rendering method provided by any embodiment of the invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the OpenGLES-based image rendering method provided in any embodiment of the present invention.
On the basis of finding problems, namely finding the reason of rendering image abnormity during image rendering based on OpenGLES, when a demand polygon corresponding to an image to be rendered is constructed, on the basis of drawing error of the last triangle in the polygon due to abnormal vertex data transmission, auxiliary vertex data is added in target vertex data, and a polygon containing auxiliary triangles is constructed, so that the correctness of the demand polygon in the constructed polygon is ensured, the problem of rendering image abnormity during image rendering based on OpenGLES is solved, more accurate image rendering based on OpenGLES is realized, a display picture of an application program is more correct and smooth, and user experience is improved.
Drawings
Fig. 1 is a flowchart of an OpenGLES-based image rendering method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of an OpenGLES-based image rendering method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of an OpenGLES-based image rendering apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus in the fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
The OpenGLES-based image rendering method provided by the embodiment is applicable to the case of developing an image rendering application program by using an embedded open graphics library OpenGLES. The method may be performed by an OpenGLES-based image rendering apparatus, which may be implemented by software and/or hardware, and may be integrated in an OpenGLES-enabled device, such as a typical user terminal device, for example, a mobile phone, a tablet computer, or a desktop computer. Referring to fig. 1, the method of the present embodiment specifically includes the following steps:
s110, determining target vertex data according to the shape of the image to be rendered and the triangle drawing rule, wherein the target vertex data comprises required vertex data and auxiliary vertex data corresponding to the image to be rendered, and each vertex data comprises a spatial position coordinate and a texture coordinate.
The image to be rendered refers to a display image used for image rendering output, and may be, for example, a picture, a decoded video frame image, or a color image composed of a color array. The TRIANGLE drawing rule refers to a rule specified in OpenGLES for drawing a TRIANGLE, and examples thereof include a TRIANGLE column drawing rule GL _ TRIANGLES, a TRIANGLE stripe drawing rule GL _ TRIANGLE _ STRIP, and a TRIANGLE sector drawing rule GL _ TRIANGLE _ FAN. Here, the triangle stripe drawing rule GL _ triangle _ STRIP is a vertex multiplexing process when drawing a triangle, for example, if there are n vertices (n is greater than or equal to 3), n-2 triangles can be drawn (except that the first vertex and the last vertex cannot be reused, the remaining vertices can be reused), and when using this triangle drawing rule, 4 vertices are normally required for drawing a rectangle. The triangle column drawing rule GL _ TRIANGLES is used to draw a triangle, where all vertices cannot be multiplexed, for example, if there are n vertices (n is greater than or equal to 3), n/3 triangles can be drawn, and if n is not a multiple of 3, the remaining vertices are discarded, and if the triangle drawing rule is used, 6 vertices are normally required to draw a rectangle.
It should be noted that OpenGLES is a subset of an Open Graphics Library (OpenGL) three-dimensional Graphics Application Programming Interface (API), which is cut and customized from OpenGL, and removes many non-essential characteristics of complex primitives such as fixed point definition function glBegin/glEnd, quadrilateral (GL _ qu), polygon (GL _ polygon), etc., so drawing a polygon in OpenGLES is basically constructed by drawing a plurality of triangles.
The target vertex data refers to vertex data used to draw the target triangle. Correspondingly, the requirement vertex data refers to vertex data used for drawing the requirement triangle, and the auxiliary vertex data refers to vertex data used for drawing the auxiliary triangle. Here, the requirement triangle refers to a triangle for constituting a requirement polygon in conformity with the shape of the image to be rendered. The auxiliary triangle is at least one redundant triangle corresponding to the demand triangle, and functions to assist the demand polygon to be successfully drawn. And the target triangle is all triangles including the demand triangle and the auxiliary triangle. Each of the target vertex data, the desired vertex data, and the auxiliary vertex data includes spatial position coordinates and texture coordinates. Here, the spatial position coordinates are two-dimensional or three-dimensional coordinates that can represent the spatial position of the vertex. The texture coordinate is a coordinate used for texture addressing when sampling a texture, and the value interval is [0,1], which is usually manually set by a developer according to a texture range to be sampled.
Specifically, the main links for realizing the image rendering programming include vertex data construction, transmission of the vertex data to a shader, drawing of polygons in the shader, creation of textures and transmission of the textures to the shader, and mapping and outputting of the created textures to the polygons in the shader. In order to solve the problems in the embodiments of the present invention, the above-mentioned various links are analyzed and tested first, so as to determine the cause of the problem. For example, outputting the vertex data to detect whether the constructed vertex data is correct; outputting the vertex data again in the shader script to detect whether the transmission of the vertex data is correct or not; outputting the drawn polygon to detect whether the polygon drawing is correct; outputting texture data to detect the correctness of texture creation and the correctness of transmission; and outputting intermediate data in the texture mapping process to detect the correctness of the mapping process and the like.
After a plurality of tests, the reason for the failure of image rendering on the terminal equipment configured with the old display card is found to be that the vertex data is mistaken when being transmitted to the shader. Just because the display card is old, in the process of transmitting the vertex data from the central processing unit CPU to the display card GPU, the last vertex data is lost or the numerical value is tampered, so that the drawing of the last triangle fails, and the rendered image is distorted or broken. After the reason of image rendering failure is found, the embodiment of the invention adds the auxiliary vertex data on the basis of the original vertex data (the required vertex data) so as to ensure the correctness of the required vertex data in the data transmission process.
In specific implementation, the number of target vertexes to be created, namely the number of required vertexes and the number of auxiliary vertexes, is determined according to the shape of the image to be rendered and the selected triangle drawing rule. After the number of target vertices is determined, a corresponding amount of vertex data, i.e., spatial location coordinates in the target vertex data (i.e., target vertex spatial location coordinates) and texture coordinates in the target vertex data (i.e., target vertex texture coordinates), is further determined. More specifically, after the number of vertices of the corresponding type is determined, the corresponding vertex data of the corresponding number is further determined, such as spatial position coordinates in the required vertex data (i.e., required vertex spatial position coordinates), texture coordinates in the required vertex data (i.e., required vertex texture coordinates), spatial position coordinates in the auxiliary vertex data (i.e., auxiliary vertex spatial position coordinates), and texture coordinates in the auxiliary vertex data (i.e., auxiliary vertex texture coordinates).
It should be understood that, because the problem indicated in the present invention exists when an image rendering application is developed by using OpenGLES in a terminal device that is driven by a display card and is relatively old, and the auxiliary vertex data may reduce the running speed of the application to a certain extent, in order to increase the running speed of the application, before S110 is executed, a step of determining an application running environment may be added, for example, whether the display card belongs to the old display card may be determined according to display card information of a current terminal device where the application runs; and determining whether the rendering tool used by the current terminal equipment is OpenGLES or not according to the OpenGLES information query identifier. And triggering to execute S110 when the rendering tool used by the current terminal device is determined to be OpenGLES and the display card is an old display card.
And S120, constructing a polygon corresponding to the target vertex data according to the triangle drawing rule and the target vertex spatial position coordinates in the target vertex data.
Specifically, a plurality of triangles are drawn in sequence according to the selected triangle drawing rule and the target vertex space position coordinates, and the polygons corresponding to the target vertex data are directly constructed by the triangles. It should be noted that, since the last vertex data in the target vertex data may be lost or have an error, in the constructed polygon, the last triangle may fail to be drawn or may be distorted, and then there exists a part of the shape rule and a part of the shape fracture or distortion in the polygon, where the part of the shape rule at least includes the required polygon, and the part of the shape fracture or distortion is the part where the auxiliary triangle is located, which does not affect the correct construction of the required polygon.
Illustratively, constructing the polygon corresponding to the target vertex data according to the triangle drawing rule and the target vertex spatial position coordinates in the target vertex data includes: and calling a graph drawing function according to the triangle STRIP drawing rule GL _ TRIANGE _ STRIP, the target vertex space position coordinates and the element sequence of the target vertex data in the vertex array, and constructing a polygon corresponding to the target vertex data.
The vertex array refers to an array stored by target vertex data. In OpenGLES-based programming development, vertex data is stored and transmitted in array form. Illustratively, the order of the elements of the target vertex data in the vertex array is: the element positions of the auxiliary vertex data in the vertex array are arranged after the element positions of the required vertex data in the vertex array. That is, in the vertex array, the required vertex data is stored first, and then the auxiliary vertex data is stored. Therefore, when the target vertex data is transmitted to the graphics card GPU by the central processing unit CPU, the required vertex data is transmitted firstly, and then the auxiliary vertex data is transmitted, so that the required vertex data is transmitted to the graphics card GPU completely and correctly.
Specifically, according to the triangle STRIP drawing rule GL _ TRIANGE _ STRIP and the element sequence of the target vertex data in the vertex array, a graph drawing function glDrawArrays is called, vertices corresponding to the spatial position coordinates of the target vertex are connected in sequence, a triangle is drawn, and a polygon is constructed. Because the element position of the required vertex data is before the element position of the auxiliary vertex data, when the triangle is drawn, the required triangle is drawn firstly, and then the auxiliary triangle is drawn. In this way, the requirement triangle can be drawn correctly, and the correctness of the requirement polygon is ensured.
S130, image rendering is carried out according to the texture corresponding to the image to be rendered, the texture coordinates of the target vertex in the target vertex data and the polygon.
The texture is one or several two-dimensional graphics representing the details of the object surface, which is an OpenGLES cache for storing the color element values of the rendered image.
Specifically, according to a parallel mechanism of image rendering, while a polygon is constructed, a corresponding texture may be created according to an image to be rendered, for example, the image to be rendered is used as a function input parameter, a texture creating function gltexmmage 2D provided by OpenGLES is called, and the texture is created, that is, a texture corresponding to the image to be rendered may be obtained. And then, sampling the texture according to the texture coordinate of the target vertex to obtain a texture sampling result. If the target vertex texture coordinates are used as function input parameters, a texture sampling function texture provided by OpenGLES is called, and the obtained texture is sampled to determine the color corresponding to each pixel during image rendering, namely texture mapping. And finally, assigning the texture sampling result to the corresponding area of the rasterization result of the polygon constructed in the S120 to realize the texture mapping process so as to render the image.
According to the technical scheme, on the basis of finding problems, namely, the reason of rendering image abnormity during image rendering based on OpenGLES is found, when a demand polygon corresponding to an image to be rendered is constructed, on the basis of drawing error of the last triangle in the polygon due to abnormal transmission of vertex data, auxiliary vertex data is added in target vertex data, and a polygon containing auxiliary triangles is constructed, so that the correctness of the demand polygon in the constructed polygon is ensured, the problem of rendering image abnormity during image rendering based on OpenGLES is solved, more accurate image rendering based on OpenGLES is realized, a display picture of an application program is more correct and smooth, and user experience is improved.
Example two
In this embodiment, based on the first embodiment, further optimization is performed on "determining target vertex data according to the shape of the image to be rendered and the triangle drawing rule". Wherein explanations of the same or corresponding terms as those of the above embodiments are omitted. Referring to fig. 2, the OpenGLES-based image rendering method provided in this embodiment includes:
s210, determining required vertex data according to the shape of the image to be rendered and the triangle drawing rule.
Specifically, the number of required vertices is determined according to the shape of the image to be rendered and the selected triangle drawing rule. For example, if the shape of the image to be rendered is a rectangle and the selected TRIANGLE rendering rule is the TRIANGLE stripe rendering rule GL _ TRIANGLE _ STRIP, it may be determined that the number of vertices required is 4; if the selected triangle drawing rule is the triangle column drawing rule GL _ TRIANGLES, the number of the determined requirement vertices is 6. After the number of demand vertices is determined, the coordinate data for a corresponding number of demand vertices is further determined. For example, according to the screen size and the display size during image rendering, the spatial position coordinates of the required vertex are determined; and determining the texture coordinates of the required vertex according to the proportion of the image to be rendered which needs to be displayed when the image is rendered.
S220, determining the auxiliary vertex space position coordinates in the auxiliary vertex data according to the requirement vertex space position coordinates in the requirement vertex data so as to enable the polygon to be a convex polygon.
Specifically, since the auxiliary vertex data is for ensuring the correctness of the required vertex data, the required vertex data is determined first when determining the target vertex data. And then, determining the space position coordinates of the auxiliary vertexes according to the space position coordinates of the required vertexes and the rule limitation that the finally constructed polygon is a convex polygon.
Illustratively, the spatial location coordinates include an x-coordinate, a y-coordinate, and a z-coordinate;
correspondingly, determining the auxiliary vertex spatial position coordinates in the auxiliary vertex data according to the requirement vertex spatial position coordinates in the requirement vertex data comprises: setting an auxiliary vertex z coordinate in the auxiliary vertex space position coordinate as a required vertex z coordinate in the required vertex space position coordinate; and respectively setting an auxiliary vertex x coordinate and an auxiliary vertex y coordinate in the auxiliary vertex space position coordinate to be greater than or equal to a corresponding requirement vertex x coordinate and a corresponding requirement vertex y coordinate in the requirement vertex space position coordinate, wherein the auxiliary vertex x coordinate and the auxiliary vertex y coordinate are not equal to the corresponding requirement vertex x coordinate and the corresponding requirement vertex y coordinate at the same time.
Specifically, in order to make the polygon constructed according to the auxiliary vertex data and the required vertex data a convex polygon on a two-dimensional plane, so as not to affect the subsequent texture mapping process, in the embodiment of the present invention, an auxiliary vertex z coordinate in the auxiliary vertex space position coordinate is set as a required vertex z coordinate in the required vertex space position coordinate. Meanwhile, the auxiliary vertex x coordinate is set to be greater than or equal to the requirement vertex x coordinate, and the auxiliary vertex y coordinate is set to be greater than or equal to the requirement vertex y coordinate. The setting of the auxiliary vertex x coordinate and the auxiliary vertex y coordinate further needs to satisfy: when the auxiliary vertex x coordinate is equal to the requirement vertex x coordinate, the auxiliary vertex y coordinate is larger than the requirement vertex y coordinate; and when the auxiliary vertex y coordinate is equal to the requirement vertex y coordinate, the auxiliary vertex x coordinate is larger than the requirement vertex x coordinate, namely the auxiliary vertex x coordinate and the auxiliary vertex y coordinate are not equal to the corresponding requirement vertex x coordinate and the corresponding requirement vertex y coordinate at the same time.
And S230, determining auxiliary vertex texture coordinates in the auxiliary vertex data according to the required vertex texture coordinates in the required vertex data, so that texture sampling areas corresponding to the target vertex texture coordinates in the target vertex data are consistent with texture sampling areas corresponding to the required vertex texture coordinates.
Specifically, in order to enable the setting of the auxiliary vertex data not to affect the subsequent texture mapping process, the auxiliary vertex texture coordinates need to be determined according to the required vertex texture coordinates by limiting the rule that the texture sampling area defined by the texture coordinates is not changed after the auxiliary vertex data is set. For example, texture coordinate values may be taken on a vertex connection line corresponding to two required texture coordinates, and the texture coordinate values may be set as auxiliary vertex texture coordinates.
Illustratively, determining secondary vertex texture coordinates in the secondary vertex data from the demand vertex texture coordinates in the demand vertex data comprises: and setting the auxiliary vertex texture coordinates one by one as one of the texture coordinates of the required vertex.
Specifically, in order to more conveniently perform the setting of the auxiliary vertex texture coordinates, the auxiliary vertex texture coordinates are set as any one of the plurality of required vertex texture coordinates one by one in the present embodiment. That is, the value of the auxiliary vertex texture coordinate is directly one of the texture coordinates of the required vertex. Therefore, the auxiliary vertex texture coordinate is directly overlapped with the required vertex texture coordinate, the determination speed of the auxiliary vertex texture coordinate is improved, any change of a texture sampling area cannot be caused, and the correctness of the subsequent texture mapping process is further ensured.
It should be noted that the execution order of S220 and S230 is not limited herein, and S230 may be executed sequentially in the above order, or S220 may be executed before S230, or two steps may be executed in parallel.
S240, according to the triangle drawing rule and the target vertex space position coordinates in the target vertex data, a polygon corresponding to the target vertex data is constructed.
And S250, rendering the image according to the texture corresponding to the image to be rendered, the texture coordinates of the target vertex in the target vertex data and the polygon.
According to the technical scheme, the value limit of the polygon as the convex polygon is formed by additionally setting the auxiliary vertex space position coordinates, the value limit with the unchanged texture sampling area is additionally set for the auxiliary vertex texture coordinates, the accuracy of the construction of the required polygon and the accuracy of the texture mapping process can be further ensured, and therefore the image rendering output result is more accurate and smooth.
Exemplarily, on the basis of the above technical solution, the OpenGLES-based image rendering method provided in this embodiment further includes: determining the quantity of auxiliary vertex data corresponding to at least one auxiliary triangle according to a triangle drawing rule;
correspondingly, determining the auxiliary vertex space position coordinates in the auxiliary vertex data according to the requirement vertex space position coordinates in the requirement vertex data, and the method comprises the following steps: determining auxiliary vertex space position coordinates in the auxiliary vertex data according to the requirement vertex space position coordinates in the requirement vertex data;
correspondingly, determining the auxiliary vertex texture coordinates in the auxiliary vertex data according to the requirement vertex texture coordinates in the requirement vertex data, comprising: and determining the auxiliary vertex texture coordinates in the auxiliary vertex data according to the required vertex texture coordinates in the required vertex data.
Specifically, when the auxiliary vertex data is determined, the number of the auxiliary vertex data required for drawing at least one auxiliary triangle may be determined according to the selected triangle drawing rule, that is, the number of the auxiliary vertex data may be that one auxiliary triangle is drawn correspondingly, so as to reduce the data amount of the vertex data, or that a plurality of auxiliary triangles are drawn correspondingly, so as to further ensure the drawing accuracy of the required triangle. For example, if the selected TRIANGLE drawing rule is the TRIANGLE STRIP drawing rule GL _ TRIANGLE _ STRIP, the number of the auxiliary vertex data needs to be increased by one for each additional auxiliary TRIANGLE; and the selected triangle drawing rule is the triangle column drawing rule GL _ TRIANGLES, the number of the auxiliary vertex data needs to be increased by three for each additional auxiliary triangle.
Accordingly, S220 is: and determining the auxiliary vertex space position coordinates with the quantity corresponding to the auxiliary vertex data according to the required vertex space position coordinates and the rule limitation that the finally constructed polygon is a convex polygon. And S230 is: and determining auxiliary vertex texture coordinates with the quantity corresponding to the auxiliary vertex data according to the required vertex texture coordinates.
Further, according to the triangle drawing rule, determining the number of the auxiliary vertex data corresponding to at least one auxiliary triangle includes: and determining the number of auxiliary vertex data corresponding to one auxiliary triangle to be 1 according to a triangle STRIP drawing rule GL _ TRIANGE _ STRIP.
Specifically, since vertex data needs to be transmitted to the shader of OpenGLES for triangle drawing, in order to increase the data transmission speed and reduce the system overhead, only one auxiliary triangle needs to be drawn in excess in this embodiment. In order to further reduce the data amount of the vertex data and improve the data transmission speed, the triangle drawing rule selected in the embodiment is the triangle stripe drawing rule GL _ triangle _ STRIP, so that the number of the auxiliary vertex data corresponding to one auxiliary triangle is 1, that is, only 1 auxiliary vertex data needs to be added, and the purpose of correctly constructing the auxiliary demand polygon can be achieved.
Taking the shape of the image to be rendered as a rectangle and the selected triangle drawing rule as the triangle STRIP drawing rule GL _ triangle _ STRIP as an example, the determining the auxiliary vertex data according to the required vertex data may be: the required vertex spatial position coordinates are {0,0, 0}, {1,0,0}, {0,1,0}, and {1,1,0}, respectively, and the required vertex texture coordinates are {0,0}, {1,0}, {0,1}, and {1,1}, respectively. Then 1 auxiliary vertex spatial position coordinate may be set to any one of {1.01,0,0}, {0,1.01,0} and {1.01,1.01,0} and the corresponding auxiliary vertex texture coordinate may be set to any one of {0,0}, {1,0}, {0,1} and {1,1}, according to the convex shape definition rule.
The following is an embodiment of an OpenGLES-based image rendering device provided in an embodiment of the present invention, and the device and the OpenGLES-based image rendering method in the embodiments belong to the same inventive concept, and details that are not described in detail in the embodiment of the OpenGLES-based image rendering device may refer to the embodiment of the OpenGLES-based image rendering method.
EXAMPLE III
The present embodiment provides an OpenGLES-based image rendering apparatus, referring to fig. 3, the apparatus specifically includes:
a target vertex data determining module 310, configured to determine target vertex data according to the shape of the image to be rendered and the triangle drawing rule, where the target vertex data includes required vertex data and auxiliary vertex data corresponding to the image to be rendered, and each vertex data includes a spatial position coordinate and a texture coordinate;
a polygon construction module 320, configured to construct a polygon corresponding to the target vertex data according to the triangle drawing rule and the target vertex spatial position coordinates in the target vertex data determined by the target vertex data determination module 310;
the image rendering module 330 is configured to perform image rendering according to a texture corresponding to the image to be rendered, the texture coordinates of the target vertex in the target vertex data determined by the target vertex data determining module 310, and the polygon constructed by the polygon constructing module 320.
Optionally, the target vertex data determining module 310 includes:
the requirement vertex data determining submodule is used for determining requirement vertex data according to the shape and the triangle drawing rule;
the auxiliary vertex space position coordinate determination submodule is used for determining an auxiliary vertex space position coordinate in the auxiliary vertex data according to the requirement vertex space position coordinate in the requirement vertex data so as to enable the polygon to be a convex polygon;
and the auxiliary vertex texture coordinate determining submodule is used for determining an auxiliary vertex texture coordinate in the auxiliary vertex data according to the required vertex texture coordinate in the required vertex data so as to enable a texture sampling area corresponding to the target vertex texture coordinate in the target vertex data to be consistent with a texture sampling area corresponding to the required vertex texture coordinate.
Further, the spatial location coordinates include an x-coordinate, a y-coordinate, and a z-coordinate.
Accordingly, the auxiliary vertex spatial location coordinate determination submodule is specifically configured to:
setting an auxiliary vertex z coordinate in the auxiliary vertex space position coordinate as a required vertex z coordinate in the required vertex space position coordinate;
and respectively setting an auxiliary vertex x coordinate and an auxiliary vertex y coordinate in the auxiliary vertex space position coordinate to be greater than or equal to a corresponding requirement vertex x coordinate and a corresponding requirement vertex y coordinate in the requirement vertex space position coordinate, wherein the auxiliary vertex x coordinate and the auxiliary vertex y coordinate are not equal to the corresponding requirement vertex x coordinate and the corresponding requirement vertex y coordinate at the same time.
Further, the auxiliary vertex texture coordinate determination submodule is specifically configured to:
and setting the auxiliary vertex texture coordinates one by one as one of the texture coordinates of the required vertex.
Optionally, on the basis of the above apparatus, the apparatus further includes: the auxiliary vertex data quantity determining module is used for determining the quantity of auxiliary vertex data corresponding to at least one auxiliary triangle according to the triangle drawing rule;
accordingly, the auxiliary vertex spatial location coordinate determination submodule is specifically configured to:
determining auxiliary vertex space position coordinates in the auxiliary vertex data according to the requirement vertex space position coordinates in the requirement vertex data;
accordingly, the auxiliary vertex texture coordinate determination submodule is specifically configured to:
and determining the auxiliary vertex texture coordinates in the auxiliary vertex data according to the required vertex texture coordinates in the required vertex data.
Further, the auxiliary vertex data quantity determination module is specifically configured to:
and determining the number of auxiliary vertex data corresponding to one auxiliary triangle to be 1 according to a triangle STRIP drawing rule GL _ TRIANGE _ STRIP.
Optionally, the polygon construction module 320 is specifically configured to:
calling a graph drawing function according to a triangle STRIP drawing rule GL _ TRIANGE _ STRIP, the target vertex space position coordinates and the element sequence of the target vertex data in the vertex array, and constructing a polygon corresponding to the target vertex data;
the element sequence of the target vertex data in the vertex array is as follows: the element positions of the auxiliary vertex data in the vertex array are arranged after the element positions of the required vertex data in the vertex array.
Through the image rendering device based on the OpenGLES, the problem of abnormal rendering of images during image rendering based on the OpenGLES is solved, the image rendering based on the OpenGLES is more accurately performed, the display picture of an application program is more correct and smooth, and user experience is improved.
The OpenGLES-based image rendering device provided by the embodiment of the invention can execute the OpenGLES-based image rendering method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, in the embodiment of the OpenGLES-based image rendering apparatus, the units and modules included in the embodiment are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
Example four
Referring to fig. 4, the present embodiment provides an apparatus 400 comprising: one or more processors 420; the storage device 410 is configured to store one or more programs, and when the one or more programs are executed by the one or more processors 420, the one or more processors 420 implement the OpenGLES-based image rendering method according to the embodiment of the present invention, including:
determining target vertex data according to the shape of the image to be rendered and a triangle drawing rule, wherein the target vertex data comprises required vertex data and auxiliary vertex data corresponding to the image to be rendered, and each vertex data comprises a spatial position coordinate and a texture coordinate;
constructing a polygon corresponding to the target vertex data according to the triangle drawing rule and the target vertex spatial position coordinates in the target vertex data;
and rendering the image according to the texture corresponding to the image to be rendered, the texture coordinates of the target vertex in the target vertex data and the polygon.
Of course, those skilled in the art will understand that the processor 420 may also implement the technical solution of the OpenGLES-based image rendering method according to any embodiment of the present invention.
The apparatus 400 shown in fig. 4 is only an example and should not bring any limitations to the functionality or scope of use of the embodiments of the present invention.
As shown in fig. 4, the apparatus 400 includes a processor 420, a storage device 410, an input device 430, and an output device 440; the number of the processors 420 in the device may be one or more, and one processor 420 is taken as an example in fig. 4; the processor 420, the storage device 410, the input device 430 and the output device 440 of the apparatus may be connected by a bus or other means, for example, the bus 450 in fig. 4.
The storage device 410, as a computer-readable storage medium, may be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the OpenGLES-based image rendering method in the embodiments of the present invention (e.g., a target vertex data determination module, a polygon construction module, and an image rendering module in the OpenGLES-based image rendering device).
The storage device 410 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the storage 410 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the storage 410 may further include memory located remotely from the processor 420, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 430 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the apparatus. The output device 440 may include a display device such as a display screen.
EXAMPLE five
The present embodiments provide a storage medium containing computer-executable instructions for performing a method for OpenGLES-based image rendering when executed by a computer processor, the method comprising:
determining target vertex data according to the shape of the image to be rendered and a triangle drawing rule, wherein the target vertex data comprises required vertex data and auxiliary vertex data corresponding to the image to be rendered, and each vertex data comprises a spatial position coordinate and a texture coordinate;
constructing a polygon corresponding to the target vertex data according to the triangle drawing rule and the target vertex spatial position coordinates in the target vertex data;
and rendering the image according to the texture corresponding to the image to be rendered, the texture coordinates of the target vertex in the target vertex data and the polygon.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in the OpenGLES-based image rendering method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) to execute the OpenGLES-based image rendering method provided by the embodiments of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (9)
1. An OpenGLES-based image rendering method is characterized by comprising the following steps:
determining target vertex data according to the shape of the image to be rendered and a triangle drawing rule, wherein the target vertex data comprises required vertex data and auxiliary vertex data corresponding to the image to be rendered, and each vertex data comprises a spatial position coordinate and a texture coordinate;
according to the triangle drawing rule and the target vertex space position coordinates in the target vertex data, a polygon corresponding to the target vertex data is constructed;
performing image rendering according to the texture corresponding to the image to be rendered, the texture coordinates of the target vertex in the target vertex data and the polygon;
wherein, the determining the target vertex data according to the shape of the image to be rendered and the triangle drawing rule comprises:
determining the required vertex data according to the shape and the triangle drawing rule;
determining auxiliary vertex space position coordinates in the auxiliary vertex data according to the requirement vertex space position coordinates in the requirement vertex data so as to enable the polygon to be a convex polygon;
and determining auxiliary vertex texture coordinates in the auxiliary vertex data according to the required vertex texture coordinates in the required vertex data so as to enable a texture sampling area corresponding to the target vertex texture coordinates in the target vertex data to be consistent with a texture sampling area corresponding to the required vertex texture coordinates.
2. The method of claim 1, wherein the spatial location coordinates comprise an x-coordinate, a y-coordinate, and a z-coordinate;
determining the auxiliary vertex space position coordinates in the auxiliary vertex data according to the requirement vertex space position coordinates in the requirement vertex data comprises:
setting an auxiliary vertex z coordinate in the auxiliary vertex space position coordinate as a requirement vertex z coordinate in the requirement vertex space position coordinate;
respectively will supplementary summit x coordinate and supplementary summit y coordinate in the supplementary summit space position coordinate sets up to be greater than or equal to demand summit x coordinate and the demand summit y coordinate that corresponds in the demand summit space position coordinate, just supplementary summit x coordinate with supplementary summit y coordinate does not simultaneously equal to corresponding demand summit x coordinate and corresponding demand summit y coordinate.
3. The method of claim 1, wherein determining secondary vertex texture coordinates in the secondary vertex data from the demand vertex texture coordinates in the demand vertex data comprises:
and setting the auxiliary vertex texture coordinates one by one as one of the texture coordinates of the required vertex.
4. The method of claim 1, further comprising: determining the quantity of auxiliary vertex data corresponding to at least one auxiliary triangle according to the triangle drawing rule;
determining the auxiliary vertex space position coordinates in the auxiliary vertex data according to the requirement vertex space position coordinates in the requirement vertex data, wherein the determining comprises the following steps:
determining auxiliary vertex space position coordinates in the quantity of auxiliary vertex data according to the requirement vertex space position coordinates in the requirement vertex data;
determining auxiliary vertex texture coordinates in the auxiliary vertex data according to the required vertex texture coordinates in the required vertex data, wherein the determining comprises the following steps:
and determining the auxiliary vertex texture coordinates in the auxiliary vertex data according to the required vertex texture coordinates in the required vertex data.
5. The method of claim 4, wherein determining the amount of auxiliary vertex data corresponding to at least one auxiliary triangle according to the triangle drawing rule comprises:
and determining the number of auxiliary vertex data corresponding to one auxiliary triangle to be 1 according to a triangle STRIP drawing rule GL _ TRIANGE _ STRIP.
6. The method of claim 1, wherein the constructing the polygon corresponding to the target vertex data according to the triangle drawing rule and the target vertex spatial position coordinates in the target vertex data comprises:
calling a graph drawing function according to a triangle STRIP drawing rule GL _ TRIANGE _ STRIP, the target vertex space position coordinates and the element sequence of the target vertex data in a vertex array, and constructing a polygon corresponding to the target vertex data;
wherein the element sequence of the target vertex data in the vertex array is as follows: the element positions of the auxiliary vertex data in the vertex array are arranged behind the element positions of the required vertex data in the vertex array.
7. An OpenGLES-based image rendering apparatus, comprising:
the target vertex data determining module is used for determining target vertex data according to the shape of the image to be rendered and a triangle drawing rule, wherein the target vertex data comprises required vertex data and auxiliary vertex data corresponding to the image to be rendered, and each vertex data comprises a spatial position coordinate and a texture coordinate;
the polygon construction module is used for constructing a polygon corresponding to the target vertex data according to the triangle drawing rule and the target vertex spatial position coordinates in the target vertex data;
the image rendering module is used for rendering an image according to the texture corresponding to the image to be rendered, the texture coordinates of the target vertex in the target vertex data and the polygon;
wherein the target vertex data determination module comprises:
the required vertex data determining submodule is used for determining the required vertex data according to the shape and the triangle drawing rule;
the auxiliary vertex space position coordinate determination submodule is used for determining an auxiliary vertex space position coordinate in the auxiliary vertex data according to the requirement vertex space position coordinate in the requirement vertex data so as to enable the polygon to be a convex polygon;
and the auxiliary vertex texture coordinate determining submodule is used for determining an auxiliary vertex texture coordinate in the auxiliary vertex data according to the required vertex texture coordinate in the required vertex data so as to enable a texture sampling area corresponding to the target vertex texture coordinate in the target vertex data to be consistent with a texture sampling area corresponding to the required vertex texture coordinate.
8. A computer device, the device comprising:
one or more processors;
a storage device to store one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the OpenGLES-based image rendering method of any one of claims 1-6.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements an OpenGLES-based image rendering method according to any one of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810508764.XA CN108765539B (en) | 2018-05-24 | 2018-05-24 | OpenGLES-based image rendering method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810508764.XA CN108765539B (en) | 2018-05-24 | 2018-05-24 | OpenGLES-based image rendering method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108765539A CN108765539A (en) | 2018-11-06 |
CN108765539B true CN108765539B (en) | 2022-05-13 |
Family
ID=64005503
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810508764.XA Active CN108765539B (en) | 2018-05-24 | 2018-05-24 | OpenGLES-based image rendering method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108765539B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111275806A (en) * | 2018-11-20 | 2020-06-12 | 贵州师范大学 | Parallelization real-time rendering system and method based on points |
CN109698951B (en) * | 2018-12-13 | 2021-08-24 | 歌尔光学科技有限公司 | Stereoscopic image reproducing method, apparatus, device and storage medium |
CN111486854A (en) * | 2019-01-29 | 2020-08-04 | 阿里巴巴集团控股有限公司 | Method, system, equipment and storage medium for drawing roads in electronic map |
CN110599391B (en) * | 2019-06-17 | 2024-07-23 | 北京蓝亚盒子科技有限公司 | Graph drawing method and device, computer readable medium and equipment |
CN110570504B (en) * | 2019-09-06 | 2020-12-01 | 北京航天宏图信息技术股份有限公司 | Closed symbol drawing method and device, electronic equipment and storage medium |
CN112991214B (en) * | 2021-03-18 | 2024-03-08 | 成都极米科技股份有限公司 | Image processing method, image rendering method, image processing device and shadow equipment |
CN116597063B (en) * | 2023-07-19 | 2023-12-05 | 腾讯科技(深圳)有限公司 | Picture rendering method, device, equipment and medium |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102354144A (en) * | 2011-09-06 | 2012-02-15 | 北京联合大学 | Method for converting ladder diagram into PLC (Programmable Logic Controller) program command |
CN105701851A (en) * | 2014-11-28 | 2016-06-22 | 星际空间(天津)科技发展有限公司 | Three-dimensional rendering engine system based on geographical information |
CN106710003A (en) * | 2017-01-09 | 2017-05-24 | 成都品果科技有限公司 | Three-dimensional photographing method and system based on OpenGL ES (Open Graphics Library for Embedded System) |
KR20170090181A (en) * | 2016-01-28 | 2017-08-07 | 허상훈 | Apparatus and method for realizing augmented reality using fixed sculpture and flow type three-dimensional model |
CN107123139A (en) * | 2016-02-25 | 2017-09-01 | 夏立 | 2D to 3D facial reconstruction methods based on opengl |
CN107274482A (en) * | 2017-06-09 | 2017-10-20 | 大连海事大学 | Marine oil overflow visualization and exchange method based on texture projecting method |
CN107564089A (en) * | 2017-08-10 | 2018-01-09 | 腾讯科技(深圳)有限公司 | Three dimensional image processing method, device, storage medium and computer equipment |
CN107622519A (en) * | 2017-09-15 | 2018-01-23 | 东南大学 | Threedimensional model hybrid rending system and method based on mobile device |
CN107818591A (en) * | 2017-11-22 | 2018-03-20 | 深圳赛隆文化科技有限公司 | A kind of Fusion Modeling Method and system of virtual reality threedimensional model |
CN107845061A (en) * | 2017-11-10 | 2018-03-27 | 暴风集团股份有限公司 | Image processing method, device and terminal |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102663789A (en) * | 2012-04-19 | 2012-09-12 | 上海巨唐信息科技有限公司 | Method for performing triangularization on polygon containing holes and islands in two-dimensional plane |
CN103700060B (en) * | 2013-12-26 | 2016-09-21 | 北京大学 | A kind of polygonal quick visualization method of magnanimity arbitrary shape |
-
2018
- 2018-05-24 CN CN201810508764.XA patent/CN108765539B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102354144A (en) * | 2011-09-06 | 2012-02-15 | 北京联合大学 | Method for converting ladder diagram into PLC (Programmable Logic Controller) program command |
CN105701851A (en) * | 2014-11-28 | 2016-06-22 | 星际空间(天津)科技发展有限公司 | Three-dimensional rendering engine system based on geographical information |
KR20170090181A (en) * | 2016-01-28 | 2017-08-07 | 허상훈 | Apparatus and method for realizing augmented reality using fixed sculpture and flow type three-dimensional model |
CN107123139A (en) * | 2016-02-25 | 2017-09-01 | 夏立 | 2D to 3D facial reconstruction methods based on opengl |
CN106710003A (en) * | 2017-01-09 | 2017-05-24 | 成都品果科技有限公司 | Three-dimensional photographing method and system based on OpenGL ES (Open Graphics Library for Embedded System) |
CN107274482A (en) * | 2017-06-09 | 2017-10-20 | 大连海事大学 | Marine oil overflow visualization and exchange method based on texture projecting method |
CN107564089A (en) * | 2017-08-10 | 2018-01-09 | 腾讯科技(深圳)有限公司 | Three dimensional image processing method, device, storage medium and computer equipment |
CN107622519A (en) * | 2017-09-15 | 2018-01-23 | 东南大学 | Threedimensional model hybrid rending system and method based on mobile device |
CN107845061A (en) * | 2017-11-10 | 2018-03-27 | 暴风集团股份有限公司 | Image processing method, device and terminal |
CN107818591A (en) * | 2017-11-22 | 2018-03-20 | 深圳赛隆文化科技有限公司 | A kind of Fusion Modeling Method and system of virtual reality threedimensional model |
Non-Patent Citations (2)
Title |
---|
OpenGLES之纹理;Terrnce;《https://www.jianshu.com/p/1eb0814fe658》;20170510;第1-6页 * |
一种纹理映射算法的FPGA实现;程龙 等;《小型微型计算机***》;20091231;第30卷(第9期);第1855-1859页 * |
Also Published As
Publication number | Publication date |
---|---|
CN108765539A (en) | 2018-11-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108765539B (en) | OpenGLES-based image rendering method, device, equipment and storage medium | |
CN108765534B (en) | Image rendering method, device and equipment and storage medium | |
US11852499B2 (en) | Map rendering method and apparatus, computer device, and storage medium | |
EP4120199A1 (en) | Image rendering method and apparatus, and electronic device and storage medium | |
US9342430B2 (en) | Method of determining the state of a tile based deferred rendering processor and apparatus thereof | |
US20190325562A1 (en) | Window rendering method and terminal | |
CN105550973B (en) | Graphics processing unit, graphics processing system and anti-aliasing processing method | |
WO2023197762A1 (en) | Image rendering method and apparatus, electronic device, computer-readable storage medium, and computer program product | |
CN112230923A (en) | User interface rendering method, user interface rendering device and server | |
EP4290464A1 (en) | Image rendering method and apparatus, and electronic device and storage medium | |
CN111862204A (en) | Method for extracting visual feature points of image and related device | |
CN115908685A (en) | Scene rendering method, device, equipment and storage medium | |
CN108733602B (en) | Data processing | |
EP4270321A1 (en) | Graphic rendering method and apparatus, and storage medium | |
JP5242788B2 (en) | Partition-based performance analysis for graphics imaging | |
CN112465692A (en) | Image processing method, device, equipment and storage medium | |
CN113888684A (en) | Method and apparatus for graphics rendering and computer storage medium | |
CN113724364A (en) | Setting method and device for realizing shielding by utilizing polygon and no rendering of body | |
CN109767379B (en) | Data normalization processing method and device, storage medium and electronic equipment | |
US20230267570A1 (en) | Data Processing Method and Related Apparatus | |
CN115738254A (en) | Rendering method, device, equipment, readable storage medium and program product | |
CN116245995A (en) | Image rendering method, device and equipment | |
CN115373663A (en) | Image display method, image display device, computer equipment and storage medium | |
CN115779418A (en) | Image rendering method and device, electronic equipment and storage medium | |
CN116193050A (en) | Image processing method, device, equipment and storage medium |
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 |