CN108876883A - Texture creation method, device, equipment and storage medium based on OpenGLES - Google Patents

Texture creation method, device, equipment and storage medium based on OpenGLES Download PDF

Info

Publication number
CN108876883A
CN108876883A CN201810507382.5A CN201810507382A CN108876883A CN 108876883 A CN108876883 A CN 108876883A CN 201810507382 A CN201810507382 A CN 201810507382A CN 108876883 A CN108876883 A CN 108876883A
Authority
CN
China
Prior art keywords
texture
dimensions
adjustment
original
creation
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.)
Pending
Application number
CN201810507382.5A
Other languages
Chinese (zh)
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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810507382.5A priority Critical patent/CN108876883A/en
Publication of CN108876883A publication Critical patent/CN108876883A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping

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 a kind of texture creation method, device, equipment and storage medium based on OpenGLES.This method includes:Obtain the corresponding original texture size of texture creation data;Judge whether embedded open shape library OpenGLES supports texture dimensions to extend;If not supporting, determine that the corresponding adjustment texture dimensions of the texture creation data, the adjustment texture dimensions meet the texture creation rule of the embedded open shape library OpenGLES based on the original texture size;Function, creation texture corresponding with texture creation data are created based on texture creation data, the adjustment texture dimensions and texture.Texture is correctly created in image rendering application program through the above technical solutions, realizing, so that the application program comprising Video Rendering exports correct video image, improves user experience.

Description

Texture creation method, device, equipment and storage medium based on OpenGLES
Technical field
The present embodiments relate to graphics rendering techniques more particularly to a kind of texture creation method based on OpenGLES, Device, equipment and storage medium.
Background technique
Using embedded open shape library (Open Graphics Library for Embedded Systems, OpenGLES it during) carrying out Video Rendering exploitation, needs to create texture according to decoded video requency frame data, and according to wound The texture built carries out the rendering of image.
When creating texture, it will usually according to the corresponding picture traverse of video requency frame data and picture altitude, create identical ruler Very little texture.But if used OpenGLES version is 2.0 versions, and texture dimensions is not supported to extend GL_OES_ Texture_npot, then above-mentioned texture just will create failure, and then lead to the application program operation error comprising Video Rendering, Influence user experience.
Summary of the invention
The embodiment of the present invention provides a kind of texture creation method, device, equipment and storage medium based on OpenGLES, with Realization correctly creates texture in image rendering application program, so that the output of the application program comprising Video Rendering is correct Video image, improve user experience.
In a first aspect, the embodiment of the invention provides a kind of texture creation method based on OpenGLES, including:
Obtain the corresponding original texture size of texture creation data;
Judge whether embedded open shape library OpenGLES supports texture dimensions to extend;
If not supporting, the corresponding adjustment line ruler of the texture creation data is determined based on the original texture size Very little, the adjustment texture dimensions meet the texture creation rule of the embedded open shape library OpenGLES;
Function is created based on texture creation data, the adjustment texture dimensions and texture, creation is created with the texture Build the corresponding texture of data.
Optionally, described that the corresponding adjustment line ruler of the texture creation data is determined based on the original texture size It is very little, including:
With the original texture having a size of function input parameters, default texture dimensions Tuning function is called, determines the line The corresponding adjustment texture dimensions of reason creation data.
Wherein, the default texture dimensions Tuning function is achieved by the steps of the function of determining adjustment texture dimensions:
Determine the corresponding adjustment texture height of original texture height in the original texture size, the adjustment texture is high The Nth power value that degree is 2, the N are positive integer, and the adjustment texture height is greater than or equal to the original texture height, and institute The quotient of adjustment texture height and the original texture height is stated less than 2;
Determine that the corresponding adjustment texture width of original texture width in the original texture size, the adjustment texture are wide The M power value that degree is 2, the M are positive integer, and the adjustment texture width is greater than or equal to the original texture width, and institute The quotient of adjustment texture width and the original texture width is stated less than 2.
Further, the corresponding adjustment texture height of the determination original texture height includes:
The initial value of accumulative frequency I is set as 0, and determines that the original texture height is current adjustment height;
Obtain the quotient of current adjustment height with 2;
If quotient is greater than 0, the accumulative frequency I cumulative 1, and quotient is updated to currently to adjust height;
Return executes the step of quotient for obtaining current adjustment highly with 2, until quotient is equal to 0;
When the original texture height is greater than 2IWhen, by 2I+1It is determined as adjusting texture height;
When the original texture height is equal to 2IWhen, by 2IIt is determined as adjusting texture height;
The corresponding adjustment texture width of the determination original texture width includes:
The initial value of accumulative frequency J is set as 0, and determines that the original texture width is current adjustment width;
Obtain the quotient of current adjustment width and 2;
If quotient is greater than 0, the accumulative frequency J cumulative 1, and quotient is updated to currently to adjust width;
Return execute obtain current adjustment width with 2 quotient the step of, until quotient is equal to 0;
When the original texture width is greater than 2JWhen, by 2J+1It is determined as adjusting texture width;
When the original texture width is equal to 2JWhen, by 2JIt is determined as adjusting texture width.
Optionally, described to judge whether embedded open shape library OpenGLES supports that texture dimensions extension includes:
Using expanding query mark GL_EXTENSIONS as function input parameters, character string is called to obtain function GlGetString obtains function return value;
When not including texture dimensions extension identification strings in the function return value, the embedded open figure is judged Shape library OpenGLES does not support the texture dimensions to extend.
Optionally, it is described judge embedded open shape library OpenGLES whether support texture dimensions extend after, also Including:
If supporting, function, creation are created based on texture creation data, the original texture size and the texture Texture corresponding with texture creation data.
Optionally, described that data and the adjustment texture dimensions are created as function input parameters using the texture, call line Reason creation function, creation texture corresponding with texture creation data include:
According to the data format of texture creation data, the adjustment texture dimensions are corrected, obtain amendment texture dimensions;
Function, creation and the line are created based on texture creation data, the amendment texture dimensions and the texture The corresponding texture of reason creation data.
Second aspect, the texture creating device based on OpenGLES that the embodiment of the invention also provides a kind of, the device packet It includes:
Original texture dimension acquisition module, for obtaining the corresponding original texture size of texture creation data;
Texture dimensions extend judgment module, for judging whether embedded open shape library OpenGLES supports texture dimensions Extension;
Texture dimensions adjust module, for not supporting the texture dimensions in the embedded open shape library OpenGLES When extension, the corresponding adjustment texture dimensions of the texture creation data, the adjustment line are determined based on the original texture size Reason size meets the texture creation rule of the embedded open shape library OpenGLES;
Texture creation module, for creating function based on texture creation data, the adjustment texture dimensions and texture, Creation texture corresponding with texture creation data.
Optionally, the texture dimensions adjustment module is specifically used for:
With the original texture having a size of function input parameters, default texture dimensions Tuning function is called, determines the line The corresponding adjustment texture dimensions of reason creation data.
Further, on the basis of above-mentioned apparatus, which further includes:Default texture dimensions Tuning function realizes mould Block, for realizing the function of determining adjustment texture dimensions;The default texture dimensions Tuning function realizes that module includes:
Adjustment texture height determines submodule, for determining that the height of the original texture in the original texture size is corresponding Texture height is adjusted, the Nth power value that the adjustment texture height is 2, the N is positive integer, and the adjustment texture height is greater than Or it is equal to the original texture height, and the quotient of the adjustment texture height and the original texture height is less than 2;
Adjustment texture width determines submodule, for determining that the original texture width in the original texture size is corresponding Texture width is adjusted, the M power value that the adjustment texture width is 2, the M is positive integer, and the adjustment texture width is greater than Or it is equal to the original texture width, and the quotient of the adjustment texture width and the original texture width is less than 2.
Further, the adjustment texture height determines that submodule is specifically used for:
The initial value of accumulative frequency I is set as 0, and determines that the original texture height is current adjustment height;
Obtain the quotient of current adjustment height with 2;
If quotient is greater than 0, the accumulative frequency I cumulative 1, and quotient is updated to currently to adjust height;
Return executes the step of quotient for obtaining current adjustment highly with 2, until quotient is equal to 0;
When the original texture height is greater than 2IWhen, by 2I+1It is determined as adjusting texture height;
When the original texture height is equal to 2IWhen, by 2IIt is determined as adjusting texture height;
The adjustment texture width determines that submodule is specifically used for:
The initial value of accumulative frequency J is set as 0, and determines that the original texture width is current adjustment width;
Obtain the quotient of current adjustment width and 2;
If quotient is greater than 0, the accumulative frequency J cumulative 1, and quotient is updated to currently to adjust width;
Return execute obtain current adjustment width with 2 quotient the step of, until quotient is equal to 0;
When the original texture width is greater than 2JWhen, by 2J+1It is determined as adjusting texture width;
When the original texture width is equal to 2JWhen, by 2JIt is determined as adjusting texture width.
Optionally, the texture dimensions extension judgment module is specifically used for:
Using expanding query mark GL_EXTENSIONS as function input parameters, character string is called to obtain function GlGetString obtains function return value;
When not including texture dimensions extension identification strings in the function return value, the embedded open figure is judged Shape library OpenGLES does not support the texture dimensions to extend.
Optionally, the texture creation module is specifically used for:It is in the judgement embedded open shape library OpenGLES After no support texture dimensions extension, if the embedded open shape library OpenGLES supports the texture dimensions extension, Function is created based on texture creation data, the original texture size and the texture, creation creates number with the texture According to corresponding texture.
Optionally, the texture creation module is specifically used for:
According to the data format of texture creation data, the adjustment texture dimensions are corrected, obtain amendment texture dimensions;
Function, creation and the line are created based on texture creation data, the amendment texture dimensions and the texture The corresponding texture of reason creation data.
The third aspect, the embodiment of the invention also provides a kind of equipment, which includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes the texture creation method provided by any embodiment of the invention based on OpenGLES.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer Program, the computer program realize the texture provided by any embodiment of the invention based on OpenGLES when being executed by processor Creation method.
The embodiment of the present invention is by being based on line when embedded open shape library OpenGLES does not support texture dimensions to extend The corresponding original texture size of reason creation data is determined for compliance with the texture creation rule of the embedded open shape library OpenGLES Adjustment texture dimensions then, and function is created based on texture creation data, the adjustment texture dimensions and texture, creation and The texture creates the corresponding texture of data.It solves when carrying out image rendering using OpenGLES, according to original texture ruler The problem of very little creation texture fails, realizes and correctly creates texture, can reduce the error rate of program development, improves exploitation effect Rate improves user experience meanwhile, it is capable to which the application program comprising Video Rendering is made to export more correct video image.
Detailed description of the invention
Fig. 1 is the flow chart of texture creation method of one of the embodiment of the present invention one based on OpenGLES;
Fig. 2 be the texture coordinate in the embodiment of the present invention one and between texture dimensions relationship schematic diagram;
Fig. 3 is the flow chart of texture creation method of one of the embodiment of the present invention two based on OpenGLES;
Fig. 4 is the structural schematic diagram of texture creating device of one of the embodiment of the present invention three based on OpenGLES;
Fig. 5 is the structural schematic diagram of one of the embodiment of the present invention four equipment.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Texture creation method provided in this embodiment based on OpenGLES, is applicable to using embedded open shape library OpenGLES develops the case where image rendering application program.This method can be by being held based on the texture creating device of OpenGLES Row, the device can be realized that the device can integrate in the equipment for supporting OpenGLES by the mode of software and/or hardware, Such as be typically subscriber terminal equipment, such as mobile phone, tablet computer or desktop computer etc..Referring to Fig. 1, the method for the present embodiment Specifically comprise the following steps:
S110, the corresponding original texture size of texture creation data is obtained.
Wherein, texture is the width or a few width X-Y schemes for indicating body surface details, is one for saving rendering The OpenGL/OpenGLES of the color elements value of image is cached.Texture creation data refer to the basic data for being used to form texture, Such as can be picture, decoded video frame image data or the color array for characterizing image rendered color etc..Original texture Size refers to that texture creation data are corresponding, and the size for the texture that can be formed may include texture height and texture width etc..
Specifically, the data type according to belonging to texture creation data obtains the corresponding original line of texture creation data Manage size.For example, texture creation data are picture type, then can obtain picture by reading the attribute information of picture Height and width, as original texture size;It is decoded picture data type that texture, which creates data, then available view The height parameter and width parameter obtained in frequency frame data decoding process, as original texture size;It is face that texture, which creates data, Chromatic number group, then the corresponding color diagram of array can be obtained by the element number of array in the two-dimensional direction and Pixel Dimensions The width and height of picture, as original texture size.
S120, judge whether embedded open shape library OpenGLES supports texture dimensions to extend.
Wherein, OpenGLES is that the application of open graphic library (Open Graphics Library, OpenGL) 3-D graphic is compiled The subset of journey interface (Application Programming Interface, API) is directed to mobile phone, PDA and game host It waits embedded devices and designs.Here OpenGL, which refers to, defines one across programming language, cross-platform programming interface specification Profession figure API, it renders for two dimensional image or 3-D image, is one powerful, calls convenient bottom figure Shape library.OpenGLES is to cut to customize from OpenGL, eliminates the fixed point defined function glBegin/glEnd of pel, The characteristic of many not required that they be so such as the complexity pel such as quadrangle (GL_QUADS), polygon (GL_POLYGONS).Texture dimensions Extension refers to the software module that cooperation OpenGLES is used, and is used for when texture creates, original corresponding to texture creation data Beginning texture dimensions are automatically adjusted.In embodiments of the present invention, texture dimensions extension refers to entitled GL_OES_texture_ The extension of npot.
Specifically, when carrying out texture creation usually using OpenGLES, the texture that OpenGLES can be called to provide creates letter GlTextImage2D is counted, includes the dimensional parameters for the texture to be created, i.e. width width and height in the input parameter of the function Spend height.In OpenGLES, for texture dimensions, this numerical value for inputting parameter is provided with specific regulation (i.e. texture wound Build rule), the height number and width numerical value of such as input must be 2 power side, and be greater than or be equal to original texture size. That is, the texture dimensions numerical value in OpenGLES in texture creation function glTextImage2D is not any setting , developer needs the texture creation according to OpenGLES regular really when calling texture creation function glTextImage2D Fixed suitable texture dimensions numerical value.
In order to improve the calling convenience of above-mentioned texture creation function, OpenGLES supplier joined texture dimensions extension GL_OES_texture_npot.In this way, developer can be directly arranged on demand when texture dimensions input parameter is arranged Numerical value determines suitable texture dimensions numerical value without the texture creation rule again according to OpenGLES.But lowest version OpenGLES does not support texture dimensions to extend GL_OES_texture_npot such as 2.0 version of OpenGLES.At this moment, texture Dimensional values, which still need to create rule according to the texture of OpenGLES, to be determined.
And developer does not know whether its used OpenGLES supports usually when calling texture creation function Texture dimensions extend GL_OES_texture_npot's.At this moment, which it is direct would generally to be inputted parameter by developer It is set as original texture size, if the numerical value of the original texture size is unsatisfactory for the texture creation rule of OpenGLES, Texture creation just will fail.
The embodiment of the present invention is provided with extension branch before carrying out texture creation to improve the accuracy of texture creation The step of holding judgement, that is, judge whether embedded open shape library OpenGLES supports texture dimensions to extend.
Illustratively, judge whether embedded open shape library OpenGLES supports that texture dimensions extension includes:With extension Inquiry mark GL_EXTENSIONS is function input parameters, and character string is called to obtain function glGetString, obtains function and returns Return value;When not including texture dimensions extension identification strings in function return value, embedded open shape library is judged OpenGLES does not support texture dimensions to extend.
Wherein, expanding query mark GL_EXTENSIONS refers to what OpenGLES was provided, supports for obtaining OpenGLES The extension name of extension.Texture dimensions extension identification strings refer to the mark of texture dimensions extension, are character string forms.
Specifically, using expanding query mark GL_EXTENSIONS as function input parameters, character string is called to obtain function GlGetString obtains function return value.OpenGLES in the function return value comprising installing in present terminal equipment is supported All extensions extension name.Later, texture dimensions are searched in function return value extend identification strings GL_OES_ texture_npot.If extending identification strings GL_OES_texture_npot comprising texture dimensions in function return value, Illustrate that the OpenGLES installed in present terminal equipment supports texture dimensions extension GL_OES_texture_npot., whereas if Do not include texture dimensions in function return value and extend identification strings GL_OES_texture_npot, then illustrates that present terminal is set The OpenGLES of standby middle installation does not support texture dimensions to extend GL_OES_texture_npot.
If S130, not supporting, the corresponding adjustment texture dimensions of texture creation data are determined based on original texture size.
Wherein, adjustment texture dimensions refer to the texture dimensions after being adjusted to original texture size, the adjustment texture Size meets the texture creation rule of embedded open shape library OpenGLES.
Specifically, when S120 judges that OpenGLES does not support texture dimensions to extend GL_OES_texture_npot, explanation The texture dimensions input parameter of texture creation function needs to be configured according to the texture creation rule of OpenGLES.So, it presses Rule is created according to texture --- the texture dimensions of input must be 2 power side, and be greater than or be equal to original texture size, with It is sized adjustment process to be adjusted original texture size, is also possible in advance encapsulate the above-mentioned adjustment process that is sized For a texture dimensions Tuning function, the adjustment for realizing texture dimensions by calling the texture dimensions Tuning function.
S140, function is created based on texture creation data, adjustment texture dimensions and texture, creation creates data pair with texture The texture answered.
Specifically, after adjustment texture dimensions have been determined, the texture creation letter of OpenGLES offer can be called directly Number carries out the creation of texture.When it is implemented, the process can be using texture creation data and adjustment texture dimensions it is defeated as function Enter parameter, texture is called to create function glTextImage2D, creates the corresponding texture of texture creation data.B referring to fig. 2 is needed It is noted that since adjustment texture dimensions are greater than original texture size, then, it creates in texture 200 in addition to including original line It manages except the corresponding rectangular texture 201 of size, also comprising expanding the corresponding invalid texture 202 of size.
Illustratively, function is being created based on texture creation data, adjustment texture dimensions and texture, creation is created with texture After the corresponding texture of data, further include:According to original texture size and adjustment texture dimensions, texture coordinate is set, so that aobvious The texture shown is the corresponding texture part of original texture size.
Wherein, texture coordinate be when being sampled to texture, for texture addressing coordinate, value interval be [0, 1], usually developer is artificially arranged according to original texture size.Here, texture coordinate value 1 corresponds to the texture of creation Longest edge.That is, the texture of creation will do it scaling when texture sampling, so that longest edge corresponds to texture coordinate 1, Shorter edge then corresponds to a texture coordinate value less than 1.For example, with reference to Fig. 2 a, by taking rectangular texture 201 as an example, long side is corresponding In the coordinate value 1 of v axis, then then corresponding to the coordinate value 0.8 of u axis after short side bi-directional scaling.So, in order to only to entire Rectangular texture 201 samples, and developer would generally set texture coordinate to (0,0), (0,0.8) (1,0) and (1,0.8).
Specifically, since adjustment texture dimensions are generally larger than original texture size, then texture is sat in texture sampling Corresponding scale value 1 is the long side adjusted in texture dimensions, and the corresponding texture coordinate value of original texture size can accordingly become smaller.Ginseng Add Fig. 2 b, original texture size corresponds to rectangular texture 201, the corresponding creation texture 200 of adjustment texture dimensions, at this point, rectangular texture 201 corresponding texture coordinates are just no longer developer initially set (0,0), (0,0.8) (1,0) and (1,0.8).So, In order to guarantee that the region of final texture sampling still corresponds to original texture size, so that follow-up rendering is shown when showing Image it is correct, rather than include the error image of non-image areas, reset texture coordinate in the present embodiment, to realize pair The display for creating texture is cut.It specifically can be, original texture size and adjustment texture dimensions be divided by, acquired results are arranged For new texture coordinate, it is implemented as follows:
U1=(float) VideoWidth/ (float) textureWidth
V1=(float) VideoHeight/ (float) textureHeight
Wherein, u1 and v1 is respectively the abscissa and ordinate in new texture coordinate, VideoWidth and VideoHeight is respectively original texture width and original texture height in original texture size, textureWidth and TextureHeight is respectively the adjustment texture width and adjustment texture height adjusted in texture dimensions.
The technical solution of the present embodiment, by not supporting texture dimensions to extend in embedded open shape library OpenGLES When, based on the corresponding original texture size of texture creation data, it is determined for compliance with the texture of embedded open shape library OpenGLES The adjustment texture dimensions of rule are created, and function, creation and line are created based on texture creation data, adjustment texture dimensions and texture The corresponding texture of reason creation data.It solves when carrying out image rendering using OpenGLES, is created according to original texture size The problem of texture fails, realizes and correctly creates texture, can reduce the error rate of program development, improves development efficiency, together When, it enables to the application program comprising Video Rendering to export more correct video image, improves user experience.
Illustratively, based on the above technical solution, judging whether embedded open shape library OpenGLES props up After holding texture dimensions extension, further include:If supporting, letter is created based on texture creation data, original texture size and texture Number, creation texture corresponding with texture creation data.
Specifically, if S120 judges that OpenGLES supports texture dimensions extension GL_OES_texture_npot, illustrate line The texture dimensions input parameter of reason creation function can be the numerical value of any setting, then directly carries out line according to original texture size The creation of reason.Detailed process, which can be, creates data and original texture having a size of function input parameters with texture, calls texture wound Function glTextImage2D is built, the corresponding texture of texture creation data is created.
Embodiment two
The present embodiment on the basis of the above embodiment 1, to " based on original texture size determine texture create data pair The adjustment texture dimensions answered " are advanced optimized.On this basis, can also further to " based on texture creation data, Adjust texture dimensions and texture create function, creation texture corresponding with texture creation data " it optimizes.Wherein with it is above-mentioned each Embodiment is identical or the explanation of corresponding term details are not described herein.It is provided in this embodiment based on OpenGLES's referring to Fig. 3 Texture creation method includes:
S210, the corresponding original texture size of texture creation data is obtained.
S220, judge whether embedded open shape library OpenGLES supports texture dimensions to extend.
If S230, not supporting, with original texture having a size of function input parameters, default texture dimensions is called to adjust letter Number determines the corresponding adjustment texture dimensions of texture creation data.
Wherein, it presets texture dimensions Tuning function and refers to and encapsulate in advance, for realizing the letter of adjustment texture dimensions function Number.
Specifically, when S220 judges that OpenGLES does not support texture dimensions to extend GL_OES_texture_npot, according to Following implementation calls default texture dimensions Tuning function SizeAlign with original texture having a size of function input parameters, Obtain adjustment texture dimensions.
TextueWidth=SizeAlign (VideoWidth);
TextureHeight=SizeAlign (VideoHeight).
Illustratively, it presets texture dimensions Tuning function and is achieved by the steps of the function of determining adjustment texture dimensions: Determine the corresponding adjustment texture height of original texture height in original texture size, the Nth power value that adjustment texture height is 2, N It for positive integer, adjusts texture height and is greater than or equal to original texture height, and adjust the quotient of texture height and original texture height Less than 2;Determine that the corresponding adjustment texture width of original texture width in original texture size, adjustment texture width are M times of 2 Side's value, M is positive integer, and adjustment texture width is greater than or equal to original texture width, and adjustment texture width and original texture are wide The quotient of degree is less than 2.
Specifically, it presets and mainly realizes two step functions in texture dimensions Tuning function, respectively determine original texture The corresponding adjustment texture height of original texture height in size is corresponding with the original texture width in original texture size is determined Adjustment texture width.Adjustment texture height obtained and adjustment texture width collectively form adjustment texture dimensions.When original When the power side that texture height is 2, adjustment texture height value is original texture height;When original texture height is not 2 power When power, it is determined that it is closest with original texture height number, and it is greater than 2 power side's value of original texture height, and Determine it as adjustment texture height.Similarly, when original texture width is 2 power side, adjustment texture width value is Original texture width;When original texture width is not 2 power side, it is determined that closest with original texture width numerical value , and it is greater than 2 power side's value of original texture width, and determine it as adjustment texture width.
Above-mentioned determination and original texture width (height) numerical value are closest, and are greater than original texture width (height) The mode of 2 power in 2 power side's value, can be calculate original texture width (height) with 2 for bottom logarithm, and will obtain The logarithm obtained adds 1;It is also possible to original texture width (height) iterate to calculate the quotient with 2 for iteration initial value, until quotient It is 0, the number of iterations at this time adds 1 to be required values of powers.
Further, it is determined that the corresponding adjustment texture height of original texture height includes:Set the initial value of accumulative frequency I It is 0, and determines that original texture height is current adjustment height;Obtain the quotient of current adjustment height with 2;If quotient is greater than 0, add up Number I cumulative 1, and quotient is updated to currently to adjust height;Return executes the step of quotient for obtaining current adjustment highly with 2, directly It is equal to 0 to quotient;When original texture height is greater than 2IWhen, by 2I+1It is determined as adjusting texture height;When original texture height is equal to 2I When, by 2IIt is determined as adjusting texture height.Determine that the corresponding adjustment texture width of original texture width includes:Set accumulative frequency The initial value of J is 0, and determines that original texture width is current adjustment width;Obtain the quotient of current adjustment width and 2;If quotient is big In 0, then cumulative 1 accumulative frequency J, and quotient is updated to currently to adjust width;Return to the quotient for executing and obtaining current adjustment width and 2 The step of, until quotient is equal to 0;When original texture width is greater than 2JWhen, by 2J+1It is determined as adjusting texture width;Work as original texture Width is equal to 2JWhen, by 2JIt is determined as adjusting texture width.
Specifically, above-mentioned default texture dimensions Tuning function SizeAlign (n) is implemented as follows, and n can be adjustment Texture height or adjustment texture width:
A) defined variable i and t, and initializing i is 0;It states a tmp variable, and is initialized as SizeAlign function Parameter n;
B) by n divided by 2, and calculated result is assigned to n again.Judge whether n is equal to 0 at this time, if being not equal to 0, I is added 1 on the original basis, and continues to execute the step;If being equal to 0, the step is exited, into following step c)
C) value of 2 i power is calculated, and the value is assigned to t, and judge whether t is less than tmp variable, if it is less, By t multiplied by 2, and result is assigned to t again.
D) it is finally returned the value of t as the return value of the function.
Above-mentioned function return value is required adjustment texture width or adjustment texture height.The benefit being arranged in this way exists In function realizes logic it can be readily appreciated that safeguarding convenient for down-stream.
S240, the data format that data are created according to texture, amendment adjustment texture dimensions, obtain amendment texture dimensions.
Specifically, it if texture creation data are the data format of the subchannel of such as YUV or RGB, and is created needed for it Texture when being also multiple textures of subchannel, texture dimensions input parameter when each texture creates is in addition to OpenGLES's It is also related with specific data format except texture creation rule is related.For example, YUV420 decoded for video requency frame data For the image of format, the data volume in the channel Y is 2 times of the channel U and V channel data amount, is converted to by yuv format When rgb format, there is a situation where that adjacent data shares in the channel U and the channel V.It is adopted when so, in order to guarantee subsequent texture sampling The correctness of sample data, when creating texture, the texture dimensions input parameter of the corresponding Y texture in the channel Y is exactly the ruler of the image It is very little, and the texture dimensions of the corresponding U texture in the channel U and the channel V and V texture input parameter is then the half of the picture size.Cause This, after S230 obtains the corresponding adjustment texture dimensions of original texture size, it is also necessary to the number of data is created according to texture Adjustment texture dimensions are further corrected according to data format corresponding correcting mode according to format, obtain amendment line ruler It is very little, to be further ensured that the correctness of creation texture.
Such as data are created for the texture of above-mentioned YUV420 format, Y texture, U texture and V texture are being determined respectively Adjustment texture dimensions and then the corresponding adjustment texture dimensions of U texture and the corresponding adjustment texture dimensions of V texture are removed respectively 2, obtain the corresponding amendment texture dimensions of U texture and the corresponding amendment texture dimensions of V texture.
S250, function is created based on texture creation data, amendment texture dimensions and texture, creation creates data pair with texture The texture answered.
Specifically, data and amendment texture dimensions are created as function input parameters using texture, OpenGLES is called to provide Texture creates function, creation texture corresponding with texture creation data.
The technical solution of the present embodiment is that default texture dimensions adjust letter by the function package for adjusting texture dimensions Number can reduce the workload of developer, improve developer's development efficiency.By the data lattice for creating data according to texture Formula, amendment adjustment texture dimensions, can obtain more accurate texture dimensions, to further increase the accurate of texture creation Property.
Illustratively, based on the above technical solution, the line based on OpenGLES provided by the embodiment of the present invention Managing creation method further includes:Pre-packaged texture creation function is set, and pre-packaged texture creation function implements function such as:Obtain line The corresponding original texture size of reason creation data;Judge whether embedded open shape library OpenGLES supports texture dimensions to expand Exhibition;If not supporting, the corresponding adjustment texture dimensions of texture creation data are determined based on original texture size, adjust texture dimensions Meet the texture creation rule of embedded open shape library OpenGLES;Based on texture creation data, adjustment texture dimensions and line Reason creation function, creation texture corresponding with texture creation data.
Wherein, pre-packaged texture creation function is the customized texture that will realize that function carries out function encapsulation and obtains in advance Create function.
Specifically, a pre-packaged texture is set and creates function, in comprising default texture dimensions Tuning function and The texture that OpenGLES is provided creates function, this presets texture dimensions Tuning function for realizing the adjustment function of texture dimensions. When developer needs to carry out texture creation, calling directly the pre-packaged texture creation function can be obtained the texture of creation. Implementation procedure after pre-packaged texture creation function is called is:Obtain the corresponding original texture ruler of texture creation data It is very little, and judge whether embedded open shape library OpenGLES supports texture dimensions to extend GL_OES_texture_npot;If no It supports, then the default texture dimensions tune in pre-packaged texture creation function is called having a size of function input parameters with original texture Integral function determines the corresponding adjustment texture dimensions of standard original texture size;Data are created with texture and adjustment texture dimensions are Function input parameters, call the texture creation function in pre-packaged texture creation function, and creation is corresponding with texture creation data Texture.The advantages of this arrangement are as follows all voluntarily judging whether OpenGLES supports when developer need not create texture every time Texture dimensions extension, and when not supporting texture dimensions to extend, the function program of size adjusting is voluntarily write, but is called directly The pre-packaged texture provided creates function, improves the development efficiency of developer.
The embodiment of the texture creating device provided in an embodiment of the present invention based on OpenGLES below, the device with it is upper The texture creation method based on OpenGLES for stating each embodiment belongs to the same inventive concept, in the texture based on OpenGLES The detail content of not detailed description in the embodiment of creating device can refer to the above-mentioned texture creation method based on OpenGLES Embodiment.
Embodiment three
The texture creating device based on OpenGLES that the present embodiment provides a kind of, referring to fig. 4, which specifically includes:
Original texture dimension acquisition module 410, for obtaining the corresponding original texture size of texture creation data.
Texture dimensions extend judgment module 420, for judging whether embedded open shape library OpenGLES supports texture Size expansion.
Texture dimensions adjust module 430, for judging embedded open shape library in texture dimensions extension judgment module 420 When OpenGLES does not support texture dimensions to extend, the original texture size obtained based on original texture dimension acquisition module 410 is true Determine the corresponding adjustment texture dimensions of texture creation data, adjustment texture dimensions meet the line of embedded open shape library OpenGLES Reason creation rule.
Texture creation module 440, the adjustment line for being determined based on texture creation data, texture dimensions adjustment module 430 It manages size and texture creates function, creation texture corresponding with texture creation data.
Optionally, texture dimensions adjustment module 430 is specifically used for:
With original texture having a size of function input parameters, default texture dimensions Tuning function is called, determines that texture creates number According to corresponding adjustment texture dimensions.
Further, on the basis of above-mentioned apparatus, which further includes:Default texture dimensions Tuning function realizes mould Block, for realizing the function of determining adjustment texture dimensions;Default texture dimensions Tuning function realizes that module includes:
Adjustment texture height determines submodule, for determining the corresponding adjustment of the height of the original texture in original texture size Texture height, the Nth power value that adjustment texture height is 2, N is positive integer, and it is high that adjustment texture height is greater than or equal to original texture Degree, and the quotient of texture height and original texture height is adjusted less than 2;
Adjustment texture width determines submodule, for determining the corresponding adjustment of original texture width in original texture size Texture width, the M power value that adjustment texture width is 2, M is positive integer, and it is wide that adjustment texture width is greater than or equal to original texture Degree, and the quotient of texture width and original texture width is adjusted less than 2.
Further, adjustment texture height determines that submodule is specifically used for:
The initial value of accumulative frequency I is set as 0, and determines that original texture height is current adjustment height;
Obtain the quotient of current adjustment height with 2;
If quotient is greater than 0, accumulative frequency I cumulative 1, and quotient is updated to currently to adjust height;
Return executes the step of quotient for obtaining current adjustment highly with 2, until quotient is equal to 0;
When original texture height is greater than 2IWhen, by 2I+1It is determined as adjusting texture height;
When original texture height is equal to 2IWhen, by 2IIt is determined as adjusting texture height;
Adjustment texture width determines that submodule is specifically used for:
The initial value of accumulative frequency J is set as 0, and determines that original texture width is current adjustment width;
Obtain the quotient of current adjustment width and 2;
If quotient is greater than 0, accumulative frequency J cumulative 1, and quotient is updated to currently to adjust width;
Return execute obtain current adjustment width with 2 quotient the step of, until quotient is equal to 0;
When original texture width is greater than 2JWhen, by 2J+1It is determined as adjusting texture width;
When original texture width is equal to 2JWhen, by 2JIt is determined as adjusting texture width.
Optionally, texture dimensions extension judgment module 420 is specifically used for:
Using expanding query mark GL_EXTENSIONS as function input parameters, character string is called to obtain function GlGetString obtains function return value;
When not including texture dimensions extension identification strings in function return value, embedded open shape library is judged OpenGLES does not support texture dimensions to extend.
Optionally, texture creation module 440 is specifically used for:Judging whether embedded open shape library OpenGLES supports After texture dimensions extension, if embedded open shape library OpenGLES supports texture dimensions extension, number is created based on texture Function is created according to, original texture size and texture, and creation and texture create the corresponding texture of data.
Optionally, texture creation module 440 is specifically used for:
According to the data format of texture creation data, amendment adjustment texture dimensions obtain amendment texture dimensions;
Function is created based on texture creation data, amendment texture dimensions and texture, creation is corresponding with texture creation data Texture.
Three a kind of texture creating device based on OpenGLES through the embodiment of the present invention, solves and is using When OpenGLES carries out image rendering, the problem of failure according to original texture size creation texture, realizes and correctly create line Reason can reduce the error rate of program development, development efficiency be improved, meanwhile, it is capable to make the application program comprising Video Rendering More correct video image is exported, user experience is improved.
Any embodiment of that present invention can be performed in texture creating device based on OpenGLES provided by the embodiment of the present invention The provided texture creation method based on OpenGLES, has the corresponding functional module of execution method and beneficial effect.
It is worth noting that, in the embodiment of the above-mentioned texture creating device based on OpenGLES, included each list Member and module are only divided according to the functional logic, but are not limited to the above division, as long as can be realized corresponding Function;In addition, the specific name of each functional unit is also only for convenience of distinguishing each other, it is not intended to restrict the invention Protection scope.
Example IV
Referring to Fig. 5, a kind of equipment 500 is present embodiments provided comprising:One or more processors 520;Storage device 510, for storing one or more programs, when one or more programs are executed by one or more processors 520, so that one Or multiple processors 520 realize the texture creation method based on OpenGLES provided by the embodiment of the present invention, including:
Obtain the corresponding original texture size of texture creation data;
Judge whether embedded open shape library OpenGLES supports texture dimensions to extend;
If not supporting, the corresponding adjustment texture dimensions of texture creation data are determined based on original texture size, adjust line Reason size meets the texture creation rule of embedded open shape library OpenGLES;
Function is created based on texture creation data, adjustment texture dimensions and texture, creation is corresponding with texture creation data Texture.
Certainly, it will be understood by those skilled in the art that processor 520 can also realize that any embodiment of that present invention is provided The texture creation method based on OpenGLES technical solution.
The equipment 500 that Fig. 5 is shown is only an example, should not function to the embodiment of the present invention and use scope bring Any restrictions.
As shown in figure 5, the equipment 500 includes processor 520, storage device 510, input unit 530 and output device 540;The quantity of processor 520 can be one or more in equipment, in Fig. 5 by taking a processor 520 as an example;Place in equipment Reason device 520, storage device 510, input unit 530 can be connected with output device 540 by bus or other modes, in Fig. 5 For being connected by bus 550.
Storage device 510 is used as a kind of computer readable storage medium, and it is executable to can be used for storing software program, computer Program and module, such as the corresponding program instruction/module of the texture creation method based on OpenGLES in the embodiment of the present invention (for example, the original texture dimension acquisition module, texture dimensions extension in the texture creating device based on OpenGLES judge mould Block, texture dimensions adjustment module and texture creation module).
Storage device 510 can mainly include storing program area and storage data area, wherein storing program area can store operation Application program needed for system, at least one function;Storage data area, which can be stored, uses created data etc. according to terminal. In addition, storage device 510 may include high-speed random access memory, it can also include nonvolatile memory, for example, at least One disk memory, flush memory device or other non-volatile solid state memory parts.In some instances, storage device 510 It can further comprise the memory remotely located relative to processor 520, these remote memories can be by being connected to the network extremely Equipment.The example of above-mentioned network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Input unit 530 can be used for receiving the number or character information of input, and generate with the user setting of equipment with And the related key signals input of function control.Output device 540 may include that display screen etc. shows equipment.
Embodiment five
The present embodiment provides a kind of storage mediums comprising computer executable instructions, and computer executable instructions are by counting For executing a kind of texture creation method based on OpenGLES when calculation machine processor executes, this method includes:
Obtain the corresponding original texture size of texture creation data;
Judge whether embedded open shape library OpenGLES supports texture dimensions to extend;
If not supporting, the corresponding adjustment texture dimensions of texture creation data are determined based on original texture size, adjust line Reason size meets the texture creation rule of embedded open shape library OpenGLES;
Function is created based on texture creation data, adjustment texture dimensions and texture, creation is corresponding with texture creation data Texture.
Certainly, a kind of storage medium comprising computer executable instructions, computer provided by the embodiment of the present invention The method operation that executable instruction is not limited to the described above, can also be performed provided by any embodiment of the invention be based on Relevant operation in the texture creation method of OpenGLES.
By the description above with respect to embodiment, it is apparent to those skilled in the art that, the present invention It can be realized by software and required common hardware, naturally it is also possible to which by hardware realization, but in many cases, the former is more Good embodiment.Based on this understanding, technical solution of the present invention substantially in other words contributes to the prior art Part can be embodied in the form of software products, which can store in computer readable storage medium In, floppy disk, read-only memory (Read-Only Memory, ROM), random access memory (Random such as computer Access Memory, RAM), flash memory (FLASH), hard disk or CD etc., including some instructions are with so that a computer is set Standby (can be personal computer, server or the network equipment etc.) executes to be based on provided by each embodiment of the present invention The texture creation method of OpenGLES.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (10)

1. a kind of texture creation method based on OpenGLES, which is characterized in that including:
Obtain the corresponding original texture size of texture creation data;
Judge whether embedded open shape library OpenGLES supports texture dimensions to extend;
If not supporting, the corresponding adjustment texture dimensions of the texture creation data, institute are determined based on the original texture size State the texture creation rule that adjustment texture dimensions meet the embedded open shape library OpenGLES;
Function is created based on texture creation data, the adjustment texture dimensions and texture, creation creates number with the texture According to corresponding texture.
2. the method according to claim 1, wherein described determine the texture based on the original texture size The corresponding adjustment texture dimensions of data are created, including:
With the original texture having a size of function input parameters, default texture dimensions Tuning function is called, determines the texture wound Build the corresponding adjustment texture dimensions of data.
3. according to the method described in claim 2, it is characterized in that, the default texture dimensions Tuning function as follows Realize the function of determining adjustment texture dimensions:
Determine that the corresponding adjustment texture height of original texture height in the original texture size, the adjustment texture height are 2 Nth power value, the N are positive integer, and the adjustment texture height is greater than or equal to the original texture height, and the tune The quotient of whole texture height and the original texture height is less than 2;
Determine that the corresponding adjustment texture width of original texture width in the original texture size, the adjustment texture width are 2 M power value, the M are positive integer, and the adjustment texture width is greater than or equal to the original texture width, and the tune The quotient of whole texture width and the original texture width is less than 2.
4. according to the method described in claim 3, it is characterized in that, the corresponding adjustment line of the determination original texture height Managing height includes:
The initial value of accumulative frequency I is set as 0, and determines that the original texture height is current adjustment height;
Obtain the quotient of current adjustment height with 2;
If quotient is greater than 0, the accumulative frequency I cumulative 1, and quotient is updated to currently to adjust height;
Return executes the step of quotient for obtaining current adjustment highly with 2, until quotient is equal to 0;
When the original texture height is greater than 2IWhen, by 2I+1It is determined as adjusting texture height;
When the original texture height is equal to 2IWhen, by 2IIt is determined as adjusting texture height;
The corresponding adjustment texture width of the determination original texture width includes:
The initial value of accumulative frequency J is set as 0, and determines that the original texture width is current adjustment width;
Obtain the quotient of current adjustment width and 2;
If quotient is greater than 0, the accumulative frequency J cumulative 1, and quotient is updated to currently to adjust width;
Return execute obtain current adjustment width with 2 quotient the step of, until quotient is equal to 0;
When the original texture width is greater than 2JWhen, by 2J+1It is determined as adjusting texture width;
When the original texture width is equal to 2JWhen, by 2JIt is determined as adjusting texture width.
5. the method according to claim 1, wherein whether described judge embedded open shape library OpenGLES Support that texture dimensions extension includes:
Using expanding query mark GL_EXTENSIONS as function input parameters, character string is called to obtain function glGetString, Obtain function return value;
When not including texture dimensions extension identification strings in the function return value, the embedded open shape library is judged OpenGLES does not support the texture dimensions to extend.
6. the method according to claim 1, wherein being in the judgement embedded open shape library OpenGLES After no support texture dimensions extension, further include:
If supporting, function, creation and institute are created based on texture creation data, the original texture size and the texture State the corresponding texture of texture creation data.
7. the method according to claim 1, wherein described create data, the adjustment line based on the texture It manages size and texture creates function, creation texture corresponding with texture creation data includes:
According to the data format of texture creation data, the adjustment texture dimensions are corrected, obtain amendment texture dimensions;
Function is created based on texture creation data, the amendment texture dimensions and the texture, creation is created with the texture Build the corresponding texture of data.
8. a kind of texture creating device based on OpenGLES, which is characterized in that including:
Original texture dimension acquisition module, for obtaining the corresponding original texture size of texture creation data;
Texture dimensions extend judgment module, for judging whether embedded open shape library OpenGLES supports texture dimensions to expand Exhibition;
Texture dimensions adjust module, for not supporting the texture dimensions to extend in the embedded open shape library OpenGLES When, the corresponding adjustment texture dimensions of the texture creation data, the adjustment line ruler are determined based on the original texture size The very little texture creation rule for meeting the embedded open shape library OpenGLES;
Texture creation module, for creating function, creation based on texture creation data, the adjustment texture dimensions and texture Texture corresponding with texture creation data.
9. a kind of equipment, which is characterized in that the equipment includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now texture creation method based on OpenGLES as described in any in claim 1-7.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The texture creation method based on OpenGLES as described in any in claim 1-7 is realized when being executed by processor.
CN201810507382.5A 2018-05-24 2018-05-24 Texture creation method, device, equipment and storage medium based on OpenGLES Pending CN108876883A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810507382.5A CN108876883A (en) 2018-05-24 2018-05-24 Texture creation method, device, equipment and storage medium based on OpenGLES

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810507382.5A CN108876883A (en) 2018-05-24 2018-05-24 Texture creation method, device, equipment and storage medium based on OpenGLES

Publications (1)

Publication Number Publication Date
CN108876883A true CN108876883A (en) 2018-11-23

Family

ID=64333211

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810507382.5A Pending CN108876883A (en) 2018-05-24 2018-05-24 Texture creation method, device, equipment and storage medium based on OpenGLES

Country Status (1)

Country Link
CN (1) CN108876883A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111754607A (en) * 2019-03-27 2020-10-09 北京小米移动软件有限公司 Picture processing method and device, electronic equipment and computer readable storage medium
CN111862254A (en) * 2020-07-17 2020-10-30 福建天晴数码有限公司 Cross-rendering platform based material rendering method and system
CN112090084A (en) * 2020-11-23 2020-12-18 成都完美时空网络技术有限公司 Object rendering method and device, storage medium and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6744442B1 (en) * 2000-08-29 2004-06-01 Harris Corporation Texture mapping system used for creating three-dimensional urban models
US7136071B1 (en) * 2004-06-23 2006-11-14 Nvidia Corporation Method and apparatus for sampling non-power of two dimension texture maps
US20070257924A1 (en) * 2006-04-20 2007-11-08 Stmicroelectronics R&D (Shanghai) Co. Ltd. OpenGL to OpenGL/ES translator and OpenGL/ES simulator
CN103135973A (en) * 2011-11-30 2013-06-05 腾讯科技(深圳)有限公司 Rendering method and device for graphic image in interface engine
US8711166B1 (en) * 2011-02-25 2014-04-29 Google Inc. Simulating non power of two texture behavior
CN107194982A (en) * 2016-03-15 2017-09-22 阿里巴巴集团控股有限公司 Create texture atlas and texture atlas waits method, device and the equipment of set

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6744442B1 (en) * 2000-08-29 2004-06-01 Harris Corporation Texture mapping system used for creating three-dimensional urban models
US7136071B1 (en) * 2004-06-23 2006-11-14 Nvidia Corporation Method and apparatus for sampling non-power of two dimension texture maps
US20070257924A1 (en) * 2006-04-20 2007-11-08 Stmicroelectronics R&D (Shanghai) Co. Ltd. OpenGL to OpenGL/ES translator and OpenGL/ES simulator
US8711166B1 (en) * 2011-02-25 2014-04-29 Google Inc. Simulating non power of two texture behavior
CN103135973A (en) * 2011-11-30 2013-06-05 腾讯科技(深圳)有限公司 Rendering method and device for graphic image in interface engine
CN107194982A (en) * 2016-03-15 2017-09-22 阿里巴巴集团控股有限公司 Create texture atlas and texture atlas waits method, device and the equipment of set

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
MASON WOO: "《Direct 3D原理与API参考 下》", 哈尔滨工程大学出版社 *
MIRAGE520: "OpenGL纹理尺寸限制", 《CSDN博客,HTTPS://BLOG.CSDN.NET/MIRAGE520/ARTICLE/DETAILS/8247726/》 *
刘海飞等: "基于OpenGL的虚拟地表系统的实现", 《测绘与空间地理信息》 *
史扬等: "OpenGL ES图形标准在嵌入式系统中的应用", 《工业控制计算机》 *
如影随心: "OpenGL ES纹理尺寸限制的处理方法", 《新浪博客,HTTP://BLOG.SINA.COM.CN/U/1704927704》 *
钱谦等: "DirectShow在三维视频纹理中的应用", 《计算机仿真》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111754607A (en) * 2019-03-27 2020-10-09 北京小米移动软件有限公司 Picture processing method and device, electronic equipment and computer readable storage medium
CN111862254A (en) * 2020-07-17 2020-10-30 福建天晴数码有限公司 Cross-rendering platform based material rendering method and system
CN111862254B (en) * 2020-07-17 2023-06-16 福建天晴数码有限公司 Cross-rendering platform-based material rendering method and system
CN112090084A (en) * 2020-11-23 2020-12-18 成都完美时空网络技术有限公司 Object rendering method and device, storage medium and electronic equipment
CN112090084B (en) * 2020-11-23 2021-02-09 成都完美时空网络技术有限公司 Object rendering method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
US11481952B2 (en) Allocation of primitives to primitive blocks
CN110764850B (en) Interface display method, parameter assignment method, system and equipment
CN108876883A (en) Texture creation method, device, equipment and storage medium based on OpenGLES
CN108765534A (en) A kind of image rendering method, device, equipment and storage medium
CN111428457B (en) Automatic formatting of data tables
CN102970456B (en) Image forming apparatus, image forming apparatus control method, and program
EP2458872A1 (en) Adaptive method and system for encoding digital images for the internet
US20220139017A1 (en) Layer composition method, electronic device, and storage medium
US10109029B2 (en) Processing of primitive blocks in parallel tiling engine pipes
CN110609726B (en) Mapping processing method and device, computer readable storage medium and electronic equipment
CN112634406A (en) Method, device, electronic equipment, storage medium and program product for generating picture
US20180349444A1 (en) Glyph management in texture atlases
CN112114919B (en) Screen rotation display optimization method and device
CN113506305A (en) Image enhancement method, semantic segmentation method and device for three-dimensional point cloud data
CN117197292A (en) Method, apparatus, device and storage medium for generating image
JP5563545B2 (en) Information processing apparatus and method
CN110781440A (en) Container height adjusting method and device, computer equipment and storage medium
CN113608809B (en) Layout method, device, equipment, storage medium and program product of components
CN102263924B (en) Image processing method based on bicubic interpolation and image display method
CN114140619A (en) Image data generation method, model training method, device, equipment and medium
CN114154095A (en) Page picture generation method, device, equipment and storage medium
US20150128029A1 (en) Method and apparatus for rendering data of web application and recording medium thereof
KR20210143440A (en) Method for optimizing hardware structure of convolutional neural networks
US10075716B2 (en) Parallel encoding of weight refinement in ASTC image processing encoders
US20130155087A1 (en) System and method for configuring graphics register data and recording 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20181123

RJ01 Rejection of invention patent application after publication