A method for drawing text based on text feature points and texture characteristics

By using the GPU to calculate text feature points and texture characteristics, calculate the pixel data matrix of the text font and perform rotation matrix processing, it solves the jagged and super-resolution error display problems in traditional CPU text raster scanning, and improves the efficiency of text rendering. Precision and efficiency.

CN115115746BActive Publication Date: 2024-10-01THE 28TH RES INST OF CHINA ELECTRONICS TECH GROUP CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210773865.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-01
Publication Date
2024-10-01
Estimated Expiration
2042-07-01

AI Technical Summary

Technical Problem

Traditional CPUs have jagged and super-resolution error display effects when text raster scanning, especially blurry display after text rotation, mainly due to slow sampling speed and low pixel recognition efficiency.

Method used

Using a method based on text feature points and texture characteristics, the graphics processor GPU is used to perform image data operations, calculate the pixel data matrix of the text font, and perform text rendering through the rotation matrix to ensure the correctness of each pixel data.

Benefits of technology

It improves the accuracy and efficiency of text rendering, solves jagged and super-resolution error display problems, and ensures the accuracy of each pixel data after text rotation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115115746B_ABST
    Figure CN115115746B_ABST
Patent Text Reader

Abstract

The present invention provides a method for drawing text based on text feature points and texture characteristics, including: parsing the feature point matrix and shape style of the text, constructing an enlarged text feature point vector matrix, recalculating the matrix according to the rotation angle, constructing a corresponding texture unit based on the feature point vector matrix, calling a hardware graphics card (Graphics Processing Unit) calculation module to calculate the feature point vector matrix, and realizing high-definition rendering of the rotated text. The text rotation drawing method used in the present invention not only has the easy-to-use characteristics of the traditional text drawing method, but also can improve the rendering efficiency of the text after creating the rotated text texture by performing texture calculation based on the hardware graphics card resources. The present invention can be used in aspects such as map text annotation, scene layer text, and text graphic annotation, to improve the visibility and practicality of the map scene, and provide basic support for a wide range of application fields based on map products.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of image processing, and in particular relates to a method for drawing text based on text feature points and texture characteristics. Background Art

[0002] Computers mainly use central processing units (CPUs) to process complex logic such as graphic display. Due to the large number of CPU functional modules and complex computing environment, the data computing efficiency is low. Graphics processing units (GPUs) are developed to be responsible for image data computing. The data computing results are handed over to the CPU for raster display, which can maximize the efficiency of graphic display. When traditional CPUs perform raster scanning of text, erroneous display effects such as jagged and super-resolution will appear, mainly due to slow sampling speed and low pixel recognition efficiency; especially after the text is rotated, it will appear quite blurred. Summary of the invention

[0003] Purpose of the invention: The technical problem to be solved by the present invention is to provide a method for drawing text based on text feature points and texture characteristics in view of the deficiencies of the prior art, comprising the following steps:

[0004] Step 1, create a texture drawing graphics display interface, create a window object based on the open graphics library, and enable the texture creation function;

[0005] Step 2, collecting input text and determining the font style according to different characters;

[0006] Step 3, normalize each character to a standard 256*256 grid according to the font style, and obtain the pixel distribution of the character in each 1*1 grid;

[0007] Step 4, according to the pixel distribution of the font in the 1*1 grid, calculate the filling rate of the current grid and create the corresponding font feature point matrix;

[0008] Step 5: Based on the font feature point matrix, a plane rectangular coordinate system with the center point of the current 256*256 grid as the origin is constructed, and the vector distance between each grid position within the 256*256 grid range and the nearest text font itself is calculated to create a feature point vector matrix;

[0009] Step 6, constructing an enlarged feature point vector matrix;

[0010] Step 7, input the text rotation parameters and store them in the memory, with the clockwise direction being positive and the range being -360° to 360°;

[0011] Step 8, calculating the rotation matrix according to the text rotation parameters in step 7;

[0012] Step 9, calculating the feature point vector matrix after the text is rotated according to the enlarged feature point vector matrix in step 6 and the rotation matrix in step 7;

[0013] Step 10, according to the feature point vector matrix obtained in step 9, obtain the grid filling style after the current text is rotated to construct a texture unit, and draw the text based on the open graphics library.

[0014] Step 1 includes:

[0015] Step 1-1, create an OGL window, declare the version number, and initialize the OGL extension library and the OGL tool library;

[0016] Step 1-2, create a graphics rendering engine, set the data exchange context to keep the window double buffered, trigger the message sending mechanism and render a blank window;

[0017] Steps 1-3, turn on the texture rendering function, create texture vertices, set the rendering style, and complete the window drawing test based on the input texture pixels.

[0018] Step 2 includes:

[0019] Step 2-1, according to the input text, distinguish whether the current input character is Chinese, symbol, Arabic numeral or English letter, and obtain the corresponding text code;

[0020] Step 2-2, map the text to the graphics display program according to the text encoding.

[0021] Step 3 includes:

[0022] Step 3-1, normalize the text in the graphics display program to a 256*256 grid;

[0023] Step 3-2, obtain the pixel value of each 1*1 grid and store it in a matrix. The matrix size is 256 rows and 256 columns. The matrix value is the gray value of the current grid. Each pixel matrix stores the gray value of the current pixel from the nearest text content: First, calculate the gray value of each pixel, C R (x,y) represents the red vector value at the (x,y) position, C G (x,y) represents the green vector value at the (x,y) position, C B (x, y) represents the blue vector value at the (x, y) position, f(x, y) represents the calculated grayscale value, and a grayscale value greater than 0 indicates that the current pixel value has data content. The calculation formula is as follows:

[0024] f(x,y)=(CR (x,y)+C G (x,y)+C B (x,y)) / 3.

[0025] Step 4 includes:

[0026] Step 4-1, based on the gray value calculated at the 1*1 grid position, traverse each grid position, T represents the gray value threshold, when the current gray value is less than T, it is regarded as a blank pixel, f(x, y) takes the value of 0, when it is greater than or equal to T, f(x, y) takes the value of 1:

[0027]

[0028] Step 4-2, storing the current font feature point matrix.

[0029] Step 5 includes:

[0030] Step 5-1, based on the current font feature point matrix, construct a plane rectangular coordinate system C(x,y) with the center point of the matrix as the origin, with the right side as the positive direction of the x-axis and the upper side as the positive direction of the y-axis;

[0031] Step 5-2, calculate the vector distance from each grid position in the grid to the nearest grid with a value of 1, taking the current position to be calculated (P x ,P y ), to the nearest point with a value of 1 (P 1 x ,P 1 y )Distance;

[0032]

[0033] Step 5-3, rounding the calculated distance and storing it in the corresponding matrix to obtain the feature point vector matrix, and storing it.

[0034] Step 6 includes:

[0035] Step 6-1, expand the current feature point vector matrix, expand the matrix of 128 units in the upper, lower, left and right positions respectively, enlarge the size of the current 256*256 font from 256*256 to 512*512 when the text is rotated, and construct a feature point vector matrix that is twice enlarged before rotation;

[0036] Step 6-2, store the expanded feature point vector matrix Metrix.

[0037] Step 8 includes:

[0038] Step 8-1, obtain the text rotation parameters and calculate the rotation coefficient R in the x directionx (x) = cos(x), rotation coefficient R in the y direction y (x) = sin(x);

[0039] Step 8-2, calculate the rotation matrix Rotate according to the rotation coefficients in the x and y directions;

[0040]

[0041] Step 9 includes:

[0042] Step 9-1, obtaining the extended feature point vector matrix Metrix in step 6;

[0043] Step 9-2, obtain the rotation matrix Rotate in step 8;

[0044] Step 9-3, taking the center point of the expanded feature point vector matrix as the origin, constructing a plane rectangular coordinate system, and obtaining the coordinates Px, Py of the matrix in the plane rectangular coordinate system, where the value of each point is the feature point vector matrix value;

[0045] Step 9-4, calculating the feature point vector matrix after the text is rotated according to the coordinates Px, Py in the plane rectangular coordinate system and the rotation matrix;

[0046]

[0047] Step 10 includes:

[0048] Step 10-1, creating a texture unit according to the feature point vector matrix obtained in step 9;

[0049] Step 10-2, fill the current texture unit according to the texture vertex coordinates and display style created in step 1 to complete the drawing.

[0050] Compared with the prior art, the present invention has the following significant advantages: (1) The high efficiency of the graphics processing unit (GPU) in image data calculation is used to perform digital calculations on the pixel values ​​of the text, and after the calculation results are integrated with the central processing unit (CPU), rasterization scanning is performed to restore the text and render the text, which not only retains the fast computing capability of the GPU, but also fully calls on the CPU resources to achieve overall scheduling of the computer. (2) The feature points of the text model are extracted, the pixel data matrix of the text font is calculated, and the pixels are rotated again to solve the erroneous display effects such as jagged and super-resolution in text rendering, and the correctness of each pixel data after rotation is ensured, which can improve the rendering accuracy of the text model. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, and the above and / or other advantages of the present invention will become more clear.

[0052] Figure 1 It is a flow chart of the method of the present invention.

[0053] Figure 2 It is a text glyph diagram.

[0054] Figure 3 It is a text map grid position diagram.

[0055] Figure 4 It is a text feature point matrix diagram.

[0056] Figure 5 It is the rectangular coordinate diagram of the feature point matrix mapping plane.

[0057] Figure 6 It is the feature point vector matrix diagram.

[0058] Figure 7 It is a schematic diagram of the feature point vector matrix expansion. DETAILED DESCRIPTION

[0059] Combination Figure 1 The graphics processing algorithm for drawing rotating text based on the text feature point matrix and texture characteristics of the present invention includes the following steps:

[0060] Step 1: Create a texture drawing graphics display interface, create a window object based on the Open Graphics Library, and enable the texture creation function; specifically include:

[0061] Step 1-1, create an Open Graphics Library window, declare the version number, initialize the Open Graphics Library Extension Library (Extension Wrangler Library) and the Open Graphics Library Tool Library (Graphics Library Framework);

[0062] Step 1-2, create a graphics rendering engine, set the data exchange context to keep the window double buffered, trigger the message sending mechanism and render a blank window;

[0063] Steps 1-3, turn on the texture rendering function, create texture vertices, set the rendering style, and complete the window drawing test based on the input texture pixels.

[0064] Step 2: collect input text, distinguish whether the current input character is Chinese, symbol, Arabic numeral or English letter according to the Chinese character encoding national standard (GB2312-80) formulated by China in 1980, and determine the font style according to different characters;

[0065] Step 2-1, according to the input text, obtain the corresponding text code from the Chinese Character Coding National Standard (GB2312-80);

[0066] Step 2-2, map the text to the graphics display program according to the text encoding. Take the English letter "g" as an example, see Figure 2 shown.

[0067] Step 3: Normalize each character to a standard 256*256 grid according to the font style in step 2 (generally symbols and textures are measured as 256 pixels), and obtain the pixel distribution of the character in each 1*1 grid; specifically, the following steps are performed:

[0068] Step 3-1, normalize the text in the graphics display program to a 256*256 grid, see Figure 3 ;

[0069] Step 3-2, get the pixel value of each 1*1 grid and store it in a matrix with 256 rows and 256 columns. The matrix value is the gray value of the current grid. Each pixel matrix stores the gray value of the current pixel from the nearest text content: First calculate the gray value of each pixel, C R (x,y) represents the red vector value at the (x,y) position, C G (x,y) represents the green vector value at the (x,y) position, C B (x, y) represents the blue vector value at the (x, y) position, f(x, y) represents the calculated grayscale value, and a grayscale value greater than 0 indicates that the current pixel value has data content. The calculation formula is as follows:

[0070] f(x,y)=(C R (x,y)+C G (x,y)+C B (x,y)) / 3

[0071] Step 4: According to the distribution of the font in the 1*1 grid in step 3, calculate the filling rate of the current grid. When the filling rate is greater than or equal to 50%, the current grid is considered to be selected and the grid value is set to 1. When the filling rate is less than 50%, the current grid is considered to be unselected and the grid value is set to 0. Create a corresponding font feature point matrix: specifically including:

[0072] Step 4-1, according to the gray value calculated from the 1*1 grid position, traverse each grid position, T represents the gray value threshold, when the current gray value is less than T, it is regarded as a blank pixel, f(x, y) takes the value of 0, when it is greater than or equal to T, f(x, y) takes the value of 1, T is 50% in the present invention, see Figure 4 :

[0073]

[0074] Step 4-2, storing the current font feature point matrix;

[0075] Step 5: Based on the font feature point matrix created in step 4, a plane rectangular coordinate system with the center point of the current 256*256 grid as the origin is constructed, and the vector distance from each grid position within the 256*256 grid range to the nearest text font itself is calculated to create a feature point vector matrix; specifically, the following steps are included:

[0076] Step 5-1: Based on the current font feature point matrix, construct a plane rectangular coordinate system C(x,y) with the center point of the matrix as the origin, with the right side as the positive direction of the x-axis and the upper side as the positive direction of the y-axis. Figure 5 ;

[0077] Step 5-2, calculate the vector distance from each grid position in the grid to the nearest grid with a value of 1, taking the current position to be calculated (P x ,P y ), to the nearest point with a value of 1 (P 1 x ,P 1 y )Distance;

[0078]

[0079] Step 5-3, round the calculated distance and store it in the corresponding matrix to obtain the feature point vector matrix, and store it, see Figure 6 ;

[0080] Step 6: When the text is rotated, the current 256*256 font size is enlarged from 256*256 to 512*512, and a feature point vector matrix that is enlarged twice is constructed before rotation (the upper, lower, left, and right sides of the current 256*256 font are expanded by 128 in length respectively) to prevent the problem of feature point loss after rotation, and to construct an enlarged feature point vector matrix. Specifically, it includes:

[0081] Step 6-1, expand the current feature point vector matrix, and expand the matrix of 128 units in the upper, lower, left and right positions respectively, see Figure 7 ;

[0082] Step 6-2, storing the expanded feature point vector matrix Metrix;

[0083] Step 7: Enter the text rotation parameters and store them in the memory. The clockwise direction is positive and the range is -360° to 360°.

[0084] Step 8: Calculate the rotation matrix according to the text rotation parameters in step 7; specifically including:

[0085] Step 8-1, obtain the text rotation parameters and calculate the rotation coefficient R in the x direction x (x) = cos(x), rotation coefficient R in the y direction y (x) = sin(x);

[0086] Step 8-2, calculate the rotation matrix Rotate according to the rotation coefficients in the x and y directions;

[0087]

[0088] Step 9, calculating the character feature point enlarged rotation vector matrix according to the enlarged feature point vector matrix in step 6 and the rotation matrix in step 7; specifically comprising:

[0089] Step 9-1, obtaining the extended feature point vector matrix Metrix in step 6;

[0090] Step 9-2, obtain the rotation matrix Rotate in step 8;

[0091] Step 9-3, the center point of the expanded feature point vector matrix is ​​taken as the origin, a plane rectangular coordinate system is constructed, and the coordinates Px, Py of the matrix in the plane rectangular coordinate system are obtained, where the value of each point is the feature point vector matrix value;

[0092] Step 9-4, calculating the feature point vector matrix after the text is rotated according to the coordinates Px, Py in the plane rectangular coordinate system and the rotation matrix;

[0093] Step 10: According to the character feature point rotation vector matrix obtained in step 9, the grid filling style after the current text is rotated is obtained to construct a texture unit, and the text is drawn based on the Open Graphics Library.

[0094] Specifically include:

[0095] Step 10-1, creating a texture unit according to the character feature point vector matrix obtained in step 9;

[0096] Step 10-2, fill the current texture unit according to the texture vertex coordinates and display style created in step 1 to complete the drawing.

[0097] The present invention is further described in detail below in conjunction with embodiments:

[0098] This example relies on the GPU (Graphics Processing Unit) module that is specifically responsible for image data calculations. It performs rotation calculations on the text feature point vector matrix based on the rotation matrix, and uses the superiority of the GPU in data calculation to greatly improve the calculation efficiency of text pixels. At the same time, due to the use of the characteristic point vector matrix calculation method, the accurate position of the text edge pixels can still be retained after the text is rotated, solving the jagged, super-resolution and other erroneous display effects in text rendering, ensuring the correctness of each pixel data after rotation, and improving the rendering accuracy of the text model.

[0099] The flowchart of this example is as follows Figure 1 As shown, the graphics window object is initialized, and the text characters are rasterized and scanned with the help of the GPU's efficient computing feature. The feature point matrix of the current position is determined according to whether the grid position is filled, and the corresponding feature point vector matrix is ​​calculated from the feature point matrix and enlarged. The rotation matrix is ​​calculated according to the required rotation angle, and the enlarged feature point vector matrix and the rotation matrix are used to calculate the corresponding rotated feature point vector matrix. The text characters are restored according to the calculation results, and the window is rendered and drawn to improve the accuracy and efficiency of text drawing.

[0100] (1) According to the input text, the character style of the current text is determined according to the GB2312-80 standard Chinese character encoding, and a font template is created. The current font template is normalized to a 256*256 grid, and rasterization scanning is used to determine the text filling content of each grid position. The value of the current grid matrix is ​​determined according to the size of the filling rate, and the corresponding feature point matrix is ​​created.

[0101] (2) The vector distance from each pixel position to the nearest point is calculated from the feature point matrix to construct the corresponding feature point vector matrix. Since the matrix will expand to a certain extent in the up, down, left, and right directions of the original matrix during rotation, the feature point vector matrix is ​​first expanded, and the matrix is ​​expanded in the up, down, left, and right directions to obtain the enlarged feature point vector matrix.

[0102] (3) According to the text rotation angle input by the user, the corresponding rotation matrix is ​​calculated, and the rotated feature point vector matrix is ​​calculated by combining the enlarged feature point vector matrix and the rotation matrix to restore the rotated text pixels.

[0103] (4) A rendering texture unit is constructed based on the rotated text pixels to perform text rendering. It is possible to observe whether there are jagged errors on the edges of the rotated text characters. The text accuracy can be observed after zooming in and out.

[0104] In a specific implementation, the present application provides a computer storage medium and a corresponding data processing unit, wherein the computer storage medium can store a computer program, and when the computer program is executed by the data processing unit, the invention content of a method for drawing text based on text feature points and texture characteristics provided by the present invention and some or all steps in each embodiment can be executed. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0105] Those skilled in the art can clearly understand that the technical solutions in the embodiments of the present invention can be implemented by means of computer programs and their corresponding general hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention can be essentially or partly contributed to the prior art in the form of a computer program, i.e., a software product, which can be stored in a storage medium and includes several instructions for enabling a device including a data processing unit (which can be a personal computer, a server, a single-chip microcomputer, a MUU or a network device, etc.) to execute the methods described in various embodiments of the present invention or certain parts of the embodiments.

[0106] The present invention provides a method for drawing text based on text feature points and texture characteristics. There are many methods and ways to implement the technical solution. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the protection scope of the present invention. All components not specified in this embodiment can be implemented by existing technologies.

Claims

1. A method for drawing text based on text feature points and texture characteristics, characterized in that: The steps include: Step 1, create a texture drawing graphics display interface, create a window object based on the open graphics library, and enable the texture creation function; Step 2, collecting input text and determining the font style according to different characters; Step 3, normalize each character to a grid of standard size according to the font style, and obtain the pixel distribution of the character in each grid; Step 4, according to the pixel distribution of the font in the grid, calculate the filling rate of the current grid and create the corresponding font feature point matrix; Step 5: construct a plane rectangular coordinate system with the current grid center point as the origin according to the font feature point matrix, calculate the vector distance between each grid position within the grid range and the nearest text font itself, and create a feature point vector matrix; Step 6, constructing an enlarged feature point vector matrix; Step 7, input the text rotation parameters and store them in the memory, with the clockwise direction being positive and the range being -360° to 360°; Step 8, calculating the rotation matrix according to the text rotation parameters in step 7; Step 9, calculating the feature point vector matrix after the text is rotated according to the enlarged feature point vector matrix in step 6 and the rotation matrix in step 7; Step 10, according to the feature point vector matrix obtained in step 9, obtain the grid filling style after the current text is rotated to construct a texture unit, and draw the text based on the open graphics library.

2. The method according to claim 1, characterized in that Step 1 includes: Step 1-1, create an OGL window, declare the version number, and initialize the OGL extension library and the OGL tool library; Step 1-2, create a graphics rendering engine, set the data exchange context to keep the window double buffered, trigger the message sending mechanism and render a blank window; Steps 1-3, turn on the texture rendering function, create texture vertices, set the rendering style, and complete the window drawing test based on the input texture pixels.

3. The method according to claim 2, characterized in that Step 2 includes: Step 2-1, according to the input text, distinguish whether the current input character is Chinese, symbol, Arabic numeral or English letter, and obtain the corresponding text code; Step 2-2, map the text to the graphics display program according to the text encoding.

4. The method according to claim 3, characterized in that Step 3 includes: Step 3-1, normalize the text in the graphics display program to a 256*256 grid; Step 3-2, obtain the pixel value of each 1*1 grid and store it in a matrix. The matrix size is 256 rows and 256 columns. The matrix value is the gray value of the current grid. Each pixel matrix stores the gray value of the current pixel from the nearest text content: First, calculate the gray value of each pixel, C R (x, y) represents the red vector value at the (x, y) position, C G (x,y) represents the green vector value at the (x,y) position, C B (x, y) represents the blue vector value at the (x, y) position, f(x, y) represents the calculated grayscale value, and a grayscale value greater than 0 indicates that the current pixel value has data content. The calculation formula is as follows: f(x,y)=(C R (x,y)+C G (x,y)+C B (x,y)) / 3。 5. The method according to claim 4, characterized in that Step 4 includes: Step 4-1, based on the gray value calculated at the 1*1 grid position, traverse each grid position, T represents the gray value threshold, when the current gray value is less than T, it is regarded as a blank pixel, f(x, y) takes the value of 0, when it is greater than or equal to T, f(x, y) takes the value of 1: Step 4-2, storing the current font feature point matrix.

6. The method according to claim 5, characterized in that Step 5 includes: Step 5-1, based on the current font feature point matrix, construct a plane rectangular coordinate system C(x,y) with the center point of the matrix as the origin, with the right side as the positive direction of the x-axis and the upper side as the positive direction of the y-axis; Step 5-2, calculate the vector distance from each grid position inside the grid to the nearest grid with a value of 1, taking the current position to be calculated (P x ,P y ), to the nearest point with a value of 1 (P 1 x ,P 1 y )Distance; Step 5-3, rounding the calculated distance and storing it in the corresponding matrix to obtain the feature point vector matrix, and storing it.

7. The method according to claim 6, characterized in that Step 6 includes: Step 6-1, expand the current feature point vector matrix, expand the matrix of 128 units in the upper, lower, left and right positions respectively, enlarge the size of the current 256*256 font from 256*256 to 512*512 when the text is rotated, and construct a feature point vector matrix that is twice enlarged before rotation; Step 6-2, store the expanded feature point vector matrix Metrix.

8. The method according to claim 7, characterized in that Step 8 includes: Step 8-1, obtain the text rotation parameters and calculate the rotation coefficient R in the x direction x (x) = cos(x), rotation coefficient R in the y direction y (x) = sin(x); Step 8-2, calculate the rotation matrix Rotate according to the rotation coefficients in the x and y directions; 9. The method according to claim 8, characterized in that Step 9 includes: Step 9-1, obtaining the extended feature point vector matrix Metrix in step 6; Step 9-2, obtain the rotation matrix Rotate in step 8; Step 9-3, taking the center point of the expanded feature point vector matrix as the origin, constructing a plane rectangular coordinate system, and obtaining the coordinates Px, Py of the matrix in the plane rectangular coordinate system, where the value of each point is the feature point vector matrix value; Step 9-4, calculating the feature point vector matrix after the text is rotated according to the coordinates Px, Py in the plane rectangular coordinate system and the rotation matrix; 10. The method according to claim 9, characterized in that Step 10 includes: Step 10-1, creating a texture unit according to the feature point vector matrix obtained in step 9; Step 10-2, fill the current texture unit according to the texture vertex coordinates and display style created in step 1 to complete the drawing.