[go: up one dir, main page]

CN107038060A - A kind of page coloring device code debugging method, device - Google Patents

A kind of page coloring device code debugging method, device Download PDF

Info

Publication number
CN107038060A
CN107038060A CN201610866146.3A CN201610866146A CN107038060A CN 107038060 A CN107038060 A CN 107038060A CN 201610866146 A CN201610866146 A CN 201610866146A CN 107038060 A CN107038060 A CN 107038060A
Authority
CN
China
Prior art keywords
tinter
code
former
simulation
debugging
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610866146.3A
Other languages
Chinese (zh)
Other versions
CN107038060B (en
Inventor
董晓庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201610866146.3A priority Critical patent/CN107038060B/en
Publication of CN107038060A publication Critical patent/CN107038060A/en
Application granted granted Critical
Publication of CN107038060B publication Critical patent/CN107038060B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45529Embedded in an application, e.g. JavaScript in a Web browser
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Graphics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a kind of page coloring device code debugging method, device.Methods described includes:When triggering debugging mode, the simulation tinter of the former tinter of loading;The debugging of the former shader code parameter of web terminal is carried out in the simulation tinter;In debugging process, the former shader code parameter after being debugged in the simulation tinter is converted into the corresponding character string of the former tinter according to default transformation rule.Each embodiment of the application can greatly improve tinter debugging effect there is provided the solution that web terminal debugs tinter.

Description

A kind of page coloring device code debugging method, device
Technical field
The application belongs to page data processing technology field, more particularly to a kind of page coloring device code debugging method, dress Put.
Background technology
With the continuous improvement developed rapidly with user's request of computer technology, present web terminal page 3D Display Techniques Also increasingly paid close attention to by developer.
Described web terminal typically refers to include the various page browsers on the terminal devices such as PC, mobile phone, flat board, can be with The page in webpage is browsed by web terminal.Various 3D pages effects can be realized in web terminal at present, page presentation can be enriched Content, improves bandwagon effect.The exploitation for carrying out 3D figures in currently available technology in web terminal needs to use webGL technologies. WebGL is a kind of 3D drafting standards, and WebGL can provide hardware 3D for HTML5Canvas and accelerate to render, such Web exploit persons Member can just come to show 3D scenes and model more glibly in browser by system video card, moreover it is possible to create complicated navigation Visualized with data.There is provided tinter in webGL technologies, the code that can run the support of webGL tinters (herein may be used To be referred to as webGL shader codes), for realizing various 3D effects.Such as using during webGL exploitation 3D figures, it is necessary to write The example code of tinter is as follows:
And webGL shader codes need to be write with character string, the code of these in development process can be loaded into GPU and hold OK, so can not be debugged to shader code.
Clearly as during web terminal page development, it is impossible to which the webGL shader codes in operation are debugged, drop Low web terminal page development efficiency.
The content of the invention
The application purpose is that provide a kind of page coloring device code debugging method, device colours there is provided web terminal debugging The solution of device, can greatly improve tinter debugging efficiency and 3D page development effects, be that 3D is developed, VR/AR exploitations are carried It is provided with the technical support of power.
A kind of page coloring device code debugging method of the application offer, device are realized in:
A kind of page coloring device code debugging method, methods described includes:
When triggering the shader code debugging of the page, the simulation tinter of the former tinter of loading, the simulation tinter quilt It is arranged to using default Programming language and simulates the running environment compiling generation of former tinter;
In the simulation tinter, the shader code of the page is debugged;
Shader code after being debugged in the simulation tinter is translated into the original according to default transformation rule The corresponding character string of tinter, and the character string is embedded into the former tinter corresponding code position.
A kind of page coloring device debugging apparatus, described device includes:
Load-on module is debugged, for when triggering the shader code debugging of the page, loading the simulation coloring of former tinter Device, the simulation tinter is configured to using default Programming language and simulates the running environment compiling life of former tinter Into;
Processing module is debugged, in the simulation tinter, being debugged to the shader code of the page;
Code conversion module, for by it is described simulation tinter in debug after shader code according to default conversion Rule translates into the corresponding character string of the former tinter, and the character string is embedded into the former tinter into corresponding generation Code position.
A kind of page coloring device code debugging method of the application offer, device simulate tinter there is provided one kind, write mould The JS codes of such as adjustable programming can be used by intending the code of tinter, can be with former tinter together work during commissioning test Make, the debugging of former shader code is then carried out in simulation tinter.Common JS codes can be turned over when without debugging The character string of former tinter is translated into, is then embedded into the corresponding code of former tinter.The application is in page coloring device in web terminal Simulation tinter can be provided during debugging, operating personnel can debug row shader code in simulation tinter, then can be with By the Content Transformation of debugging into real webGL tinters character string, it is embedded into real webGL shader codes and runs, Realize the debugging of original webGL tinters.The problem of tinter can not being debugged present application addresses web terminal, and effect is changed with performance Really, tinter debugging efficiency can be significantly improved, 3D exploitations, VR/AR exploitations is carried out to following web terminal strong technology is provided Support.
Brief description of the drawings
, below will be to embodiment or existing in order to illustrate more clearly of the embodiment of the present application or technical scheme of the prior art There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments described in application, for those of ordinary skill in the art, are not paying the premise of creative labor Under, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of a kind of method flow diagram of embodiment of page coloring device code debugging method that the application is provided;
Fig. 2 is the data flow schematic diagram between tinter when the application simulates tinter using JS written in code;
Fig. 3 is a kind of method flow signal of another implementation for page coloring device code debugging method that the application is provided Figure;
Fig. 4 is a kind of method flow signal for another embodiment of page coloring device code debugging method that the application is provided Figure;
Fig. 5 is a kind of modular structure schematic diagram of embodiment of a kind of page coloring device debugging apparatus that the application is provided;
Fig. 6 is a kind of modular structure schematic diagram for another embodiment of page coloring device debugging apparatus that the application is provided;
Fig. 7 is a kind of modular structure schematic diagram for another embodiment of page coloring device debugging apparatus that the application is provided;
Fig. 8 is that a kind of implementation framework of the method or apparatus scheme progress page 3D graphic plottings provided using the application is shown It is intended to.
Embodiment
In order that those skilled in the art more fully understand the technical scheme in the application, it is real below in conjunction with the application The accompanying drawing in example is applied, the technical scheme in the embodiment of the present application is clearly and completely described, it is clear that described implementation Example only some embodiments of the present application, rather than whole embodiments.Based on the embodiment in the application, this area is common The every other embodiment that technical staff is obtained under the premise of creative work is not made, should all belong to the application protection Scope.
Fig. 1 is a kind of a kind of herein described method flow diagram of embodiment of page coloring device code debugging method.Although This application provides such as following embodiments or method operating procedure shown in the drawings or apparatus structure, but based on conventional or need not Performing creative labour can include operating procedure or module less after more or part merges in methods described or device Unit.In the step of necessary causality is not present in logicality or structure, the execution sequence of these steps or the mould of device Block structure is not limited to the embodiment of the present application or execution sequence shown in the drawings or modular structure.Described method or modular structure When device or end product in practice is applied, it can be carried out according to embodiment or method shown in the drawings or modular structure Order perform or it is parallel perform (environment of such as parallel processor or multiple threads, even including distributed treatment Implementation environment).
The application, can to solve in a kind of embodiment that the problem of prior art web terminal can not debug tinter provides To write simulation tinter using certain Programming language in advance, the simulation tinter is to draw 3D rendering according to the page to use Former tinter running environment simulation generation.Described simulation tinter can be raw during web terminal tinter is debugged Into generation is compiled when project, tinter can be simulated with load operating when needing to carry out page coloring device code debugging.This Apply for that the Pages Design language for the adjustable that the simulation tinter of embodiment can be used using operating personnel writes generation, therefore The tinter of simulation can be run in debugging, it is possible to the code run in former tinter is carried out in simulation tinter Debugging.Specific one kind practices scene as described in Figure 1, a kind of page coloring device code debugging method that the application is provided A kind of embodiment can include:
S1:When triggering the shader code debugging of the page, the simulation tinter of the former tinter of loading, the simulation tinter It is configured to using default Programming language and simulates the running environment compiling generation of former tinter;
S2:In the simulation tinter, the shader code of the page is debugged;
S3:Shader code after being debugged in the simulation tinter is translated into according to default transformation rule described The corresponding character string of former tinter, and the character string is embedded into the former tinter corresponding code position.
Described tinter, is that one kind is transported on GPU (Graphics Processing Unit, GPU, image processor) Capable program, it can be understood as the instruction and data operated in video card.The tinter that general page 3D graphical developments are used leads to Often include vertex shader and piece member tinter.The main task of vertex shader is the coordinate for receiving three dimensions midpoint, will It is processed as the coordinate in page two-dimensional space and output;The main task of piece member tinter is to needing on screen to be processed Each pixel exports a color value.Vertex shader is mainly reception attribute variables and uniform variables. Attribute variable storages the data on putting itself, and it is mainly position a little.The data of uniform variable storages can For helping tinter to complete task, in other words, tinter is to need uniform variables and generally do not handle them.Top Point Coloring device, which needs to export varying variables, gives piece member tinter.It is general, it is described in webGL tinters Attribute, uniform, varying are mainly the effect for describing the variable in tinter.
The application is specifically carried out using webGL tinters in the embodiment application scenarios of 3D rendering exploitation design, described Former tinter be webGL tinters.Described simulation tinter can write generation using a variety of Programming language.By In webGL be mainly used in for HTML5Canvas provide hardware 3D accelerate render, such web developer just can be by system Video card comes displaying 3D scenes and model, and can create navigation and the data visualization of complexity more glibly in browser.Therefore, Tinter is simulated described in a kind of embodiment can be using a kind of JS (Javascript, JS, script) written in code Into, be mainly used in the debugging of the page 3D rendering processing.Therefore, in a kind of embodiment that the application is provided,
S101:The former tinter is webGL tinters, and the simulation tinter is using the generation of JS written in code.
Fig. 2 is the data flow schematic diagram between tinter when the application simulates tinter using JS written in code.Such as Fig. 2 It is shown, in the present embodiment application scenarios, during WebGL graphings, using two kinds of tinters:Vertex shader and piece member coloring Device.As shown in FIG., vertex shader can read vertex information from caching, and javascript codes set uniform to become Amount and attribute variables.Vertex shader reads attribute variables and uniform variables, exports varying variables, defeated The varying variables gone out can carry out mathematic interpolation automatically according to summit;Piece member tinter can according to uniform variables and Varying variables calculate the color for obtaining current point.
When the embodiment of the present application writes tinter using Javascript codes, a series of conversion rule can be pre-established Javascript codes are then realized to the conversion of former tinter character string, can compatible original webGL and tinter variable lead to Letter, realizes the mathematic interpolation of varying variables.A specific example is as follows:
The code of former tinter:
The javascript codes simulated in tinter write in the present embodiment using JS:
The shader code of processing is debugged in simulation tinter to be generated according to default transformation rule translation before The corresponding character string of former tinter that page 3D is started with.Code turns between specific simulation tinter and former tinter Change rule and communication mode, function loading call etc. and can apply according to the default Programming language of use and specifically ring Border design needs to set., can be described in a kind of a kind of embodiment for page coloring device code debugging method that the application is provided Default transformation rule is configured to, and can be included:
S301:Shader code after debugging is translated into the character string of former tinter according to the prefix information of variable, become Communication execution and call function between amount is identical with former tinter.
In the present embodiment application scenarios, the javascript code translations debugged in simulation tinter into WebGL During color device code, it can only need to be translated according to the prefix of variable.For example:
Var vec4_a_Position are translated into:attribute vect4a_Position
Var vec4_v_Color translate into varying vec4v_Color;
Then, open debugging when, be switched to the simulation that the embodiment of the present application is write webGL environment (simulate Color device), the communication of processing attribute variables and uniform variables, such as:
WebGL environment:
Var gl=initContext (' webgl');
Debug environment:
Var gl=initContext (' debug ');
The communication mode of attribute variables and uniform variables and call/loading function is constant:
Var u_xformMatrix=gl.getUniformLocation (gl.program, ' u_xformMatrix');
gl.uniformMatrix4fv(u_matrix,false,projMatrix.elements);
In actual job, the different code running environment of switching can be realized by the call parameters of user, such as Operating personnel writes the shader code of completion, shader code can be locally directly compiled into webGL code, is adjusting Determine loading according to the parameter of call by passing during examination is simulation tinter or original webGL tinters to run tinter generation Code.And the problem of environment changing described above, can add corresponding in code at the beginning in some computer design languages Statement description.As in the present embodiment application scenarios, tinter is simulated using JS written in code, " debug can be defined as herein Environment " (debugging enironment), shown in following code:
//webGL environment:
Var gl=initContext (' webgl');
//debug environment:
Var gl=initContext (' debug ');
2 files of generation can be compiled when page debugging business item is generated, one is JS versions, and one is WebGL versions.The different mode that can be switched according to user loads corresponding file.Therefore, a kind of page that the application is provided In another implementation of shader code adjustment method, it can also be wrapped in triggering shader code debugging foregoing description method Include:
S0:The code file of the former tinter of compiling generation and the code file of simulation tinter, the generation of the former tinter The code file of code file and simulation tinter is provided with corresponding startup call parameters;
Accordingly, the simulation tinter of the former tinter of loading includes basis during the shader code debugging of the triggering page Incoming Start-up and Adjustment parameter determines the simulation tinter of the former tinter of loading.
Fig. 3 is a kind of method flow signal of another implementation for page coloring device code debugging method that the application is provided Figure.It is specific to implement in processing procedure, such as in the above-mentioned application scenarios for defining " debug environment " (debugging enironment), when with Family is browser generation wbgl objects toward what is called inside initContext functions during transmission ' webgl '.When incoming is During ' debug ' parameter, return be the application write simulation tinter in webgl objects.Image rendering processing below Process can then give the JS codes in simulation tinter to handle.User can adjust according to the image result of simulation tinter Parameter, is debugged to the shader code of the page.Certainly, webgl pairs is carried out in the simulation tinter write using the application JS codes during as debugging can be handled by CPU (Central Processing Unit, central processing unit).After CPU debugging Shader code the character string of the former tinter needed for GPU is performed is translated into according still further to default transformation rule before, and can The corresponding code position of former tinter is embedded into the tinter after these are debugged.Specific code position can also root It is determined according to incoming parameter or the debugging node of setting etc..
Further, coloured by shader code debugging and transition translation that the page is carried out in simulation tinter into original After the character string that device needs, the shader code including the corresponding character string of former tinter after the conversion can be loaded into Run in GPU.The debugging of shader code is such as carried out in debug environment by parameter call, after the completion of debugging, in webGL The character string that automatically can be needed this section of JS code translation into former tinter under environment, then will include character after these debugging The former shader code of string is loaded into GPU and run, the page 3D operational effects checked after debugging.Fig. 4 is the application offer A kind of another embodiment of page coloring device code debugging method method flow schematic diagram, as shown in figure 4, methods described is also It can include:
S4:The shader code of the page in the former tinter is loaded into graphics processor.
So, the embodiment of the present application can determine it is the webGL rings for starting the simulation write by different incoming parameters Border or original webGL running environment., can be normally right using JS codes in the simulation tinter of offer when needing debugging Shader code is debugged.The character string for needing the JS code translation members tinter of these debugging during without debugging, And can be embedded into real webGL codes, run for GPU.Web terminal can be effectively solved using the embodiment of the present application scheme The tinter debugging problem during processing of the 3D pages can not be debugged, tinter debugging efficiency and page development effect is effectively improved.
The application can provide simulation tinter when web terminal is debugged in page coloring device, and operating personnel can be in simulation In tinter carry out shader code debugging, then can by the Content Transformation of debugging into real webGL tinters character string, It is embedded into real webGL shader codes and runs, realizes the debugging of original webGL tinters.Present application addresses web terminal without The problem of method debugs tinter, and effect is changed with performance, tinter debugging efficiency can be significantly improved, following web terminal is entered Row 3D exploitations, VR/AR exploitations provide strong technical support.
Based on a kind of page coloring device adjustment method described herein, the application also provides a kind of page coloring device debugging Device.Described device can be included using that can enter the simulation tinter of edlin debugging in CPU one end, to realize on web Carried out during 3D graphical developments the debugging of webGL shader codes.Fig. 5 is a kind of page coloring device debugging that the application is provided A kind of modular structure schematic diagram of embodiment of device, as shown in figure 5, described device can include:
Load-on module 101 is debugged, be can be used for when triggering the shader code debugging of the page, the mould of the former tinter of loading Intend tinter, the simulation tinter is configured to using default Programming language and simulates the running environment volume of former tinter Translate generation;
Processing module 102 is debugged, can be used in the simulation tinter, the shader code of the page is adjusted Examination;
Code conversion module 103, can be used for the shader code after being debugged in the simulation tinter according to pre- If transformation rule translate into the corresponding character string of the former tinter, and the character string is embedded into the former tinter Corresponding code position.
The embodiment of the present application provides a kind of page coloring device code debugging device, can use the JS of such as adjustable programming Written in code simulates tinter, can together be worked with former tinter during commissioning test, is then carried out in simulation tinter former The debugging of shader code.Then former tinter can be embedded into by common JS code translations into the character string of former tinter In corresponding code, the debugging of original webGL tinters is realized.The problem of tinter can not being debugged present application addresses web terminal, and And effect is changed with performance, tinter debugging effect and debugging efficiency can be significantly improved, 3D exploitations, VR/ are carried out to following web terminal AR exploitations provide strong technical support.
Former tinter described herein is primarily referred to as that in page development running code debugging can not be carried out Tinter, and the Programming language that described simulation tinter, which can then use local cpu, to be debugged with direct compilation is write Form.It is described in the tinter used for the 3D drawing marks webGL of targeted mainstream, a kind of embodiment that the application is provided Former tinter is webGL tinters, and the simulation tinter is using the generation of JS written in code.Certainly, as preceding method is implemented Example description is described, and in another embodiment of herein described building, the default transformation rule can include:According to variable The communication that prefix information is translated into the shader code after debugging between the character string of former tinter, variable performs and called letter Number is identical with former tinter.
In actual job, the different code running environment of switching can be realized by the call parameters of user, such as Operating personnel writes the shader code of completion, shader code can be locally directly compiled into webGL code, is adjusting Determine loading according to the parameter of call by passing during examination is simulation tinter or original webGL tinters to run tinter generation Code.And the problem of environment changing described above, can add corresponding in code at the beginning in some computer design languages Statement description.In specific implementation process, 2 files of generation can be compiled, one is JS versions, and one is webGL versions.Can Corresponding file is loaded with the different mode switched according to user.Fig. 6 is a kind of page coloring device debugging dress that the application is provided A kind of modular structure schematic diagram of embodiment is put, as shown in fig. 6, described device can also include:
Collector 100, can be used for the code file of the former tinter of compiling generation and the code file of simulation tinter, The code file of the former tinter and the code file of simulation tinter are provided with corresponding startup call parameters;
Accordingly, the debugging load-on module 101 former tinter of loading when triggering the shader code debugging of the page Simulate the simulation tinter that tinter includes determining the former tinter of loading according to incoming Start-up and Adjustment parameter.
Further, coloured by shader code debugging and transition translation that the page is carried out in simulation tinter into original After the character string that device needs, the shader code including the corresponding character string of former tinter after the conversion can be loaded into Run in GPU.The debugging of shader code is such as carried out in debug environment by parameter call, after the completion of debugging, in webGL The character string that automatically can be needed this section of JS code translation into former tinter under environment, then will include character after these debugging The former shader code of string is loaded into GPU and run, the page 3D operational effects checked after debugging.Fig. 7 is the application offer A kind of a kind of modular structure schematic diagram of embodiment of page coloring device debugging apparatus, as shown in fig. 7, described device can also be wrapped Include:
Code load-on module 104, can be used for the shader code of the page in the former tinter being loaded at image Manage in device and run.
Fig. 8 is that a kind of implementation framework of the method or apparatus scheme progress page 3D graphic plottings provided using the application is shown It is intended to.As shown in figure 8, the page coloring device code debugging method of the embodiment of the present application offer, device, can be provided using for example The simulation tinter of the JS codes of adjustable programming, can together work with former tinter during commissioning test, then simulate The debugging of former shader code is carried out in color device.Without debugging when can by common JS code translations into former tinter word Symbol string, is then embedded into the corresponding code of former tinter.The application can provide mould in page coloring device when web terminal is debugged Intend tinter, operating personnel can debug row shader code in simulation tinter, then can be by the Content Transformation of debugging Into real webGL tinters character string, it is embedded into real webGL shader codes and runs, realizes original webGL tinters Debugging.The problem of tinter can not being debugged present application addresses web terminal, and effect is changed with performance, it can significantly improve Color device debugging efficiency, 3D exploitations, VR/AR exploitations are carried out to following web terminal and provides strong technical support.
Although being mentioned in teachings herein using the communication between JS written in code simulation tinter, tinter each variable And the page of the transformation rule of code, parameter call mode or the like is set between numerical computations, simulation tinter and former tinter The description of language, regular definition, interacting message etc. is counted, still, the application is not limited to meet the standard page in the industry Situation described by design language, message transmission, parameter call or embodiment.Some professional standards use self-defined mode Or embodiment amended slightly can also realize that above-described embodiment is identical, be equal or phase on the practice processes of embodiment description The implementation result closely or after deformation being anticipated that.Using the implementation of the acquisitions such as judgement, the processing mode after these modifications or deformation Within the scope of example, the optional embodiment that still may belong to the application.
Although this application provides the method operating procedure as described in embodiment or flow chart, based on conventional or noninvasive The means for the property made can include more or less operating procedures.The step of being enumerated in embodiment order is only numerous steps A kind of mode in execution sequence, unique execution sequence is not represented., can be with when device in practice or end product execution Performed according to embodiment or method shown in the drawings order or parallel execution (such as parallel processor or multiple threads Environment, even distributed data processing environment).Term " comprising ", "comprising" or its any other variant are intended to Nonexcludability is included, so that process, method, product or equipment including a series of key elements not only will including those Element, but also other key elements including being not expressly set out, or also include being this process, method, product or equipment Intrinsic key element.In the absence of more restrictions, be not precluded from the process including the key element, method, product or Also there are other identical or equivalent elements in person's equipment.
Unit, device or module that above-described embodiment is illustrated etc., can specifically be realized by computer chip or entity, or Realized by the product with certain function.For convenience of description, describe to be divided into various modules point during apparatus above with function Do not describe.Certainly, when implementing the application can the function of each module in same or multiple softwares and/or hardware it is real It is existing, the module for realizing same function can also be realized by the combination of multiple submodule or subelement etc..Dress described above It is only schematical to put embodiment, for example, the division of the unit, only a kind of division of logic function, when actually realizing There can be other dividing mode, such as multiple units or component can combine or be desirably integrated into another system, or one A little features can be ignored, or not perform.Another, shown or discussed communication connection each other can be connect by some Mouthful, the INDIRECT COUPLING or communication connection of device or unit can be electrical, machinery or other forms.
It is also known in the art that in addition to realizing controller in pure computer readable program code mode, it is complete Controller can be caused with gate, switch, application specific integrated circuit, programmable by the way that method and step is carried out into programming in logic entirely Logic controller realizes identical function with the form of embedded microcontroller etc..Therefore this controller is considered one kind Hardware component, and the device for realizing various functions included to its inside can also be considered as the structure in hardware component.Or Person even, not only can be able to will be the software module of implementation method but also can be hardware for realizing that the device of various functions is considered as Structure in part.
The application can be described in the general context of computer executable instructions, such as program Module.Usually, program module includes performing particular task or realizes routine, program, object, the group of particular abstract data type Part, data structure, class etc..The application can also be put into practice in a distributed computing environment, in these DCEs, Task is performed by the remote processing devices connected by communication network.In a distributed computing environment, program module can With positioned at including in the local and remote computer-readable storage medium including storage device.
As seen through the above description of the embodiments, those skilled in the art can be understood that the application can Realized by the mode of software plus required general hardware platform.Understood based on such, the technical scheme essence of the application On the part that is contributed in other words to prior art can be embodied in the form of software product, the computer software product It can be stored in storage medium, such as ROM/RAM, magnetic disc, CD, including some instructions are to cause a computer equipment (can be personal computer, mobile terminal, server, or network equipment etc.) performs each embodiment of the application or implementation Method described in some parts of example.
Each embodiment in this specification is described by the way of progressive, same or analogous portion between each embodiment Divide mutually referring to what each embodiment was stressed is the difference with other embodiment.The application can be used for crowd In more general or special purpose computing system environments or configuration.For example:Personal computer, server computer, handheld device or Portable set, laptop device, multicomputer system, the system based on microprocessor, set top box, programmable electronics are set Standby, network PC, minicom, DCE of mainframe computer including any of the above system or equipment etc..
Although depicting the application by embodiment, it will be appreciated by the skilled addressee that the application have it is many deformation and Change is without departing from spirit herein, it is desirable to which appended claim includes these deformations and changed without departing from the application's Spirit.

Claims (10)

1. a kind of page coloring device code debugging method, it is characterised in that methods described includes:
When triggering the shader code debugging of the page, the simulation tinter of the former tinter of loading, the simulation tinter is set Programming language is preset into use and simulates the running environment compiling generation of former tinter;
In the simulation tinter, the shader code of the page is debugged;
Shader code after being debugged in the simulation tinter is translated into the former coloring according to default transformation rule The corresponding character string of device, and the character string is embedded into the former tinter corresponding code position.
2. a kind of page coloring device code debugging method as claimed in claim 1, it is characterised in that the former tinter is WebGL tinters, the simulation tinter is using the generation of JS written in code.
3. a kind of page coloring device code debugging method as claimed in claim 1 or 2, it is characterised in that in triggering tinter Before code debugging, methods described also includes:
The code file of the former tinter of compiling generation and the code file of simulation tinter, the code file of the former tinter and The code file of simulation tinter is provided with corresponding startup call parameters;
Accordingly, the simulation tinter of the former tinter of loading includes during the shader code debugging of the triggering page:According to biography The Start-up and Adjustment parameter entered determines the simulation tinter of the former tinter of loading.
4. a kind of page coloring device code debugging method as claimed in claim 1 or 2, it is characterised in that described default turn Rule is changed, including:
The shader code after debugging is translated into according to the prefix information of variable logical between the character string of former tinter, variable Letter is performed and call function is identical with former tinter.
5. a kind of page coloring device code debugging method as claimed in claim 1 or 2, it is characterised in that by the character string It is embedded into the former tinter after corresponding code position, methods described also includes:
The shader code of the page in the former tinter is loaded into image processor.
6. a kind of page coloring device debugging apparatus, it is characterised in that described device includes:
Load-on module is debugged, for when triggering the shader code debugging of the page, loading the simulation tinter of former tinter, institute State the running environment compiling generation that simulation tinter is configured to using default Programming language and simulates former tinter;
Processing module is debugged, in the simulation tinter, being debugged to the shader code of the page;
Code conversion module, for by it is described simulation tinter in debug after shader code according to default transformation rule The corresponding character string of the former tinter is translated into, and the character string is embedded into the former tinter corresponding code bit Put.
7. a kind of page coloring device debugging apparatus as claimed in claim 6, it is characterised in that the former tinter is webGL Tinter, the simulation tinter is using the generation of JS written in code.
8. a kind of page coloring device debugging apparatus as claimed in claims 6 or 7, it is characterised in that the default conversion rule Then include:
The shader code after debugging is translated into according to the prefix information of variable logical between the character string of former tinter, variable Letter is performed and call function is identical with former tinter.
9. a kind of page coloring device debugging apparatus as claimed in claims 6 or 7, it is characterised in that described device also includes:
Collector, for compiling the code file of the former tinter of generation and the code file of simulation tinter, the former coloring The code file of device and the code file of simulation tinter are provided with corresponding startup call parameters;
Accordingly, the simulation coloring of the debugging load-on module former tinter of loading when triggering the shader code debugging of the page Device includes the simulation tinter that the former tinter of loading is determined according to incoming Start-up and Adjustment parameter.
10. a kind of page coloring device debugging apparatus as claimed in claims 6 or 7, it is characterised in that described device also includes:
Code load-on module, for the shader code of the page in the former tinter to be loaded into image processor.
CN201610866146.3A 2016-09-29 2016-09-29 Debugging method and device for page shader codes Active CN107038060B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610866146.3A CN107038060B (en) 2016-09-29 2016-09-29 Debugging method and device for page shader codes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610866146.3A CN107038060B (en) 2016-09-29 2016-09-29 Debugging method and device for page shader codes

Publications (2)

Publication Number Publication Date
CN107038060A true CN107038060A (en) 2017-08-11
CN107038060B CN107038060B (en) 2021-02-23

Family

ID=59532836

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610866146.3A Active CN107038060B (en) 2016-09-29 2016-09-29 Debugging method and device for page shader codes

Country Status (1)

Country Link
CN (1) CN107038060B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110018952A (en) * 2018-01-10 2019-07-16 武汉斗鱼网络科技有限公司 A kind of test method, storage medium, equipment and the system of JS code
CN110287106A (en) * 2019-05-24 2019-09-27 北京达佳互联信息技术有限公司 Adjustment method, device, electronic equipment and the storage medium of shader code
CN110287100A (en) * 2019-05-21 2019-09-27 北京达佳互联信息技术有限公司 Adjustment method, device, electronic equipment and the storage medium of shader code
CN110543620A (en) * 2019-09-03 2019-12-06 武汉中海庭数据技术有限公司 method and system for drawing graphics primitives based on OpenGL ES2.0
CN110928610A (en) * 2020-02-07 2020-03-27 南京芯瞳半导体技术有限公司 Method, device and computer storage medium for verifying shader function
US20210089419A1 (en) * 2019-09-25 2021-03-25 Alibaba Group Holding Limited Debugging unit and processor

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102930564A (en) * 2011-09-08 2013-02-13 微软公司 Visual shader designer
US20130181999A1 (en) * 2012-01-13 2013-07-18 Microsoft Corporation Para-virtualized domain, hull, and geometry shaders
CN103309786A (en) * 2012-03-09 2013-09-18 辉达公司 Methods and apparatus for interactive debugging on a non-pre-emptible graphics processing unit
CN104488001A (en) * 2012-07-20 2015-04-01 微软公司 Customized image filters
CN105912655A (en) * 2016-04-11 2016-08-31 东南大学 WebGL-based three-dimensional model display method and corresponding Web-BIM engineering information integration management system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102930564A (en) * 2011-09-08 2013-02-13 微软公司 Visual shader designer
US20130181999A1 (en) * 2012-01-13 2013-07-18 Microsoft Corporation Para-virtualized domain, hull, and geometry shaders
CN103309786A (en) * 2012-03-09 2013-09-18 辉达公司 Methods and apparatus for interactive debugging on a non-pre-emptible graphics processing unit
CN104488001A (en) * 2012-07-20 2015-04-01 微软公司 Customized image filters
CN105912655A (en) * 2016-04-11 2016-08-31 东南大学 WebGL-based three-dimensional model display method and corresponding Web-BIM engineering information integration management system

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110018952A (en) * 2018-01-10 2019-07-16 武汉斗鱼网络科技有限公司 A kind of test method, storage medium, equipment and the system of JS code
CN110018952B (en) * 2018-01-10 2022-12-27 武汉斗鱼网络科技有限公司 JS code testing method, JS code storage medium, JS code testing equipment and JS code testing system
CN110287100A (en) * 2019-05-21 2019-09-27 北京达佳互联信息技术有限公司 Adjustment method, device, electronic equipment and the storage medium of shader code
CN110287106A (en) * 2019-05-24 2019-09-27 北京达佳互联信息技术有限公司 Adjustment method, device, electronic equipment and the storage medium of shader code
CN110287106B (en) * 2019-05-24 2023-09-26 北京达佳互联信息技术有限公司 Method and device for debugging shader code, electronic equipment and storage medium
CN110543620A (en) * 2019-09-03 2019-12-06 武汉中海庭数据技术有限公司 method and system for drawing graphics primitives based on OpenGL ES2.0
US20210089419A1 (en) * 2019-09-25 2021-03-25 Alibaba Group Holding Limited Debugging unit and processor
US11755441B2 (en) * 2019-09-25 2023-09-12 Alibaba Group Holding Limited Debugging unit and processor
CN110928610A (en) * 2020-02-07 2020-03-27 南京芯瞳半导体技术有限公司 Method, device and computer storage medium for verifying shader function

Also Published As

Publication number Publication date
CN107038060B (en) 2021-02-23

Similar Documents

Publication Publication Date Title
CN107038060A (en) A kind of page coloring device code debugging method, device
CN110263281B (en) Device and method for self-adapting page resolution in data visualization development
US20190294420A1 (en) Code Generation And Simulation For Graphical Programming
CN112526966B (en) Automatic test method and system for HIL (high-performance liquid chromatography) of controller
Nova et al. Tool to support computer architecture teaching and learning
US20230119466A1 (en) Code block element for integrated graphic design system
Ryabinin et al. Adaptive scientific visualization system for desktop computers and mobile devices
CN114115840B (en) Variable jump method and device for nuclear power station DCS system application software
CN111258578A (en) Method for realizing equipment template primitive
CN115080886A (en) A mobile terminal-based 3D medical model GLB file parsing and display method
Jamro et al. IEC 61131-3 programmable human machine interfaces for control devices
CN104360860B (en) A kind of domestic autonomous embedded computer system and its video driver method
Chai Construction and Implementation of Computer Aided Design System for Art Graphics.
CN116010736A (en) Processing method, device, equipment and storage medium of vector icons
Rentz Moving transient views from Eclipse to web technologies
CN113609066B (en) Multi-core RISCV-CPU simulator based on Rust
CN112765018B (en) Instrument debugging system and method
WO2014178748A1 (en) Generating screen data
CN118823212A (en) A 3D visualization method for digital twin simulation results based on VTK
JP2002108600A (en) Terminal device for control system and recording medium and control system
Wu et al. Application and development prospect of monitoring screen based on three. js unit equipment control system
CN110990104A (en) Unity 3D-based texture rendering method and device
Cai et al. NetPadBrowser: An Offline Browser for Web-Based Dynamic Geometric Resources
JP2022115747A (en) Content creation system and method
Milovanović Python Data Visualization Cookbook

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201015

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20201015

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: Greater Cayman, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

GR01 Patent grant
GR01 Patent grant