WO2010000126A1 - 交互信息生成方法及系统 - Google Patents

交互信息生成方法及系统 Download PDF

Info

Publication number
WO2010000126A1
WO2010000126A1 PCT/CN2009/000355 CN2009000355W WO2010000126A1 WO 2010000126 A1 WO2010000126 A1 WO 2010000126A1 CN 2009000355 W CN2009000355 W CN 2009000355W WO 2010000126 A1 WO2010000126 A1 WO 2010000126A1
Authority
WO
WIPO (PCT)
Prior art keywords
rendering
information
data
primitive
drawing engine
Prior art date
Application number
PCT/CN2009/000355
Other languages
English (en)
French (fr)
Inventor
潘建
肖南
Original Assignee
北京壁虎科技有限公司
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 北京壁虎科技有限公司 filed Critical 北京壁虎科技有限公司
Publication of WO2010000126A1 publication Critical patent/WO2010000126A1/zh

Links

Classifications

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

Definitions

  • the present invention relates to computer image technology, and more particularly to a method and system for generating interactive information in a rendering process of a program applying a drawing engine. Background technique
  • the display objects to be displayed on the display screen are based on graphic primitives. These primitives can be rendered or drawn by hardware or software, and then the views of the display objects in the display screen are obtained.
  • image rendering refers to the process of converting the advanced description based on the object into the graphical image displayed on the display device. Taking 3D rendering as an example, the image rendering refers to the mathematical model of the 3D object or scene by the graphics card providing the drawing engine. The process of converting to a bitmap (Bitmap) image displayed on the display.
  • the graphics engine is the application programming interface (API) provided by the graphics card.
  • API application programming interface
  • the graphics card can only be rendered by calling the drawing engine. When you think of the drawing engine and graphics card as one, you don't need to distinguish them.
  • Shaders can also be used to perform rendering. Shaders are used in the field of computer graphics and refer to a set of instructions used by computer graphics resources to perform rendering tasks. The programmer applies the shader to the programmable pipeline of the graphics processing unit (GPU) to implement the 3D application.
  • GPU graphics processing unit
  • Such a graphics processor is different from a traditional fixed-pipeline processor, providing greater flexibility and adaptability for GPU programming.
  • shaders are used to process large amounts of data while rendering, such as a whole block of pixels on the screen, or all vertices of a model structure.
  • Parallel computing is suitable for such situations, and today's GPUs are also designed with multi-core architecture to greatly improve processing efficiency.
  • the object of the present invention is to provide a method and a system for generating interaction information in a rendering of a primitive scene, which can generate human-computer interaction information during the running of the graphics-based scene rendering program based on the drawing engine, and provide for developing an extended human-computer interaction program.
  • Base information data can be generated.
  • the present invention provides a method for generating interaction information in a primitive scene rendering.
  • the method further includes the following steps:: texture of all primitives in the primitive scene Set to a pre-generated static interaction data texture map, and set information integration mode parameters for specifying dynamic interaction information to be merged into the static interaction data texture map at the time of rendering;
  • the operation of generating the static interaction data texture map in advance may include: first determining a content component of the interaction information by the extended upper layer application requirement, generating a bitmap as a static interaction data texture map according to a preset precision resolution, and The static interactive information component in the component is saved to the bitmap, which is determined by each pixel in the image.
  • the static data corresponding to the pixel is saved in the data unit.
  • the operation of setting the interaction information combining manner includes: first determining, by the extended upper layer application requirement, a mathematical operation combining manner of each content component of the interaction information, and performing operations and operands of the operations according to the mathematical operation combining manner And the operation sequence is set to the drawing engine.
  • the operation of removing the rendering effect parameter may be further included, and performing on the primitive scene where the static interaction data texture map is set After the rendering operation, the rendering effect parameters are restored.
  • the present invention also provides an interactive information generating system for rendering a primitive scene, including:
  • a texture setting module configured to set a texture of all primitives in the primitive scene to a pre-generated static interactive data texture map
  • a merging parameter setting module configured to specify a information merging mode parameter for merging dynamic interaction information into the static interaction data texture map at the time of rendering
  • a rendering module configured to perform a rendering operation on the primitive scene in which the static interaction data texture map and the information merge mode parameter are set, and merge the dynamic interaction information corresponding to the primitive into the static interaction data texture map In the corresponding data unit, an interaction information map of the primitive scene is generated in a display cache.
  • system may further include a static interaction data texture map generation module, configured to determine a content component of the interaction information by the extended upper application requirement, generate a bitmap as a static interaction data texture map according to a preset precision resolution, and The static interaction information component in the component is saved in the bitmap, so that the static interaction information corresponding to the pixel is saved in the data unit determined by each pixel in the figure.
  • a static interaction data texture map generation module configured to determine a content component of the interaction information by the extended upper application requirement, generate a bitmap as a static interaction data texture map according to a preset precision resolution, and The static interaction information component in the component is saved in the bitmap, so that the static interaction information corresponding to the pixel is saved in the data unit determined by each pixel in the figure.
  • system may further include:
  • a first rendering state resetting module configured to remove an effect of the rendering effect parameter before performing a rendering operation on the primitive scene in which the static interactive data texture map is set
  • a second rendering state resetting module configured to restore the effect of the rendering effect parameter after performing a rendering operation on the primitive scene in which the static interactive data texture map is set.
  • the present invention provides a method for generating interactive information in a primitive scene rendering.
  • the method further includes the following steps: defining a shader code supported by the drawing engine;
  • a rendering operation is performed on the drawing engine to cause the drawing engine to execute the previously set shader code to generate an interactive information map.
  • the present invention also provides an interactive information generating system for rendering a primitive scene, including:
  • a loading module for receiving the defined shader code and loading the received shader code into the drawing engine through an interface of the drawing engine
  • An execution module is configured to perform a rendering operation on the drawing engine, and cause the drawing engine to execute the previously set shader code to generate an interaction information map.
  • the present invention inserts logic code for generating human-computer interaction information data during the operation of the drawing engine-based primitive scene rendering program, and the generated interaction information is stored in the display buffer, and the screen of the original scene screen
  • the coordinates correspond to generate an additional interactive information map without modifying the application, which provides the underlying data for the interactive information driven engine.
  • FIG. 1 is a schematic flowchart diagram of a method for generating interaction information in a scene rendering of a primitive according to a first embodiment of the present invention.
  • 2 is a flow chart showing an application example of a method according to a first embodiment of the present invention.
  • FIG. 3 is a schematic diagram of an interaction information map of the present invention.
  • FIG. 4 is a schematic diagram showing the relationship between a display buffer and a display screen according to the present invention.
  • Figure 5 is a flow diagram showing an example of a method of reading interactive information in an application of the present invention.
  • FIG. 6 is a schematic structural diagram of an example of a system for generating interactive information in rendering of a primitive scene according to the first embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of another example of a system for generating interactive information in rendering of a primitive scene according to the first embodiment of the present invention.
  • FIG. 8 is a flow chart showing a method for generating interactive information in rendering of a primitive scene according to a second embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of an example of a system for generating interactive information in rendering of a primitive scene according to a second embodiment of the present invention. detailed description
  • Drawing engine A program interface that controls the operation of a computer graphics card. This article considers these interfaces and graphics cards as a whole and is called a drawing engine.
  • Primitive scene The state of the 2D or 3D space at the time of observation
  • Element The elements that make up the scene of the primitive, such as: circle, triangle, building, car, etc.; texture: a bitmap applied by the drawing engine to the surface of the primitive to represent the texture of the primitive;
  • Texture color The texture bitmap specifies the color value of the pixel
  • Rendering The work of turning a primitive scene into a flat image, which is done by the graphics engine operating the graphics card;
  • Render state The value of the control parameter used when rendering the feature
  • Diffuse Makes a point on the surface of the rendered primitive with the composition of the surrounding primitive color
  • Transparent Makes a point on the surface of the rendered primitive with the color component of the corresponding point of the primitive that is occluded by it;
  • Fog Makes a point on the surface of the rendered primitive with a certain color component;
  • Rendering target The buffer area where the rendering result is stored;
  • Shader User-defined rendering code for the rendering of programmable pipelines.
  • FIG. 1 is a schematic flowchart of a method for generating interaction information in a scene rendering of a primitive according to a first embodiment of the present invention. This embodiment is based on the implementation of a fixed pipeline processor. In the process of rendering the primitive scene implemented by the drawing engine, the following steps are also included:
  • Step 101 Set a texture of all primitives in the primitive scene to a pre-generated static interactive data texture map.
  • Step 102 Set an information combining mode parameter for specifying that the dynamic interaction information is merged into the static interaction data texture map at the time of rendering;
  • Step 103 Perform a rendering operation (also referred to as an additional rendering operation) on the primitive scene in which the static interactive data texture map and the information merge mode parameter are set, and merge the dynamic interaction information corresponding to the primitive into the static interaction.
  • a rendering operation also referred to as an additional rendering operation
  • the interaction information map of the primitive scene is generated in the display cache.
  • the map is preset to a fixed resolution, so that the drawing engine divides the surface of each primitive in the primitive scene into multiple data units according to the resolution precision after rendering, and
  • the primitive coordinate offset value corresponding to the data unit is saved as the static interaction information in the upper position of each data unit (pixel) of the figure, and the low bit is left blank for filling the dynamic interactive information data during rendering.
  • the static interactive data texture map generated in this way is used for the surface of all primitives when rendering the primitive scene.
  • the so-called static interaction information refers to the interaction information that does not need to be confirmed in the rendering process, such as the coordinate of the surface of the primitive corresponding to the point, the surface area number of the point to which the point belongs, the interaction type information of the point, etc.
  • the dynamic interaction information refers to the need The interaction information confirmed during the rendering process, such as the identification number of the primitive, the category to which the primitive belongs, the scene associated with the primitive, or other primitives.
  • the embodiment of the present invention can be embedded in a general primitive scene rendering process without modifying the original application, and is further explained by the application example of Fig. 2.
  • the application example includes the following processes:
  • Step 201 Positioning the 3D object, that is, setting the positions of the respective primitives in the primitive scene, and setting the texture of each primitive.
  • Step 202 Set a rendering state of the primitive scene, where the rendering state is some specific special effect parameters, such as reflection, diffusion, transparency, or fog, etc., and the rendering states are expressed in the rendered scene image.
  • the rendering state is some specific special effect parameters, such as reflection, diffusion, transparency, or fog, etc.
  • Step 203 If it is required to generate interaction information in the primitive scenario, the mapping is performed.
  • the rendering state of the meta scene is reset to set all the effect parameters to not affect the rendering.
  • Step 204 Determine, by the extended upper layer application requirement, a content component of the interaction information, and generate a bitmap according to a preset precision resolution, that is, a static interaction data texture map in the primitive scene, where the data unit is saved in each data unit.
  • the component of the static interaction information in the corresponding content component, and the space for saving the dynamic interaction information confirmed in the rendering process may also be reserved.
  • Step 205 Set the texture of all the primitives in the primitive scene to the static interactive data texture map generated in step 204.
  • Step 206 Set an information combining mode parameter for specifying that the dynamic interaction information is merged into the static interaction data texture map at the time of rendering.
  • the setting of the parameter determines the mathematical operation combining mode of each content component of the interactive information by the extended upper application requirement, and sets the operation, the operand and the operation sequence of these operations to the drawing engine according to the mathematical operation combining mode.
  • Step 207 The drawing engine is configured to perform a rendering operation on the primitive scene in which the static interaction data texture map and the information merge mode parameter are set, and merge the dynamic interaction information corresponding to the primitive into the static interaction data texture map.
  • an interaction information map of the primitive scene is generated in a display cache.
  • the composition of the interactive information map 1 is as shown in FIG. 3, and its size is consistent with the display screen.
  • Each data unit 2 includes static interaction information and dynamic interaction information corresponding to the data unit.
  • Step 208 Restore the rendering state of the original primitive scene, that is, reset the special effect parameter to be valid, and restore the texture of each primitive in the original primitive scene.
  • Step 209 The drawing engine is called to perform a rendering operation on the primitive scene, and the original scene image is rendered to a rendering target in the display cache.
  • steps 201, 202, and 209 are the rendering processes of the original application, and steps 203-208 are embedded in the embodiment of the present invention.
  • the interaction information generation process of the embodiment of the present invention is added before the normal rendering process, and the interaction capability of the original application program can be extended.
  • the rendering target of the screen is saved in the display cache.
  • the two render targets are associated by the display screen coordinates, such as: the position of the screen displayed in the render target 4 corresponds to the point on the (xl, yl) position
  • the information is stored in the pixels of the corresponding position in the interactive information map 1.
  • the static interaction information may be set to a high level in steps 204-206, and the dynamic interaction information is written to a low level by an adding operation.
  • This method of merging is only an example of a way to generate interactive information, and should not be construed as limiting the way in which interactive information is written, any other way in which interactive information can be written to a data unit (eg, setting screen coordinates at It is within the scope of the present invention to low-level, to write interactive information to a high level by addition, and the like.
  • the operation of generating the static interaction data texture map may also be performed before the rendering state is reset.
  • the timing of generating the static interaction data texture map is related to the requirement of the upper layer application, that is, The inserted additional rendering process can be run at any desired time.
  • the interactive information map is generated, and the original rendering target is generated.
  • the rendering process of the original image may be generated before the interactive information map is generated or embedded in multiple interactive information map generation processes.
  • step 203 the effect of rendering the effect parameter when the interactive information map obtained by the rendering is removed is performed by resetting the rendering effect parameter that expresses the rendering state.
  • the special effect parameter is restored through step 208, thereby ensuring the original scene. Accurate display of the picture. If in the original scene picture, the effect parameters of the primitive scene It has been preset to not function, or it is known that the reset effect parameter does not affect the next frame rendering of the original scene picture, and there is no need to add the steps of resetting and restoring the rendering effect parameter in the process of generating the interaction information. .
  • FIG. 5 An example of a method for reading interactive information in the application of the present invention will be described below with reference to FIG. 5, which includes the following steps:
  • Step 301 Acquire corresponding screen coordinates according to the request of the upper application, for example, respond to a moving action of the mouse, and obtain corresponding screen coordinates;
  • Step 302 Read static interaction information and dynamic interaction information corresponding to screen coordinates in the interaction information map stored in the display cache.
  • the interaction information is generated in the rendering of the primitive scene, and the rendering target of the image is saved in the display cache, and one or more interactive information maps associated with the screen coordinates.
  • the drawing engine can extract one or more static and dynamic interaction information from the data unit corresponding to the screen coordinates in one or more interactive information maps.
  • FIG. 6 is a schematic structural diagram of an example of a system for generating interactive information in the rendering of a primitive scene according to the first embodiment of the present invention.
  • the system includes at least a texture setting module 5, a merge parameter setting module 6, and a rendering module 7.
  • the texture setting module 5 is configured to set the texture of all primitives in the primitive scene to a pre-generated static interactive data texture map.
  • the merge parameter setting module 6 is configured to set a message merge mode parameter for specifying that the dynamic interaction information is merged into the static interactive data texture map at the time of rendering.
  • the rendering module 7 is configured to perform a rendering operation on the primitive scene in which the static interaction data texture map and the information merge mode parameter are set, and merge the dynamic interaction information corresponding to the primitive into the static interaction data texture map.
  • an interaction information map of the primitive scene is generated in the video memory.
  • FIG. 7 is a schematic structural diagram of another example of a system for generating interaction information in a scene rendering of a primitive according to the first embodiment of the present invention.
  • the embodiment further includes a static interaction data texture map generation module 8 for determining the content component of the interaction information by the extended upper layer application requirement, and generating the bitmap as a static interaction data texture map according to the resolution of the preset precision. And storing the static interaction information component in the component into the bitmap, so that the static interaction information corresponding to the pixel is saved in the data unit determined by each pixel in the graph.
  • the first rendering state resetting module and the second rendering state resetting module may be further included, where the first rendering state resetting module is configured to perform the primitive scene set on the static interactive data texture map. Perform a rendering operation to remove the effects of rendering effects parameters.
  • the second rendering state resetting module is configured to restore the effect of the rendering effect parameter after performing a rendering operation on the primitive scene in which the static interactive data texture map is set.
  • FIG. 8 is a schematic flowchart of a method for generating interaction information in a scene rendering of a primitive according to a second embodiment of the present invention. This embodiment is based on the implementation of a shader. In the process of rendering the primitive scene of the drawing engine, the following steps are also included: Step 801: Define a shader supported by the drawing engine.
  • defining a shader further includes: a register constant defining a shader and a data mixing process, wherein in programming related to a graphics processing unit (GPU), the register constant is not a fixed amount of the index value, but refers to the drawing A fixed register in which the location of the engine is unchanged and the contents of the storage can be changed.
  • a register constant defining a shader and a data mixing process, wherein in programming related to a graphics processing unit (GPU), the register constant is not a fixed amount of the index value, but refers to the drawing A fixed register in which the location of the engine is unchanged and the contents of the storage can be changed.
  • the defined register constants are used during runtime to allow the drawing engine to open up space on the corresponding registers to pass and store the interactive information data determined by the upper application requirements.
  • the defined data mixing process is used to specify the implementation of data mixing.
  • the data blending process is executed by the drawing during runtime to blend primitive information (eg, texture coordinates) in the drawing engine with data in defined registers (eg, using mathematical operations) to generate primitive surfaces.
  • the interaction data of a data unit is passed to the drawing engine as a shader output.
  • the primitive related information refers to the drawing engine being born during the rendering operation. And store the data in the drawing engine registers. This data can be read directly from the drawing engine registers by the shader code.
  • the coordinates of the four vertices of the wall are generated by the drawing engine and stored in registers, and are available to the shader.
  • the data generated by the drawing engine is not limited to coordinates, but includes a lot of other information, which is well known to those skilled in the art.
  • blending refers to a way of combining the primitive related information in the drawing engine with the interactive information data determined by the upper application.
  • a data unit on the surface of the primitive is also 32-bit, which is to specify that "mixing" is ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
  • the lower 16 bits store interactive information data.
  • it can also be "or,,,” XOR, and so on, as long as the mixed data can be separated into the original data without errors.
  • Step 802 Load the defined shader code into the drawing engine through the drawing engine interface.
  • the drawing engine opens up a constant storage space for the custom shader in its registers and loads the shader code for rendering in the video memory.
  • Step 803 Perform a rendering operation on the drawing engine, so that the drawing engine executes the previously set shader code to generate an interaction information map.
  • the drawing engine mixes the primitive-related information in the drawing engine and the interaction information determined by the upper-layer application requirements stored in the shader's register constants into the interactive information map in a manner specified by the data mixing process definition.
  • the upper application can dynamically modify the data in the register constants through the drawing engine to synthesize the useful interactive information into the interactive information map.
  • the upper application can obtain the screen coordinate information of the mouse pointer from the operating system, and is in the display cache. Find this screen Whether the coordinates correspond to static interaction information (such as coordinates x, y on the primitive plane) and dynamic interaction information (such as primitive identification a) in the interactive information map, and if so, read the interaction information, thereby making the upper layer
  • static interaction information such as coordinates x, y on the primitive plane
  • dynamic interaction information such as primitive identification a
  • the rendering effect parameters representing the rendering state need not be reset and restored as shown in step 203 of Figure 2 to avoid affecting the currently displayed primitive scene.
  • the interactive information map is generated according to the present embodiment, the interactive information can also be read using the method described with reference to FIG.
  • FIG. 9 is a schematic structural diagram of an example of a system for generating interactive information in a scene rendering of a primitive according to a second embodiment of the present invention.
  • the system includes at least a load module 901 and an execution module 902.
  • the load module 901 receives the defined shader code and loads the received shader code into the drawing engine through the graphics engine's interface. Specifically, the shader code is negatively defined by the program and passed to the load module 901.
  • the execution module 903 performs a rendering operation on the drawing engine to cause the drawing engine to execute the previously set shader code to generate an interactive information map.
  • the embodiment of the present invention inserts logic code for generating human-computer interaction information data during the execution of the graphics engine scene rendering program based on the drawing engine, and the generated interaction information is stored in the display buffer and corresponds to the screen coordinates of the original scene image. To generate an additional interactive information map without modifying the application, which provides the underlying data for the interactive information driver.
  • the foregoing method includes the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)
  • Processing Or Creating Images (AREA)

Description

交互信息生成方法及系统 技术领域
本发明涉及计算机图像技术,尤其涉及一种在应用绘图引擎 的程序的渲染过程中生成交互信息的方法及其系统。 背景技术
计算机图像技术已被广泛的应用在二维显示屏幕的图像表 示, 这种图像表示已经可以达到非常细致的程度。 在显示屏幕上 所要表示的显示对象是以图形图元为基本单位的, 通过硬件或软 件方式可以对这些图元进行图像渲染或绘图, 进而得到显示屏幕 中各个显示对象的视图。 所谓图像渲染是指将基于对象的高级描 述转换为在显示设备上显示的图形化图像的过程, 以 3D渲染为 例, 图像渲染指的是由提供绘图引擎的显卡将 3D对象或场景的 数学模型转换为在显示屏上显示的位图 (Bitmap ) 图像的过程。
绘图引擎是显卡提供的应用编程接口 (API ) 。 只有通过调 用绘图引擎, 才可以使显卡执行渲染操作。 在将绘图引擎和显卡 看作是一体的时, 不需要对其加以区分。
执行渲染还可以使用着色器(shader ) 。 着色器应用于计算 机图形学领域, 指一组供计算机图形资源在执行渲染任务时使用 的指令。 程序员将着色器应用于图形处理器 (GPU ) 的可编程流 水线, 来实现三维应用程序。 这样的图形处理器有别于传统的固 定流水线处理器, 为 GPU 编程带来更高的灵活性和适应性。 此 外, 着色器被用来在渲染的同时处理大量的数据, 比如屏幕上的 一整块像素群, 或者一个模型结构的所有顶点。 并行计算适用于 这样的情况, 而且当今的 GPU 也设计有多核结构来极大的提高 处理效率。 目前,计算机应用程序中有很多在运行过程中动态生成绘制 图元,并在显示屏上渲染出动态图像的基于绘图引擎的应用程序。 由于这类应用程序极富表现力, 因此被广泛应用在医疗、 娱乐、 科研以及互联网服务等方面。 以互联网服务为例, 包含这类应用 程序的客户终端通常会吸引大量的用户使用。 这类应用程序通常 都比较复杂, 开发成本很高, 如果在封装之后的程序上扩展应用 将是非常困难且高成本的, 因而在不修改封装程序的情况下自由 扩充原有程序的功能成为一种需求。 发明内容
本发明的目的是提出一种在图元场景渲染中生成交互信息 的方法及系统, 能够在基于绘图引擎的图元场景渲染程序运行期 间生成人机交互信息, 为开发扩展的人机交互程序提供基 信息 数据。
为实现本发明的目的,本发明提供了一种在图元场景渲染中 生成交互信息的方法,在图元场景渲染过程中,还包括以下步骤: 将所述图元场景中所有图元的纹理设置为预先生成的静态 交互数据纹理图, 并设定用于指定在渲染时将动态交互信息合并 到所述静态交互数据纹理图的信息合并方式参数;
对设置了所述静态交互数据纹理图和信息合并方式参数的 图元场景执行渲染操作, 将与所述图元对应的动态交互信息合并 到所述静态交互数据纹理图中相对应的数据单元中, 以在显示緩 存中生成所述图元场景的交互信息映射图。
进一步的, 预先生成静态交互数据紋理图的操作可以包括: 先由扩展的上层应用需求确定交互信息的内容分量,按照预 设精度的分辨率生成位图作为静态交互数据紋理图, 并将所述分 量中静态交互信息分量保存到该位图中, 使图中每个像素所确定 的数据单元中保存与该像素对应的静态交互信息。
进一步的, 所述设定交互信息合并方式的操作包括: 先由扩展的上层应用需求确定交互信息各内容分量的数学 运算合并方式,并根据所述数学运算合并方式将这些运算的操作、 操作数和操作顺序设定到绘图引擎中。
进一步的,在对设置了所述静态交互数据纹理图的图元场景 执行渲染操作之前, 还可以包括去除渲染特效参数的操作, 并在 对设置了所述静态交互数据纹理图的图元场景执行渲染操作之 后, 恢复所述渲染特效参数。
为实现上述目的,本发明还提供了一种图元场景渲染中交互 信息生成系统, 包括:
纹理设置模块,用于将所述图元场景中所有图元的紋理设置 为预先生成的静态交互数据紋理图;
合并参数设置模块, 用于设定用于指定在渲染时将动态交互 信息合并到所述静态交互数据纹理图的信息合并方式参数;
渲染模块,用于对设置了所述静态交互数据纹理图和信息合 并方式参数的图元场景执行渲染操作, 将与所述图元对应的动态 交互信息合并到所述静态交互数据纹理图中相对应的数据单元 中, 以在显示緩存中生成所述图元场景的交互信息映射图。
进一步的, 系统还可以包括静态交互数据纹理图生成模块, 用于由扩展的上层应用需求确定交互信息的内容分量, 按照预设 精度的分辨率生成位图作为静态交互数据纹理图, 并将所述分量 中静态交互信息分量保存到该位图中, 使图中每个像素所确定的 数据单元中保存与该像素对应的静态交互信息。
进一步的, 系统还可以包括:
第一渲染状态重设模块,用于在对设置了所述静态交互数据 紋理图的图元场景执行渲染操作之前,去除渲染特效参数的影响; 第二渲染状态重设模块,用于对设置了所述静态交互数据紋 理图的图元场景执行渲染操作之后, 恢复所述渲染特效参数的影 响。
为实现本发明的目的,本发明提供了一种图元场景渲染中生 成交互信息的方法, 在图元场景渲染过程中, 还包括以下步骤: 定义绘图引擎支持的着色器代码;
将定义好的着色器代码加载到绘图引擎中; 以及
对绘图引擎执行渲染操作,使绘图引擎执行之前设定的着色 器代码, 从而生成交互信息映射图。
为实现上述目的,本发明还提供了一种图元场景渲染中交互 信息生成系统, 包括:
加载模块, 用于接收定义好的着色器代码, 并通过绘图引擎 的接口将接收到的着色器代码加载到绘图引擎中; 和
执行模块, 用于对绘图引擎执行渲染操作, 使绘图引擎执行 之前设定的着色器代码, 从而生成交互信息映射图。
基于上述技术方案,本发明在基于绘图引擎的图元场景渲染 程序运行期间插入用于生成人机交互信息数据的逻辑代码, 这些 生成的交互信息被存入显示緩存, 且与原场景画面的屏幕坐标相 对应, 从而在不修改应用程序的情况下生成附加的交互信息映射 图, 该图为交互信息驱动引擎提供了基础数据。 附图说明
此处所说明的附图用来提供对本发明的进一步理解,构成本 申请的一部分,本发明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在附图中:
图 1为根据本发明第一实施例的图元场景渲染中生成交互信 息的方法的流程示意图。 图 2为根据本发明第一实施例的方法的一个应用实例的流程 示意图。
图 3为本发明交互信息映射图的示意图。
图 4为本发明显示緩存与显示屏之间的关系示意图。
图 5为本发明应用中读取交互信息的方法的一实例的流程示 意图。
图 6为根据本发明第一实施例的图元场景渲染中生成交互信 息的系统的一实例的结构示意图。
图 7为根据本发明第一实施例的图元场景渲染中生成交互信 息的系统的另一实例的结构示意图。
图 8为根据本发明第二实施例的图元场景渲染中生成交互信 息的方法的流程示意图。
图 9为根据本发明第二实施例的图元场景渲染中生成交互信 息的系统的一实例的结构示意图。 具体实施方式
现在将以具体的、 示例性实施例描述本发明。 应该理解, 本 发明不限于所披露的示例性实施例。 还应该理解, 目前所披露的 基于执行阶段信息来排列图形元素的方法和装置的每一个特征并 非都是实现所附权利要求任一具体权项要求保护的发明必不可少 的。 描述设备的多个元件和特征是为了使本发明完全能够得以实 施。 还应该理解的是, 在本说明书中, 在表示或者描述处理或方 法之处, 方法的步驟可以按照任何顺序执行或者同时执行, 除非 从上下文中显然可以看出一个步骤依赖于先前执行的另一步骤。
下面通过附图和实施例,对本发明的技术方案做进一步的详 细描述。
在描述本发明技术方案之前, 先给出一些技术名词的解释, 如下:
绘图引擎: 控制计算机显卡运作的程序接口, 本文将这些接 口和显卡看作一个整体, 并称之为绘图引擎;
图元场景: 二维或三维空间在观察时刻的状态;
图元: 构成图元场景的元素, 如: 圆, 三角, 楼房、 车等; 纹理: 被绘图引擎应用到图元表面用以表现图元纹理的位 图;
纹理色: 纹理位图指定像素点的颜色值;
渲染: 将图元场景变为一幅平面图片的工作, 由绘图引擎操 作显卡完成;
渲染状态: 渲染图元时所用的控制参数值;
反射、 漫射: 使渲染后图元表面上的一点带有周围图元颜色 的成分;
透明: 使渲染后图元表面上的一点带有被其遮挡的图元相应 点的颜色成分;
雾: 使渲染后图元表面上的一点带有某种特定颜色成分; 渲染目标: 存放渲染结果的緩冲区域;
分辨率: 指定面积内的像素数。
着色器: 用户自定义的渲染代码, 用于可编程流水线的渲染 环节。
显存: 用于存放显示处理过程中的临时数据的緩冲存储区。 如图 1所示, 图 1为才艮据本发明第一实施例的图元场景渲染 中生成交互信息的方法的流程示意图。 本实施例是基于固定流水 线处理器的实现。 在绘图引擎实现的图元场景渲染流程中, 还包 括以下步骤:
步驟 101、 将图元场景中所有图元的纹理设置为预先生成的 静态交互数据紋理图; 步骤 102、 设定用于指定在渲染时将动态交互信息合并到所 述静态交互数据纹理图的信息合并方式参数;
步驟 103、 对设置了所述静态交互数据纹理图和信息合并方 式参数的图元场景执行渲染操作 (也称附加渲染操作) , 将与所 述图元对应的动态交互信息合并到所述静态交互数据纹理图中相 对应的数据单元中, 以在显示緩存中生成所述图元场景的交互信 息映射图。
在预先生成静态交互数据纹理图时,将该图预设为固定的分 辨率, 以便绘图引擎在渲染后按照此分辨率精度将图元场景中各 个图元的表面分作多个数据单元, 并在该图的每个数据单元 (像 素) 的高位保存该数据单元对应的图元表面坐标偏移值作为静态 交互信息, 低位留空用于渲染时填充动态交互信息数据。 以此生 成的静态交互数据纹理图在渲染图元场景时被用于所有图元的表 面。所谓静态交互信息是指不需要在渲染过程中确认的交互信息, 例如点对应的图元表面坐标、 点所属图元表面区域号, 点的交互 类型信息等, 与其相对, 动态交互信息是指需要在渲染过程中确 认的交互信息, 例如图元的标识号、 图元所属的类别、 图元所关 联的场景或其他图元等。
本发明实施例可以在不修改原应用程序的情况下嵌入到一 般的图元场景渲染过程中, 接下来通过图 2的应用实例进一步进 行说明。 该应用实例包括以下的流程:
步骤 201、 对 3D物体进行摆放, 即对图元场景中各个图元 的位置进行设置, 并且设定各个图元的纹理。
步骤 202、 设定图元场景的渲染状态, 这里的渲染状态为一 些具体的特效参数, 例如反射、 漫射、 透明或者雾等, 这些渲染 状态会在渲染后的场景画面中表现出来。
步骤 203、 如果需要在该图元场景中生成交互信息, 则对图 元场景的渲染状态进行重新设定, 以将所有的特效参数设置为不 对渲染发生作用。
步驟 204、由扩展的上层应用需求确定交互信息的内容分量, 按照预设精度的分辨率生成位图, 即该图元场景中的静态交互数 据纹理图, 其中各个数据单元中既保存该数据单元对应的内容分 量中静态交互信息的分量, 同时也可以保留用于保存在渲染过程 中确认的动态交互信息的空位。
步骤 205、 将图元场景中所有图元的纹理设置为步骤 204中 预先生成的静态交互数据纹理图。
步驟 206、 设定用于指定在渲染时将动态交互信息合并到所 述静态交互数据纹理图的信息合并方式参数。 该参数的设定由扩 展的上层应用需求来确定交互信息各内容分量的数学运算合并方 式, 并根据所述数学运算合并方式将这些运算的操作、 操作数和 操作顺序设定到绘图引擎中。
步糠 207、 调用绘图引擎对设置了该静态交互数据纹理图和 信息合并方式参数的图元场景执行渲染操作, 将与所述图元对应 的动态交互信息合并到所述静态交互数据紋理图中相对应的数据 单元中, 以在显示緩存中生成所述图元场景的交互信息映射图。 交互信息映射图 1的构成如图 3所示, 其大小与显示屏幕一致, 每一个数据单元 2中都包括该数据单元对应的静态交互信息和动 态交互信息。
步骤 208、 恢复原有图元场景的渲染状态, 即重新设置特效 参数为有效, 并恢复原有图元场景中各个图元的紋理。
步骤 209、 调用绘图引擎对该图元场景执行渲染操作, 将原 场景画面渲染到显示緩存中的渲染目标。
在本实例中, 步驟 201、 202以及 209是原应用程序的渲染 流程, 从步骤 203-208则是嵌入的本发明实施例, 当判断需要生 成交互信息时, 在正常的渲染流程前加入本发明实施例的交互信 息生成流程, 就可以实现对原应用程序的交互能力的扩展。
通过以上的渲染流程,在显示緩存中存入了画面的渲染目标
4和交互信息映射图 1, 参见图 4所示, 这两种渲染目标通过显示 屏幕坐标关联起来, 如: 渲染目标 4所展现的景象中屏幕坐标为 ( xl,yl )位置上的点所对应的信息被保存在交互信息映射图 1中 对应位置的像素中。 在对图元场景的渲染完成后, 用户可以直接 观看到渲染目标 4所展示出的场景画面, 而交互信息映射图 1对 用户不可见, 且与该渲染目标 4相关联。
在本发明实施例的另一应用实例中, 步骤 204-206中可以将 静态交互信息设置在高位, 并通过相加操作将动态交互信息写入 低位。 这种合并方式仅为仅为一种生成交互信息的方式的示例, 不应理解为对交互信息写入方式的限定, 任何其他可以将交互信 息写入数据单元的方式 (例如将屏幕坐标设置在低位, 通过相加 将交互信息写入高位等)都在本发明的保护范围内。
在本发明实施例的另一应用实例中,生成静态交互数据紋理 图的操作还可以在渲染状态重新设定之前进行, 生成静态交互数 据紋理图的时机与与上层应用的需求有关, 也就是说所述被插入 的附加渲染流程可以在任意需要的时机被运行。
在图 2的应用实例中先生成交互信息映射图,再生成原来的 画面的渲染目标。 在其他的应用实例中, 原来的画面的渲染目标 的生成过程可以在交互信息映射图生成之前, 或者嵌在多个交互 信息映射图生成过程中。
步驟 203中通过重设表达渲染状态的渲染特效参数来消除通 过渲染获得的交互信息映射图时渲染特效参数的影响, 在进行原 场景画面的渲染前, 通过步驟 208恢复特效参数, 从而确保原场 景画面的准确展现。 如果在原场景画面中, 图元场景的特效参数 已被预先设置为不发挥作用, 或者已知被重设的特效参数并不影 响原场景画面的下一帧渲染, 则不需要在生成交互信息的流程中 加入重设和恢复渲染特效参数的步骤。
下面再通过图 5来说明本发明应用中读取交互信息的方法的 一个实例, 该实施例包括以下步驟:
步驟 301、 根据上层应用程序的请求获取相应的屏幕坐标, 例如响应鼠标的移动动作, 获取对应的屏幕坐标;
步驟 302、 读取显示緩存内存储的交互信息映射图中与屏幕 坐标对应的静态交互信息和动态交互信息。
通过图元场景渲染中生成交互信息,在显示緩存中就保存了 画面的渲染目标, 以及与其通过屏幕坐标相关联的一个或多个交 互信息映射图。 当获得了屏幕坐标时, 绘图引擎就可以从一个或 多个交互信息映射图中该屏幕坐标所对应的数据单元里提取出一 个或多个静态和动态交互信息。
如图 6所示, 图 6为 »据本发明第一实施例的图元场景渲染 中生成交互信息的系统的一实例的结构示意图。 在本实施例中, 系统至少包括紋理设置模块 5、合并参数设置模块 6和渲染模块 7。 其中纹理设置模块 5用于将图元场景中所有图元的紋理设置为预 先生成的静态交互数据纹理图。 合并参数设置模块 6用于设定用 于指定在渲染时将动态交互信息合并到所述静态交互数据紋理图 的信息合并方式参数。 渲染模块 7用于对设置了所述静态交互数 据紋理图和信息合并方式参数的图元场景执行渲染操作, 将与所 述图元对应的动态交互信息合并到所述静态交互数据紋理图中相 对应的数据单元中, 以在显存中生成所述图元场景的交互信息映 射图。
如图 7所示, 图 7为才艮据本发明第一实施例的图元场景渲染 中生成交互信息的系统的另一实例的结构示意图。 与上一实施例 相比, 本实施例还包括静态交互数据紋理图生成模块 8, 该模块 用于由扩展的上层应用需求确定交互信息的内容分量, 按照预设 精度的分辨率生成位图作为静态交互数据紋理图, 并将所述分量 中静态交互信息分量保存到该位图中, 使图中每个像素所确定的 数据单元中保存与该像素对应的静态交互信息。
在本实施例中,还可以包括第一渲染状态重设模块和笫二渲 染状态重设模块, 其中第一渲染状态重设模块用于在对设置了所 述静态交互数据紋理图的图元场景执行渲染操作, 去除渲染特效 参数的影响。 第二渲染状态重设模块用于对设置了所述静态交互 数据纹理图的图元场景执行渲染操作之后, 恢复所述渲染特效参 数的影响。
如图 8所示, 图 8为才 据本发明第二实施例的图元场景渲染 中生成交互信息的方法的流程示意图。 本实施例是基于着色器的 实现。在绘图引擎实现的图元场景渲染流程中,还包括以下步骤: 步骤 801、 定义绘图引擎支持的着色器。
具体而言, 定义着色器还包括: 定义着色器的寄存器常量和 数据混合过程, 其中在与图形处理器 (GPU )有关的编程中, 寄 存器常量并不是指数值固定的量, 而是指在绘图引擎中的位置不 变而存储内容可以改变的固定寄存器。
所定义的寄存器常量在运行期间用于让绘图引擎开辟相应 的寄存器上的空间, 以传递和存储由上层应用需求确定的交互信 息数据。而所定义的数据混合过程用于规定数据混合的实施方式。 数据混合过程在运行期间被绘图弓 I擎执行, 以将绘图引擎中的图 元相关信息 (例如, 贴图坐标) 与已定义的寄存器中的数据混合 (例如, 使用数学运算) , 生成图元表面一个数据单元的交互数 据, 作为着色器输出传递给绘图引擎。
在这里, 图元相关信息是指绘图引擎在执行渲染操作期间生 成并存储绘图引擎寄存器中的数据。 这些数据可以由着色器代码 直接从绘图引擎寄存器中读取。 以贴图为例, 当要将游戏场景中 的一面墙贴上纹理时, 这面墙的 4个顶点的坐标是绘图引擎生成 并存储在寄存器中, 并可由着色器获得的。 当然, 绘图引擎生成 的数据不限于坐标, 还包括其它很多信息, 这对本领域技术人员 而言是公知的。
在这里, 混合是指将绘图引擎中的图元相关信息与上层应用 确定的交互信息数据合并在一起的方式。 具体而言, 例如, 对于 32位真彩色显示应用程序, 图元表面的一个数据单元也是 32位 的,这是可以规定 "混合 "是"与,,运算,即高 16位存图元相关信息, 而低 16位存交互信息数据。 当然,也可以是"或,,、 "异或,,等运算, 只要能够将混合后的数据无误地分离成原样就行。
步骤 802、 将定义好的着色器代码通过绘图引擎接口加载到 绘图引擎中。
在成功加载之后,绘图引擎在其寄存器中为自定义着色器开 辟常量存储空间, 并在显存中加载该着色器代码备渲染时用。
步驟 803、 对绘图引擎执行渲染操作, 使绘图引擎执行之前 设定的着色器代码, 从而生成交互信息映射图。
具体而言, 绘图引擎按照数据混合过程定义规定的方式, 将 绘图引擎中的图元相关信息和着色器的寄存器常量中存储的由上 层应用需求确定的交互信息混合并写入交互信息映射图。
在渲染过程中上层应用程序可以根据需求通过绘图引擎动 态地修改寄存器常量中的数据, 以将有用的交互信息合成到交互 信息映射图中。
以游戏场景举例, 当用户在上层的游戏应用程序中用鼠标指 针选择某个图元 (例如树等) 时, 上层应用程序可以从操作系统 中获取鼠标指针的屏幕坐标信息, 并且在显示緩存中查找该屏幕 坐标是否对应有交互信息映射图中的静态交互信息 (例如图元平 面上的坐标 x,y ) 和动态交互信息 (例如图元标识 a ) , 如果有, 则读取该交互信息, 从而使上层应用程序能够了解到鼠标指针当 前所指的位置是图元标识为 a的图元的 x,y位置, 进而利用这些 信息进行更复杂的处理。
在本实施例中, 不需要如图 2中的步骤 203中所示的那样对 表达渲染状态的渲染特效参数进行重设和恢复以避免影响当前显 示的图元场景。
在根据本实施例生成了交互信息映射图之后,也可以使用参 照图 5所描述的方法来读取交互信息。
如图 9所示, 图 9为根据本发明第二实施例的图元场景渲染 中生成交互信息的系统的一实例的结构示意图。 在本实施例中, 系统至少包括加载模块 901和执行模块 902。
加载模块 901接收定义好的着色器代码,并通过绘图引擎的 接口将接收到的着色器代码加载到绘图引擎中。 具体而言, 着色 器代码是由程序负定义的,并传给加载模块 901的。执行模块 903 对绘图引擎执行渲染操作, 使绘图引擎执行之前设定的着色器代 码, 从而生成交互信息映射图。 上述各个模块的具体操作在上文 中已经进行了描述, 在此不再赘述。
本发明实施例在基于绘图引擎的图元场景渲染程序运行期 间插入用于生成人机交互信息数据的逻辑代码 , 这些生成的交互 信息被存入显示緩存, 且与原场景画面的屏幕坐标相对应, 从而 在不修改应用程序的情况下生成附加的交互信息映射图, 该图为 交互信息驱动程序提供了基础数据。
本领域普通技术人员可以理解: 实现上述方法实施例的全部 或部分步驟可以通过程序指令相关的硬件来完成, 前述的程序可 以存储于一计算机可读取存储介质中, 该程序在执行时, 执行包 括上述方法实施例的步骤;而前述的存储介质包括: ROM、 RAM、 磁碟或者光盘等各种可以存储程序代码的介质。
本领域普通技术人员可以理解, 以上出于说明清楚的目的参 照不同功能部件和处理器对本发明的实施例进行了描述。 显然, 在不偏离本发明的条件下, 可在不同功能部件或处理器之间使用 任何合适的功能分布。 例如, 所示出的由分立单元或处理器执行 的功能可由同一单元或处理器执行。 因此, 仅将针对具体功能部 件的描述视为是对用于提供所述功能的合适装置的描述, 而不表 示严格的逻辑或物理结构或组织。
最后应当说明的是:以上实施例仅用以说明本发明的技术方 案而非对其限制; 尽管参照较佳实施例对本发明进行了详细的说 明, 所属领域的普通技术人员应当理解: 依然可以对本发明的具 体实施方式进行修改或者对部分技术特征进行等同替换; 而不脱 离本发明技术方案的精神, 其均应涵盖在本发明请求保护的技术 方案范围当中。

Claims

权 利 要 求
1、 一种图元场景渲染中生成交互信息的方法, 在图元场景 渲染过程中, 还包括以下步骤:
将所述图元场景中所有图元的纹理设置为预先生成的静态 交互数据纹理图, 并设定用于指定在渲染时将动态交互信息合并 到所述静态交互数据紋理图的信息合并方式参数;
对设置了所述静态交互数据纹理图和信息合并方式参数的 图元场景执行渲染操作, 将与所述图元对应的动态交互信息合并 到所述静态交互数据纹理图中相对应的数据单元中, 以在显示緩 存中生成所述图元场景的交互信息映射图。
2、 根据权利要求 1 所述的图元场景渲染中生成交互信息的 方法, 其中预先生成静态交互! ^据纹理图的操作包括:
先由扩展的上层应用需求 定交互信息的内容分量,按照预 设精度的分辨率生成位图作为静态交互数据纹理图, 并将所述分 量中静态交互信息的分量保存到该位图中, 使图中每个像素所确 定的数据单元中保存与该像素对应的静态交互信息。
3、 根据权利要求 1 所述的图元场景渲染中生成交互信息的 方法, 其中所述设定交互信息合并方式的操作包括:
先由扩展的上层应用需求确定交互信息各内容分量的数学 运算合并方式,并根据所述数学运算合并方式将这些运算的操作、 操作数和操作顺序设定到绘图引擎中。
4、 根据权利要求 1 所述的图元场景渲染中生成交互信息的 方法, 其中对设置了所述静态交互数据纹理图的图元场景执行渲 染操作之前, 还包括去除渲染特效参数的操作。
5、 一种图元场景渲染中交互信息生成系统, 包括:
纹理设置模块,用于将所述图元场景中所有图元的纹理设置 为预先生成的静态交互数据纹理图;
合并参数设置模块,用于设定用于指定在渲染时将动态交互 信息合并到所述静态交互数据纹理图的信息合并方式参数;
渲染模块,用于对设置了所述静态交互数据紋理图和信息合 并方式参数的图元场景执行渲染操作, 将与所述图元对应的动态 交互信息合并到所述静态交互数据纹理图中相对应的数据单元 中, 以在显示緩存中生成所述图元场景的交互信息映射图。
6、 根据权利要求 5 所述的图元场景渲染中交互信息生成系 统, 其中还包括静态交互数据紋理图生成模块, 用于由扩展的上 层应用需求确定交互信息的内容分量, 按照预设精度的分辨率生 成位图作为静态交互数据纹理图, 并将所述分量中静态交互信息 分量保存到该位图中, 使图中每个像素所确定的数据单元中保存 与该像素对应的静态交互信息。
7、 根据权利要求 5 所述的图元场景渲染中交互信息生成系 统, 其中还包括:
状态重设模块,用于在对设置了所述静态交互数据纹理图的 图元场景执行渲染操作之前, 去除渲染特效参数的影响。
8、 一种图元场景渲染中生成交互信息的方法, 在图元场景 渲染过程中, 还包括以下步驟:
定义绘图引擎支持的着色器代码;
将定义好的着色器代码加载绘图引擎中; 以及
对绘图引擎执行渲染操作,使绘图引擎执行之前设定的着色 器代码, 从而生成交互信息映射图。
9、 才 据权利要求 8 所述的图元场景渲染中生成交互信息的 方法, 其中所述定义绘图引擎支持的着色器代码的步骤包括: 定义寄存器常量和数据混合过程,
其中, 所定义的寄存器常量在运行期间用于让绘图引擎开辟 相应的寄存器上的空间, 以传递和存储由上层应用需求确定的交 互信息数据; 并且
其中, 所定义的数据混合过程规定了数据混合的实施方式, 在运行期间被绘图引擎执行, 以将绘图引擎中的图元相关信息与 已定义的寄存器中的数据混合, 生成图元表面一个数据单元的交 互数据, 作为着色器输出传递给绘图引擎。
10、 根据权利要求 8所述的图元场景渲染中生成交互信息的 方法, 其中所述对绘图引擎执行渲染操作的步骤包括:
通过调用绘图引擎的渲染操作接口,使绘图引擎按照定义的 数据混合过程所规定的方式, 将绘图引擎中的图元相关信息和着 色器的寄存器常量中存储的由上层应用需求确定的交互信息混合 并写入交互信息映射图; 并且
其中, 在调用绘图引擎的渲染操作接口的同时, 可以通过调 用绘图引擎, 修改绘图引擎的寄存器上的相应数据, 使绘图引擎 执行混合过程时, 将动态设定的数据合并到交互信息映射图中。
11、 一种图元场景渲染中交互信息生成系统, 包括:
加载模块, 用于接收定义好的着色器代码, 并通过绘图引擎 的接口将接收到的着色器代码加载到绘图引擎中; 和
执行模块, 用于对绘图引擎执行渲染操作, 使绘图引擎执行 之前设定的着色器代码, 从而生成交互信息映射图。
12、 根据权利要求 11 所述的图元场景渲染中交互信息生成 系统, 其中所述定义好的着色器代码定义了寄存器常量和数据混 合过程,
其中, 所定义的寄存器常量在运行期间用于让绘图引擎开辟 相应的寄存器上的空间, 以传递和存储由上层应用需求确定的交 互信息数据; 并且
其中, 所定义的数据混合过程规定了数据混合的实施方式, 在运行期间被绘图引擎执行, 以将绘图引擎中的图元相关信息与 已定义的寄存器中的数据混合, 生成图元表面一个数据单元的交 互数据, 作为着色器输出传递给绘图引擎。
13、 根据权利要求 11 所述的图元场景渲染中交互信息生成 系统, 其中所述执行模块通过调用绘图引擎的渲染操作接口, 使 绘图引擎按照定义的数据混合过程所规定的方式, 将绘图引擎中 的图元相关信息和着色器的寄存器常量中存储的由上层应用需求 确定的交互信息混合并写入交互信息映射图; 并且
其中, 所述执行模块在调用绘图引擎的渲染操作接口的同 时, 可以通过调用绘图引擎, 修改绘图引擎的寄存器上的相应数 据, 使绘图引擎执行混合过程时, 将动态设定的数据合并到交互 信息映射图中。
PCT/CN2009/000355 2008-06-30 2009-04-01 交互信息生成方法及系统 WO2010000126A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200810126014.2 2008-06-30
CN200810126014A CN101620740A (zh) 2008-06-30 2008-06-30 交互信息生成方法及系统

Publications (1)

Publication Number Publication Date
WO2010000126A1 true WO2010000126A1 (zh) 2010-01-07

Family

ID=41465466

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/000355 WO2010000126A1 (zh) 2008-06-30 2009-04-01 交互信息生成方法及系统

Country Status (2)

Country Link
CN (1) CN101620740A (zh)
WO (1) WO2010000126A1 (zh)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542597A (zh) * 2010-12-29 2012-07-04 新奥特(北京)视频技术有限公司 一种三维场景图直接嵌入特效图的方法及系统
CN102567936A (zh) * 2010-12-30 2012-07-11 新奥特(北京)视频技术有限公司 一种多位深度多分辨率的图像编辑方法和系统
CN102957748A (zh) * 2012-11-07 2013-03-06 广东威创视讯科技股份有限公司 三维场景动态更新方法和系统
CN102999880B (zh) * 2012-11-14 2016-04-20 厦门亿力吉奥信息科技有限公司 基于GPU的电力WebGIS矢量实时绘制方法及装置
CN103927624A (zh) * 2014-04-18 2014-07-16 杭州郑达艺学科技有限公司 美术教学系统
CN106157276A (zh) * 2016-06-15 2016-11-23 南京快脚兽软件科技有限公司 一种适用于多种场景的多目标交互引擎渲染方法
CN106204713B (zh) * 2016-07-22 2020-03-17 网易(杭州)网络有限公司 静态合并处理方法和装置
CN108346174B (zh) * 2017-12-31 2020-11-24 广州都市圈网络科技有限公司 一种支持单模型交互的三维模型合并方法
CN108733441A (zh) * 2018-04-11 2018-11-02 中国电力科学研究院有限公司 一种适用于大规模电网符号设备的渲染可视化方法及系统
CN109215103A (zh) * 2018-08-30 2019-01-15 西安恒歌数码科技有限责任公司 一种基于osg的大批量文字渲染方法
CN109925715B (zh) * 2019-01-29 2021-11-16 腾讯科技(深圳)有限公司 一种虚拟水域生成方法、装置及终端
CN109978979A (zh) * 2019-03-08 2019-07-05 广联达科技股份有限公司 提高实时渲染交互流畅性的方法、装置及电子设备
CN111228801A (zh) * 2020-01-07 2020-06-05 网易(杭州)网络有限公司 游戏场景的渲染方法和装置、存储介质、处理器
CN112291619B (zh) * 2020-10-24 2023-09-29 西北工业大学 一种基于阻塞与停顿的移动端小程序帧渲染方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050151751A1 (en) * 2003-09-18 2005-07-14 Canon Europa N.V. Generation of texture maps for use in 3D computer graphics
CN1985278A (zh) * 2004-07-15 2007-06-20 英特尔公司 对于象素着色器硬件的传统处理
CN101189643A (zh) * 2005-04-25 2008-05-28 株式会社亚派 3d图像生成和显示系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050151751A1 (en) * 2003-09-18 2005-07-14 Canon Europa N.V. Generation of texture maps for use in 3D computer graphics
CN1985278A (zh) * 2004-07-15 2007-06-20 英特尔公司 对于象素着色器硬件的传统处理
CN101189643A (zh) * 2005-04-25 2008-05-28 株式会社亚派 3d图像生成和显示系统

Also Published As

Publication number Publication date
CN101620740A (zh) 2010-01-06

Similar Documents

Publication Publication Date Title
WO2010000126A1 (zh) 交互信息生成方法及系统
Sellers et al. Vulkan programming guide: The official guide to learning vulkan
US9715750B2 (en) System and method for layering using tile-based renderers
EP2245598B1 (en) Multi-buffer support for off-screen surfaces in a graphics processing system
CN110262907B (zh) 用于统一应用编程接口和模型的系统和方法
US20080284798A1 (en) Post-render graphics overlays
TW201618041A (zh) 來自片段著色器程式之樣本遮罩的控制
KR20170132758A (ko) 하이브리드 2d/3d 그래픽 렌더링
US10319068B2 (en) Texture not backed by real mapping
US11120591B2 (en) Variable rasterization rate
CN114972607B (zh) 加速图像显示的数据传输方法、装置及介质
US8907979B2 (en) Fast rendering of knockout groups using a depth buffer of a graphics processing unit
US9153193B2 (en) Primitive rendering using a single primitive type
US11010863B2 (en) Bindpoint emulation
CN112581575B (zh) 一种外视频做纹理系统
Peddie 1980–1989, Graphics Controllers on Other Platforms
Baek A Simplified Graphics System Based on Direct Rendering Manager System
Sutherland et al. Chapter 14: 3D Graphics Programming
Lee et al. Referential software architecture of integrated graphic system for mobile handset devices

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09771896

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 09771896

Country of ref document: EP

Kind code of ref document: A1