1) Field of the Invention
The present invention relates to a rendering apparatus that performs alpha blending (transparent rendering).
2) Description of the Related Art
A rendering apparatus, such as a computer and a car navigation system, displays an image on a display by reading out its image data from a frame buffer. In general, inexpensive and low-speed memories like a synchronous DRAM (SDRAM) are used as the frame buffer which requires a large capacity. The rendering apparatus can include, as well as the frame buffer, an expensive and high-speed synchronous RAM (SRAM) as a temporary memory with a small capacity. The rendering apparatus with the temporary memory can render the image at high speed, since the image data of which is written in the SRAM and read out from the SRAM to the frame buffer.
Such a rendering apparatus can render the image more rapidly if it is provided with a plurality of temporary memories and a plurality of rendering units actuated in parallel. However, one rendering unit has to refer to a temporary memory of another rendering unit because an image previously rendered is required in the alpha blending. Thus, the rendering apparatus which is merely provided with the temporary memory and the rendering unit in plural does not always operate correctly.
Therefore, as shown in
Alternatively, as shown in
On the other hand, there is a display control apparatus that performs transmission/non-transmission processing in display processing after performing the alpha blending in rendering processing. There is a method of setting a specific color as a transparent color and transmitting or not transmitting a color depending on whether the color is the specific color (see
The alpha blending in rendering processing is performed to an image in the frame buffer. The frame buffer is cleared with an initial value, which is 0 in general (that is, black). The alpha blending is performed to this initial image in which nothing is yet drawn.
The triangle 12 shown in
Furthermore, there is a display control apparatus that performs alpha blending, in stead of the transmission/non-transmission processing, in display processing after performing it in rendering processing (the alpha blending can be performed in display processing as well as in rendering processing). The alpha blending in display processing is a processing to blend a plurality of images created and stored in the frame buffer in rendering processing.
However, as explained above, the alpha blending in rendering processing is applied to the initial image of black. Thus, black color is transparent in the blended image. When this image is subjected to the alpha blending in display processing, a blackish color can be seen in the blended image which is displayed on a display. When the transmission/non-transmission processing is performed in display processing, in stead of the alpha blending, a non-transparent part has a blackish color on the display and is not blended with a background screen (see
Originally, as shown in
It is an object of the present invention to at least solve the problems in the conventional technology.
A rendering apparatus according to an aspect of the present invention blends a plurality of source images into a destination image stored in a frame buffer and renders a blended image of the source images and the destination image on a display. The rendering apparatus includes a temporary memory of higher speed and smaller capacity than the frame buffer; a calculating unit that calculates a first data and a second data without using the destination image and stores the first data and the second data in the temporary memory; and a blending unit that blends the source images into the destination image using the first data and the second data stored in the temporary memory to obtain the blended image, and stores the blended image in the frame buffer.
A rendering apparatus according to another aspect of the present invention blends a plurality of source images into a destination image stored in a frame buffer and renders a blended image of the source images and the destination image on a display. The rendering apparatus includes a temporary memory of higher speed and smaller capacity than the frame buffer; and a processor that executes a computer program. The computer program causes the processor to execute calculating a first data and a second data without using the destination image; storing the first data and the second data in the temporary memory; blending the source images into the destination image using the first data and the second data stored in the temporary memory to obtain the blended image; and storing the blended image in the frame buffer.
A display control apparatus according to still another aspect of the present invention displays an image on a display, and includes a first frame buffer; a second frame buffer; a first synthesizing unit that creates a first synthesized image by blending an image into another image stored in the first frame buffer, and stores the first synthesized image in the first frame buffer; a second synthesizing unit that creates a second synthesized image of the first synthesized image and a background image, and stores the second synthesized image in the second frame buffer; and a display control unit that displays the second synthesized image.
A display control apparatus according to still another aspect of the present invention displays an image on a display, and includes a first frame buffer; a second frame buffer; a processor that executes a computer program. The computer program causes the processor to execute creating a first synthesized image by blending an image into another image stored in the first frame buffer; storing the first synthesized image in the first frame buffer; creating a second synthesized image of the first synthesized image and a background image; and storing the second synthesized image in the second frame buffer. The display control apparatus further includes a display control unit that displays the second synthesized image.
The other objects, features, and advantages of the present invention are specifically set forth in or will become apparent from the following detailed description of the invention when read in conjunction with the accompanying drawings.
Exemplary embodiments of the present invention will be explained in detail with reference to the accompanying drawings.
In a first embodiment, calculation to a frame buffer and calculation to a temporary memory are performed separately. First, a method for the separation will be explained.
CF is a color code (image data) already stored in the frame buffer, and C1 is a color code (image data) to be blended into CF. A blend ratio of C1 is α1 (0.0 to 1.0). A blended color code C1F of CF and C1 is represented by the following expression (1).
C1F=α1C1+(1−α1)CF (1)
The color code CF in the frame buffer is overwritten by C1F according to alpha blending represented by expression (1). Next, a color code C2 is blended into C1F at a blend ratio α2 (0.0 to 1.0). A blended color code C21F of C1F and C2 is represented by the following expression (2).
C21F=α2C2+(1 −α2)C1F (2)
The color code C1F in the frame buffer is overwritten by C21F according to alpha blending represented by expression (2). Therefore, when a color code to be blended into C21F is C3 and a blend ratio is α3 (0.0 to 1.0), a blended color code C321F of C21F and C3 is represented by the following expression (3).
C321F=α3C3+(1 −α3)C21F (3)
Although not described here, results of subsequent alpha blending are calculated in the same manner. The expressions (1) to (3) can be modified as the following expressions (4) to (6), respectively.
Thus, calculation of C1′, C21′, and C321′, which can be calculated without referring to CF in the frame buffer at all, are separated from calculation of (1−α1)CF, (1−α2)(1−α1)CF, and (1−α3)(1−α2)(1−α1)CF. Therefore, when there are a plurality of temporary memories, it is possible to perform the calculation C1′, C21′, and C321′ independently and store the results in respective temporary memories.
Color codes and alpha elements, which are stored in the temporary memories at each stage, are C1′ and (1−α1) at the first stage, C21′ and (1−α2)(1−α1) at the second stage, and C321′ and (1−α3) (1−α2)(1−α1) at the third stage. Subsequently, in the same manner, color codes and alpha elements stored in the temporary memories are overwritten.
When the color code and the alpha element stored in the temporary memory are CT and αT, alpha blending to be performed between the temporary memory and the frame buffer is represented by the following expression (7).
CTF=CT+αTCF (7)
As described above, when there is a plurality of temporary memories, it is possible to calculate CT for the respective temporary memories independently. However, when the calculation (7) is performed between the temporary memories and the frame buffer, the order of assigning color code in each temporary memory to CT Of expression (7) is required to be adjusted to the order of rendering instructions.
That is, when rendering based on first to fifth rendering instructions is applied to a first temporary memory and rendering based on sixth to tenth rendering instructions is applied to a second temporary memory, it is possible to perform the calculation of CT for the respective temporary memories in parallel. Concerning the final calculation of CTF between the temporary memories and the frame buffer, the calculation for the first temporary memory is performed first and, then, the calculation for the second temporary memory is performed, whereby it is possible to keep consistency of the calculation.
Next, a specific constitution of the first embodiment will be explained.
Next, structures of the first temporary memory rendering unit 23 and the second temporary memory rendering unit 24 will be explained. However, the second temporary memory rendering unit 24 has the same structure as the first temporary memory rendering unit 23. Thus, only the first temporary memory rendering unit 23 will be explained.
In the following explanation, a color code and a blend ratio already calculated and stored in the temporary memory 26 are Ct and αt, respectively. A color code and a blend ratio of an image to be blended into the temporary memory 26 are C and α, respectively.
The first subtracter 31 subtracts the color code Ct from the color code C. The first multiplier 32 multiplies an output of the first subtracter 31 by the blend ratio α.
The first adder 33 adds the color code C to an output of the first multiplier 32. An output Ct′ of the first adder 33 is stored in the temporary memory 26 as a new color code. In the next stage, Ct′ is used as the color code Ct.
The second subtracter 34 subtracts the blend ratio α from 1. The second multiplier 35 multiplies an output of the second subtracter 34 by the blend ratio αt. An output αt′ of the second multiplier 35 is stored in the temporary memory 26 as a new blend ratio. In the next stage, αt′ is used as the blend ratio αt.
Next, a structure of the frame buffer rendering unit 22 will be explained. In the following explanation, a color code and a blend ratio stored in the temporary memory 26 are Ct and αt, respectively, and a color code of an image stored in the frame buffer 21 is Cf.
The third multiplier 36 multiplies the color code Cf by the blend ratio αt. The second adder 37 adds the color code Ct to an output of the third multiplier 36. An output Cf′ of the second adder 37 (CTF in expression (7)) is stored in the frame buffer 21 as a new color code. In the next calculation between the temporary memory 27 and the frame buffer 21, Cf′ is used as the color code Cf of the image stored in the frame buffer 21.
Next, an operation of the rendering apparatus 20 in the first embodiment will be explained. First, the first temporary memory 26 and the second temporary memory 27 are cleared with C=0 and α=1.0 in advance, to set Ct to αC and αt to (1−α).
First, the distributing unit 25 allocates an area A (for example, an area of 64×64 pixels), in which a figure is rendered according to a rendering instruction, to the first temporary memory 26. As long as the figure is within the area A, the distributing unit 25 continues to send the rendering instruction to the first temporary memory rendering unit 23, which applies rendering processing to the first temporary memory 26 according to the sent rendering instruction.
When the figure deviates from the area A while the rendering processing is applied to the first temporary memory 26, the distributing unit 25 allocates a new area B (for example, an area of 64×64 pixels), which includes the figure deviating from the area A, to the second temporary memory 27. A color code and an alpha element stored in the first temporary memory 26 at this point are C1T and α1T, respectively.'
As long as the figure is within the area B, the distributing unit 25 continues to send the rendering instruction to the second temporary memory rendering unit 24, which applies rendering processing to the second temporary memory 27 according to the sent rendering instruction. On the other hand, the frame buffer rendering unit 22 performs blend processing between the first temporary memory 26 and the frame buffer 21 and writes a result of the blend processing in the frame buffer 21.
As described above, the color code and the alpha element stored in the first temporary memory 26 are C1T and α1T, respectively. When a color code written in the frame buffer 21 is CF, the color code C1F, which is written in the frame buffer 21 anew according to blend processing between the first temporary memory 26 and the frame buffer 21, is represented by the following expression (8).
C1F=C1T+α1TCF (8)
When the figure deviates from the area B while the rendering processing is applied to the second temporary memory 27, the distributing unit 25 allocates a new area C (for example, an area of 64×64 pixels) including the figure deviating from the area B to the first temporary memory 26. A color code and an alpha element stored in the second temporary memory 27 at this point are C2T and α2T, respectively.
As long as the figure is within the area C, the distributing unit 25 continues to send the rendering instruction to the first temporary memory rendering unit 23, which applies rendering processing to the first temporary memory 26 according to the sent rendering instruction. On the other hand, the frame buffer rendering unit 22 performs blend processing between the second temporary memory 27 and the frame buffer 21 and writes a result of the blend processing in the frame buffer 21.
As described above, the color code and the alpha element stored in the second temporary memory 27 are C2T and α2T, respectively, and the color code in the frame buffer 21 is C1F. Therefore, a color code C2F represented by the following expression (9) is written in the frame buffer 21 anew.
C2F=C2T+α2TC1F (9)
Thereafter, the rendering processing applied to the first temporary memory 26 and the rendering processing applied to the second temporary memory 27 are repeated alternately.
Note that it is also possible to use software to realize the operation of the rendering apparatus 20 in the first embodiment. In this case, a not-shown processing device executes a program of a flowchart shown in
The flowchart shown in
When the figure deviates from the area A while the rendering processing is applied to the first temporary memory 26 (“No” at step S402), the processing device informs a program 2 of the deviation of the figure from the area A (step S404). In the program 2, the processing device allocates the area B to the second temporary memory 27 (step S406). As long as the figure is within the area B (“Yes” at step S407), the processing device applies the rendering processing to the second temporary memory 27 (step S408).
In the program 1, the processing device performs blend processing between the first temporary memory 26 and the frame buffer 21 and writes a result of the blend processing in the frame buffer 21 (step S405). On the other hand, when the figure deviates from the area B while the rendering processing is applied to the second temporary memory 27 (“No” at step S407), the processing device informs the program 1 of the deviation of the figure from the area B (step S409).
The processing device performs blend processing between the second temporary memory 27 and the frame buffer 21 and writes a result of the blend processing in the frame buffer 21 (step S410). In the program 1, the processing device allocates the area C to the first temporary memory 26 (step S401). Thereafter, the processing device executes steps S402 to S405.
According to the first embodiment, the first temporary memory rendering unit 23 and the second temporary memory rendering unit 24 can perform blend processing independently, to realize high-speed rendering. Furthermore, the blend processing is performed according to the order of rendering instructions, to perform alpha blending correctly.
The temporary memory rendering unit 43 is the same as the first temporary memory rendering unit 23 and the second temporary memory rendering unit 24 in the first embodiment. Therefore, an explanation of the temporary memory rendering unit 43 is omitted. Note that, in the second embodiment, components same as those in the first embodiment are denoted by reference numerals and signs identical to those in the first embodiment and explanations of the components are omitted.
Next, an operation of the rendering apparatus 40 in the second embodiment will be explained. First, the first temporary memory 26 and the second temporary memory 27 are cleared with C=0 and α=1.0 in advance. The first selecting unit 44 allocates a 64×64 pixel area (an area A), in which a figure drawn according to a rendering instruction is placed, to the first temporary memory 26. As long as a figure drawn according to a rendering instruction is within the area A, the first selecting unit 44 continues to select the first temporary memory 26. Consequently, the temporary memory rendering unit 43 applies rendering processing to the first temporary memory 26 according to the sent rendering instruction.
On the other hand, the second selection unit 45 selects the second temporary memory 27. The frame buffer rendering unit 22 performs blend processing between the second temporary memory 27 and the frame buffer 21 and writes a result of the blend processing in the frame buffer 21.
When a figure drawn according to a rendering instruction deviates from the area A while the rendering processing is applied to the first temporary memory 26, the result of the blend processing performed between the second temporary memory 27 and the frame buffer 21 is written in the frame buffer 21. Then, the selecting unit 44 allocates a new 64×64 pixel area including the figure deviating from the area A to the second temporary memory 27. A color code and an alpha element recorded in the first temporary memory 26 at this point are C1T and α1T, respectively.
As long as a figure drawn according to a rendering instruction is within the area B, the first selecting unit 44 continues to select the second temporary memory 27. Consequently, the temporary memory rendering unit 43 applies rendering processing to the second temporary memory 27 according to the sent rendering instruction.
On the other hand, the second selecting unit 45 selects the first temporary memory 26. The frame buffer rendering unit 22 performs blend processing between the first temporary memory 26 and the frame buffer 21 and writes a result of the blend processing in the frame buffer 21. The color code C1F represented by expression (8) is written in the frame buffer 21 anew.
When a figure drawn according to a rendering instruction deviates from the area B while the rendering processing is applied to the second temporary memory 27, the result of the blend processing performed between the first temporary memory 26 and the frame buffer 21 is written in the frame buffer 21. Then, the first selecting unit 44 allocates a new 64×64 pixel area (an area C) including the figure deviating from the area B to the first temporary memory 26. A color code and an alpha element recorded in the second temporary memory 27 at this point are C2T and α2T, respectively.
As long as a figure drawn according to a rendering instruction is within the area C, the first selecting unit 44 continues to select the first temporary memory 26. Consequently, the temporary memory rendering unit 43 applies rendering processing to the first temporary memory 26 according to the sent rendering instruction.
On the other hand, the second selecting unit 45 selects the second temporary memory 27. The frame buffer rendering unit 22 performs blend processing between the second temporary memory 27 and the frame buffer 21 and writes a result of the blend processing in the frame buffer 21. The color code C2F represented by expression (9) is written in the frame buffer 21 anew.
Thereafter, the rendering processing applied to the first temporary memory 26 and the rendering processing applied to the second temporary memory 27 is repeated alternately.
Note that it is also possible to use software to realize the operation of the rendering apparatus 40 in the second embodiment. In this case, a not-shown processing device executes a program of a flowchart shown in
The flowchart shown in
When the figure drawn according to the rendering instruction deviates from the area A while the rendering processing is applied to the first temporary memory 26 (“No” at step S602), the processing device informs a program 2 of the deviation of the figure from the area A (step S604). In the program 2, the processing device performs blend processing between the first temporary memory 26 and the frame buffer 21 and writes a result of the blend processing in the frame buffer 21 (step S609).
On the other hand, in the program 1, the processing device allocates the area B to the second temporary memory 27 (step S605). As long as a figure drawn according to a rendering instruction is within the area B (“Yes” at step S606), the processing device applies rendering processing to the second temporary memory 27 (step S607).
When the figure drawn according to the rendering instruction deviates from the area B while the rendering processing is applied to the second temporary memory 27 (“No” at step S606), the processing device informs the program 2 of the deviation of the figure from the area B (step S608). In the program 2, the processing device performs blend processing between the second temporary memory 27 and the frame buffer 21 and writes a result of the blend processing in the frame buffer 21 (step S610). On the other hand, in the program 1, the processing device allocates the area C to the first temporary memory 26 (step S601). Thereafter, processing device executes steps S602 to S608.
According to the second embodiment, in the first and the second temporary memories 26 and 27, it is possible to perform blend processing for rendering results already stored in the temporary memories and rendering results to be rendered in the temporary memories. In addition, blend processing for a rendering result already stored in the frame buffer 21 and rendering results stored in the temporary memories 26 and 27 is performed according to the order of rendering instructions. Thus, high-speed rendering is possible and it is possible to perform alpha blend processing normally.
In a third embodiment of the invention, an calculation for a frame buffer and an calculation for display are performed separately. First, a method for the separation of the calculation will be explained.
A color code already rendered in the frame buffer is CF and a color code to be rendered first is C1. A blend ratio (0.0 to 1.0) to be used first is α1. Then, a blend result C1F of the frame buffer color CF already rendered and the color C1 to be rendered first is represented by the following expression (10).
C1F=α1C1+(1−α1)CF (10)
The color code already rendered in the frame buffer is set to C1F according to blend processing represented by expression (10). Next, a color code to be rendered second is C2 and a blend ratio (0.0 to 1.0) to be used second is α2. In this case, a blend result C21F of the frame buffer color C1F already rendered and the color C2 to be rendered second is represented by the following expression (11).
C21F=α2C2+(1−α2)C1F (11)
The color code already rendered in the frame buffer is set to C21F according to blend processing represented by expression (11). Therefore, when a color code to be rendered third is C3 and a blend ratio (0.0 to 1.0) to be used third is α3, a blend result C321F of the frame buffer color C21F already rendered and the color C3 to be rendered third is represented by the following expression (12).
C321F=α3C3+(1−α3)C21F (12)
Although not described here, blend results of color codes already rendered in the frame buffer and colors to be rendered fourth and subsequently are calculated in the same manner. The calculation in expressions (10) to (12) are modified as indicated by the following expressions (13) to (15), respectively. The modification of the calculation are the same for the blend results of color codes already rendered in the frame buffer and colors to be rendered fourth and subsequently.
By modifying the calculation as described above, the calculation C1′, C21′, and C321′ for the second and subsequent times for the frame buffer are separated from the calculation (1−α1)CF, (1−α2)(1−α1)CF, and (1−α3)(1−α2)(1−α1)CF for an initial value of the frame buffer. Therefore, it is possible to perform the calculation C1′, C21′, and C321′ for the second and subsequent times for the frame buffer as usual rendering processing.
Color codes and alpha elements, which are recorded in the frame buffer in respective rendering stages, are C1′ and (1−α1) in rendering for the first time, C21′ and (1−α2)(1−α1) in rendering for the second time, and C321′ and (1−α3)(1−α2)(1−α1) in rendering for the third time. Thereafter, in the same manner, color codes and alpha elements to be recorded in the temporary memories are overwritten.
A color code and an alpha element, of a screen subjected to the rendering and blend processing in such a system are Cs and αs, respectively, and the screen is a displaying blend screen. When a color code of a blend screen to be displayed is CD, a calculation to be performed in display blend processing is represented by the following expression (16). In other words, the calculation for the color CF in the rendering for the first time is replaced with the calculation for the color CD of the blend screen to be displayed.
CSD=CS+αSCS (16)
Next, a specific constitution of the third embodiment will be explained.
Next, a structure of the rendering unit 53 will be explained. In this explanation, a color code and a blend ratio of images already rendered in the first frame buffer 51 are Ct and αt, respectively. A color code and a blend ratio of images to be rendered in the first frame buffer are C and α, respectively.
The first subtracter 61 subtracts the color code Ct of the image already rendered in the first frame buffer 51 from the color code C of the image to be rendered in the first frame buffer 51. The first multiplier 62 multiplies a result of the calculation of the first subtracter 61 by the blend ratio α of the image to be rendered in the first frame buffer 51.
The first adder 63 adds the color code C of the image to be rendered in the first frame buffer 51 to a result of the calculation of the first multiplier 62. A result Ct′ of the calculation of the first adder 63 is stored in the first frame buffer 51 as a new color code of the image already rendered in the first frame buffer 51. In the next rendering applied to the first frame buffer 51, the result Ct′ is used as the color code Ct of the image already rendered in the first frame buffer 51.
The second subtracter 64 subtracts the blend ratio α of the image to be rendered in the first frame buffer 51 from 1. The second multiplier 65 multiplies a result of the calculation of the second subtracter 64 by the blend ratio α1 of the image already rendered in the first frame buffer 51. A result αt′ of the second multiplier 65 is stored in the first frame buffer as a new blend ratio of the image already rendered in the first frame buffer 51. In the next rendering applied to the first frame buffer 51, the result αt′ is used as the blend ratio αt of the image already rendered in the first frame buffer 51.
Next, a structure of the display control unit 54 will be explained. In this explanation, a color code and a blend ratio of a transparent screen rendered in the first frame buffer 51 are Cs and αs, respectively, and a color code of a background screen rendered in the second frame buffer 52 is Cd.
The third multiplier 66 multiplies the color code Cd of the image rendered in the second frame buffer 52 by the blend ratio αs of the image rendered in the first frame buffer 51. The second adder 67 adds the color code Cs of the image rendered in the first frame buffer 51 to a result of the calculation of the third multiplier 66. A result Csd of the calculation of the second adder 67 (CSD in expression (16)) is displayed on the display device 55.
Next, an operation of the display control apparatus 50 in the third embodiment will be explained. First, the first frame buffer 51 is cleared with C=0 and α=1.0 in advance. This clear processing is performed to set Cf to αC and αf to (1−α) at the time of a first operation in a blend processing operation in the rendering unit 53 shown in
First, the rendering unit 53 applies rendering to the first frame buffer 51 (the transparent screen). The display control unit 54 reads out data stored in the first frame buffer 51 and the second frame buffer 52 (the background screen) and confirms a flag for controlling transmission and non-transmission provided for each pixel (hereinafter referred to as transmission/non-transmission control flag).
The display control unit 54 displays the data in the second frame buffer 52 for pixels with the transmission/non-transmission control flag set OFF. In addition, for pixels with the transmission/non-transmission control flag set ON, the display control unit 54 subjects pixel data in the first frame buffer 51 and pixel data in the second frame buffer 52 to blend processing and displays the pixel data.
Note that it is also possible to use software to realize a part of the operation of the display control apparatus 50 in the third embodiment. In this case, a not-shown processing device executes a program of a flowchart shown in
The flow chart shown in
Cf′=αC+(1−α)Cf (17)
αf′=αf(1−α) (18)
Subsequently, the processing device writes Cf′ and αf′ obtained from expressions (17) and (18) in the first frame buffer 51 (step S1004). The processing device repeats the processing until the processing is finished for all the pixels (step S1005). In the processing, Cf′ and αf′ written in the first frame buffer 51 anew are read out as the color code Cf and the blend ratio αf of the first frame buffer 51.
In the third embodiment, the rendering unit 53 subjects a rendering result already stored in the first frame buffer 51 and a rendering result of rendering to be applied to the first frame buffer 51 to blend processing. The display control unit 54 subjects the rendering result stored in the first frame buffer 51 and a rendering result stored in the second frame buffer 52 to transmission or non-transmission processing by a unit of pixel and synthesizes the rendering results. Thus, according to the third embodiment, even when display transmission/non-transmission processing is performed together with alpha blending in rendering processing, it is possible to obtain a display result, in which the respective processing are synthesized, correctly.
In the third embodiment, the display control unit 54 subjects the rendering result stored in the first frame buffer 51 and the rendering result stored in the second frame buffer 52 to transmission or non-transmission processing by a unit of pixel and synthesizes the rendering results. On the other hand, in the fourth embodiment, the display control unit 54 subjects the rendering result stored in the first frame buffer 51 and the rendering result stored in the second frame buffer 52 to blend processing and synchronizes the rendering results. Since the display control unit 54 in the fourth embodiment is the same as that in the third embodiment except the above points, redundant explanations are omitted.
A structure of the display control unit 54 will be explained. In this explanation, a color code and a blend ratio of a transparent screen rendered in the first frame buffer 51 are Cs and αs, respectively, and a color code of a background screen rendered in the second frame buffer 52 is Cd. In addition, a display transmittance of the transparent screen and the background screen, that is, a display blend ratio is αx.
The third multiplier 71 multiplies the color code Cd of the image rendered in the second frame buffer 52 by the blend ratio αs of the image rendered in the first frame buffer 51. The third subtracter 72 subtracts a result of the calculation of the third multiplier 71 from the color code Cs of the image rendered in the first frame buffer 51.
The fourth multiplier 73 multiplies a result of the calculation of the third subtracter 72 by the blend ratio αs of the image rendered in the first frame buffer 51. The second adder 74 adds the result of the calculation of the third multiplier 71 to a result of the calculation of the fourth multiplier 73. An output Csd of the second adder 74 is displayed on the display device 55. The result Csd of the calculation of the second adder 74 is represented by the following expression (19).
Next, an operation of the display control apparatus 50 in the fourth embodiment will be explained. First, the first frame buffer 51 is cleared with C=0 and α=1.0 in advance. The rendering unit 53 applies rendering to the first frame buffer 51 (the transparent screen). The display control unit 54 reads out data stored in the first frame buffer 51 and data stored the second frame buffer 52 (the background screen) and subjects the data to blend processing at the display transmittance αx. Then, the display control unit 54 displays a result obtained by subjecting pixel data in the first frame buffer 51 and pixel data in the second frame buffer 52 to the bland processing at the transmittance αx.
Note that, in the fourth embodiment, as in the third embodiment, a not-shown processing device executes the program of the flowchart shown in
In the fourth embodiment, the rendering unit 53 subjects a rendering result already stored in the first frame buffer 51 and a rendering result of rendering to be applied to the first frame buffer 51 to blend processing. The display control unit 54 subjects the rendering result stored in the first frame buffer 51 and a rendering result stored in the second frame buffer 52 to the blend processing and synthesizes the rendering results. Thus, according to the fourth embodiment, even when alpha blending in display processing is performed together with alpha blending in rendering processing, it is possible to obtain a display result, in which the respective processing are synthesized, correctly.
In the following description, only components of the display control apparatus 70 in the fifth embodiment different from those of the display control apparatus 50 in the third embodiment will be explained. Components same as those in the third embodiment are denoted by the identical reference numerals and signs and explanations of the components are omitted. The second rendering unit 71 has the same blending function as the display control unit 54 in the third embodiment. In other words, the second rendering unit 71 has the structure shown in
Next, an operation of the display control apparatus 70 in the fifth embodiment will be explained. First, the first frame buffer 51 is cleared with C=0 and α=1.0 in advance. The rendering unit 53 applies rendering to the first frame buffer 51 (the transparent screen). The second rendering unit 71 reads out data stored in the first frame buffer 51 and data stored in the second frame buffer 52 (the background screen) and confirms a transmission/non-transmission control flag provided for each pixel.
The second rendering unit 71 stores the data, which is stored in the second frame buffer 52, in the third frame buffer 72 for pixels with the transmission/non-transmission control flag set OFF. In addition, for pixels with the transmission/non-transmission control flag set ON, the second rendering unit 71 stores a result, which is obtained by subjecting pixel data in the first frame buffer 51 and pixel data in the second frame buffer 52 to blend processing, in the third frame buffer 72. The display control unit 73 reads out the data in the third frame buffer 72 and displays contents of the data on the display device 55 such as a display.
Note that it is also possible to use software to realize the operation of the display control apparatus 70 in the fifth embodiment. In this case, a not-shown processing device executes a program of a flowchart shown in
The flow chart shown in
Subsequently, the processing device writes Cf′ and αf′ obtained from expressions (17) and (18) in the first frame buffer 51 (step S1304). The processing device repeats the processing until the processing is finished for all the pixels (step S1305). In the processing, Cf′ and αf′ written in the first frame buffer 51 anew are read out as the color code Cf and the blend ratio αf of the first frame buffer 51.
When the processing for writing Cf′ and αf′ in the first frame buffer 51 is finished (“Yes” at step S1305), the processing device reads out a color code Cs and a blend ratio αs of a transparent screen from the first frame buffer 51 (step S1306). In addition, the processing device reads out a color code Cd of a background screen from the second frame buffer 52 (step S1307). Subsequently, the processing device performs an calculation of the next expression (20) to calculate Csd (step S1308).
Csd=αsCs+(1−αs)Cd (20)
If the transmission/non-transmission control flag is set to non-transmission (“No” at step S1309), the processing device writes Csd in the third frame buffer 72 (step S1310). On the other hand, if the transmission/non-transmission control flag is set to transmission (“Yes” at step S1309), the processing device does not write Csd in the third frame buffer 72. The processing device repeats steps S1306 to S1311 until the processing is finished for all the pixels (step S1311).
In the fifth embodiment, the first rendering unit 53 subjects a rendering result already stored in the first frame buffer 51 and a rendering result of rendering to be applied to the first frame buffer 51 to blend processing. The second rendering unit 71 subjects the rendering result stored in the first frame buffer 51 and a rendering result stored in the second frame buffer 52 to transmission or non-transmission processing by a unit of pixel and synthesizes the rendering results. Thus, according to the fifth embodiment, even when display transmission/non-transmission processing is performed together with alpha blending in rendering processing, it is possible to obtain a display result, in which the respective processing are synthesized, correctly.
In a sixth embodiment, the alpha blending in rendering processing and the alpha blending in display processing same as those in the fourth embodiment are performed by the same structure as the display control apparatus 70 in the fifth embodiment shown in
Next, an operation of the display control apparatus 70 in the sixth embodiment will be explained. First, the first frame buffer 51 is cleared with C=0 and α=1.0 in advance. The first rendering unit 53 applies rendering to the first frame buffer 51 (the transparent screen). The second rendering unit 71 reads out data stored in the first frame buffer 51 and the second frame buffer 52 (the background screen) and applies blend processing to the data at a display transmittance αx.
The second rendering unit 71 stores a result, which is obtained by subjecting pixel data in the first frame buffer 51 and pixel data in the second frame buffer 52 to the blend processing at the display transmittance αx, in the third frame buffer 72. The display control unit 73 reads out data in the third frame buffer 72 and displays contents of the data on the display device 55 such as a display.
Note that it is also possible to use software to realize the operation of the display control apparatus 70 in the sixth embodiment. In this case, a not-shown processing device executes a program of a flowchart shown in
The flowchart shown in
Subsequently, the processing device writes Cf′ and αf′ obtained from expressions (17) and (18) in the first frame buffer 51 (step S1404). The processing device repeats the processing until the processing is finished for all the pixels (step S1405). In the processing, Cf′ and αf′ written in the first frame buffer 51 anew are read out as the color code Cf and the blend ratio αf of the first frame buffer 51.
When the processing for writing Cf′ and αf′ in the first frame buffer 51 is finished (“Yes” at step S1405), the processing device reads out a color code Cs and a blend ratio αs of a transparent screen from the first frame buffer 51 (step S1406). In addition, the processing device reads out a color code Cd of a background screen from the second frame buffer 52 (step S1407). Subsequently, the processing device performs an calculation of expression (19) to calculate Csd (step S1408).
Then, the processing device writes Csd in the third frame buffer 72 (step S1409). The processing device repeats steps S1406 to S1410 until the processing is finished for all the pixels (step S1410).
In the sixth embodiment, the first rendering unit 53 subjects a rendering result already stored in the first frame buffer 51 and a rendering result of rendering to be applied to the first frame buffer 51 to blend processing. The second rendering unit 71 subjects the rendering result stored in the first frame buffer 51 and a rendering result stored in the second frame buffer 52 to the blend processing and synthesizes the rendering results. Thus, according to the sixth embodiment, even when alpha blending in display processing is performed together with alpha blending in rendering processing, it is possible to obtain a display result, in which the respective processing are synthesized, correctly.
In the above description, the invention is not limited to the embodiments but can be changed in various ways.
According to the invention, it is possible to obtain a rendering apparatus that is capable of performing high-speed rendering and performing alpha blend processing normally. It is also possible to obtain a display control apparatus that is, even when display transmission/non-transmission processing or alpha blending in display processing is performed together with alpha blending in rendering processing, capable of obtaining a display result, in which the respective processing are synthesized, correctly.
Although the invention has been described with respect to a specific embodiment for a complete and clear disclosure, the appended claims are not to be thus limited but are to be construed as embodying all modifications and alternative constructions that may occur to one skilled in the art which fairly fall within the basic teaching herein set forth.
This nonprovisional application is a continuation application of and claims the benefit of International Application No. PCT/JP03/04772, filed Apr. 15, 2003. The disclosure of the prior application is hereby incorporated herein in its entirety by reference.
Number | Name | Date | Kind |
---|---|---|---|
5673422 | Kawai et al. | Sep 1997 | A |
5870102 | Tarolli et al. | Feb 1999 | A |
6144365 | Young et al. | Nov 2000 | A |
Number | Date | Country |
---|---|---|
0 952 546 | Oct 1999 | EP |
11-272846 | Oct 1999 | JP |
2001-167289 | Jun 2001 | JP |
2002-033904 | Jan 2002 | JP |
2002-544544 | Dec 2002 | JP |
2003-006665 | Jan 2003 | JP |
2004-544544 | Dec 2004 | JP |
WO 0068887 | Nov 2000 | WO |
Number | Date | Country | |
---|---|---|---|
20050168473 A1 | Aug 2005 | US |
Number | Date | Country | |
---|---|---|---|
Parent | PCT/JP03/04772 | Apr 2003 | US |
Child | 11091435 | US |