KR20180052919A - Apparatus and method for integrated processing program code - Google Patents

Apparatus and method for integrated processing program code Download PDF

Info

Publication number
KR20180052919A
KR20180052919A KR1020160150072A KR20160150072A KR20180052919A KR 20180052919 A KR20180052919 A KR 20180052919A KR 1020160150072 A KR1020160150072 A KR 1020160150072A KR 20160150072 A KR20160150072 A KR 20160150072A KR 20180052919 A KR20180052919 A KR 20180052919A
Authority
KR
South Korea
Prior art keywords
version
manager
variable
opengl
source code
Prior art date
Application number
KR1020160150072A
Other languages
Korean (ko)
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 에스피테크놀러지 주식회사
Priority to KR1020160150072A priority Critical patent/KR20180052919A/en
Publication of KR20180052919A publication Critical patent/KR20180052919A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/37Compiler construction; Parser generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention relates to an apparatus for program code integration processing and a method thereof. According to the present invention, the program code integration processing method includes: a step of receiving a request for a compile process for a source code; a step of checking a variable and function list table corresponding to an inputted graphic processing API (Application Programming Interface) version and converting at least one of the variable and function contained in the source code into a variable or function corresponding to the graphic processing API version; and a step of performing a compiling process using the converted source code. A developer can write and compile the same source code, regardless of the version of OpenGL ES.

Description

[0001] APPARATUS AND METHOD FOR INTEGRATED PROCESSING PROGRAM CODE [0002]

The present invention relates to an apparatus and method for program code integration processing, and more particularly, to an apparatus and method for performing program code integration processing for developer convenience in a program source development process related to graphics processing.

A variety of rendering APIs (Application Programming Interfaces) have been proposed to facilitate the development of 3D (3D) graphics and to improve the graphics processing performance. OpenGL ES is a typical example used for devices such as portable communication terminals.

OpenGL, widely used as a 3D Graphic Library, is a 3D graphics and modeling library with high portability and fast execution speed as a software interface for controlling graphics hardware. This makes it easier to create exceptional 3D graphics with visual quality at the level of a ray tracer.

OpenGL has been developed and optimized by Silicon Graphics Incorporated (SGI) over the years, with improved algorithms based on optimized algorithms that are repeatedly used and improved by various vendors and developers. Based on these developments, OpenGL has maintained its superior position as a 3D graphics API, and most of the recently developed 3D accelerated graphics hardware are supporting OpenGL drivers.

In particular, OpenGL has evolved to be optimized for hardware limitations of embedded systems and mobile systems, that is, low capacity and low computing power, while being applied mainly to high performance systems. In a wide range of embedded systems OpenGL ES (Embedded System) developed to support standard 3D graphics programming. OpenGL ES is based on some features of OpenGL version 1.3 and is an OpenGL API standard for embedded systems, including some additional extensions.

In summary, OpenGL ES is a subset of OpenGL, a 3D computer graphics API defined by the Khronos Group, and is an API for embedded terminals such as mobile phones and PDAs.

OpenGL ES, for example, uses a fixed pipeline for graphics processing, whereas version 2.0 uses a programmable shader for graphics processing. (Programmable Shader) can be used.

However, due to the significant changes in the structure of the version, the way of writing the program has changed greatly, and the program source code based on the existing 1.x version has to be rewritten again.

In other words, various program code written in 1.x version has to be rewritten with code that uses shader, which is a huge burden for developers.

In addition, some terminals may support OpenGL ES version 1.x only, or OpenGL ES may support terminals with version 2.0 version. When developing programs, these version-specific programs The fact that you have to write all of the source code will delay the program development time and increase the cost.

Published Japanese Patent Application No. 10-2013-0107562

SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problems, and an object of the present invention is to provide an apparatus and method for a program code integrating process for allowing a developer to write and compile the same source code regardless of the version of OpenGL ES .

According to an aspect of the present invention, there is provided a program code integration processing system including an input unit for receiving a source code and a graphics processing API (Application Programming Interface) version; A request unit that is requested to compile the source code; A source code conversion unit for checking a variable and function list table corresponding to the input graphic processing API version and converting at least one of variables and functions included in the source code into a variable or function corresponding to the graphical processing API version, Wow; And a compiling processor for performing compilation processing using the converted source code.

According to another aspect of the present invention, there is provided a program code integration processing method comprising: receiving a request for compiling a source code; Checking a variable and function list table corresponding to an input graphic processing API (Application Programming Interface) version and converting at least one of variables and functions included in the source code into a variable or function corresponding to the graphics processing API version ; And performing a compiling process using the converted source code.

According to another aspect of the present invention, there is provided a program code integration processing method comprising: inputting a source code according to OpenGL ES Embedded Systems Version 1 (OpenGL ES Version 1); Identifying a variable and function list table corresponding to OpenGL ES Version 2 and converting at least one of variables and functions included in the source code into variables or functions corresponding to the OpenGL ES Version 2; And generating a code executable in OpenGL ES Version 2 using the converted source code and a predetermined shader code.

As described above, according to the present invention, developers can write program source code in a unified manner regardless of each API version, thereby improving convenience.

Also, even if there is no modification by the developers of the program source code that has been created in conformity with the API of the lower version, it is possible to use the same program source code as it is to generate an application that operates in the upper version API, .

1 is a functional block diagram of a program code integration processing system according to an embodiment of the present invention,
FIG. 2 is a structural diagram of the program code integrated processing system of FIG. 1,
3 to 7 are detailed structural diagrams of the managers used in the program code integration processing system of FIG.

Hereinafter, the present invention will be described in detail with reference to the accompanying drawings.

Hereinafter, embodiments of the present invention will be described in order to facilitate understanding of the present invention, and the present invention is not limited to these embodiments. In particular, the present invention can be configured by combining at least any one of individual components, individual functions, or individual steps included in each embodiment.

In particular, some claims of the claims for convenience include alphabets such as '(a)' for convenience, but these alphabets do not define the order of each step.

The program code integration processing system according to an exemplary embodiment of the present invention performs a function of processing various versions of APIs for graphics processing by using the same program source code created by a developer.

For example, if a developer codes a program according to the OpenGL ES Version 1.x standard under the development environment provided by the program code integration processing system 100, that is, the so-called 'Integrated OpenGL ES', the OpenGL ES Version 1.x A program or a module which is operated in OpenGL ES Version 2 can be generated through the process of converting variables and functions in code as described below for the same source code You can. Here, the compiling process may mean compiling only the source code for graphics processing, or compiling the entire application source code including graphics processing.

The structure for such a process is schematically shown in FIG.

That is, even if the program code integration processing system 100 according to the embodiment of the present invention provides an integrated OpenGL ES environment and a developer performs program source coding according to the OpenGL ES Version 1.x standard, As a result, you can create programs or modules (such as libraries) that run in OpenGL ES Version 2 through the automatic processing of various types of managers.

The functional blocks of the program code integration processing system 100 according to an embodiment of the present invention may be configured as shown in FIG.

The program code integration processing system 100 according to an embodiment of the present invention includes an input unit 110, a request unit 120, a source code conversion unit 130, and a compilation processing unit 140 .

The input unit 110 receives a source code and a graphics processing API (Application Programming Interface) version.

For this purpose, the input unit 110 may provide a user interface for writing a source code. The configuration and function of the source code editor for program development correspond to known technologies, and therefore, a detailed description thereof will be omitted.

In this example, the user inputs and inputs the source code according to OpenGL ES Version 1.x through the input unit 110, and assumes that the graphics processing API version specifies OpenGL ES Version 2.0. Since OpenGL ES has been described in detail in the background of the present specification, redundant description will be omitted.

The graphical processing API version designated by the user specifies an environment in which the program according to the source code created by the user actually operates, and is different from the API version (i.e., OpenGL ES Version 1.x) .

The request unit 120 performs a function of receiving a request for compilation processing for the source code.

For example, a user can create a new OpenGL ES Version 1.x source code or load a previously created source code as described above to request an OpenGL ES version 2.0 compliant executable code or library to be created .

The source code conversion unit 130 identifies a variable and function list table corresponding to the input graphic processing API version and converts at least one of variables and functions included in the source code into a variable or function corresponding to the graphics processing API version And the compiling processing unit 140 performs a function of performing a compiling process using the source code converted by the source code converting unit 130. [

Hereinafter, a partial compilation process is performed by the source code conversion unit 130 for the sake of understanding, but it is needless to say that the compilation process unit 140 may perform all the compilation processes.

Here, the conversion into the variable or function corresponding to the graphics processing API version includes both the creation of the variable or the function corresponding to the graphics processing API version or the substitution of the variable or function corresponding to the existing version.

For example, the source code conversion unit 130 uses global variables defined in OpenGL ES Version 1.x, which are missing from OpenGL ES Version 2.0, that is, those that are no longer supported in OpenGL ES Version 2.0 , It is possible to newly generate a corresponding lower version of the global variable or to convert it to a variable used in OpenGL ES Version 2.0, and the same processing can be performed for a function using such a variable.

This process can be performed by referring to the variable and function list table corresponding to OpenGL ES Version 2.0 as described above. For this purpose, the variable and the list table are provided with information for knowing whether or not each version variable and functions are supported, Information on correspondence between variables and functions according to versions, and the like.

Assuming that the source code written by the developer is based on OpenGL ES Version 1.x and the environment in which the program according to the source code is used is OpenGL ES Version 2, the variable and function conversion processing as described above is performed The source code conversion unit 130 may include a matrix manager, an attribute manager, a state manager, a variable manager, and a shader manager .

Here, the matrix manager is for internal matrix processing, the attribute manager is for defining each data attribute for rendering, the status manager is for managing the graphics processing state, and the variable manager is for processing the specific variables .

In particular, the shader manager is responsible for generating code that runs in the OpenGL ES Version 2 environment using information generated from the matrix manager, attribute manager, state manager, variable manager, and predefined shader code.

Each of these managers may be configured as a separate library, and the role of each manager will be described in detail as follows.

First, the matrix manager corresponds to the View Matrix, Projection Matrix, and Texture Matrix of the source code, and generates the View Matrix uniformity, the Projection Matrix uniformity, and the Texture Matrix uniform according to the OpenGL ES Version 2, and transmits them to the shader manager.

Referring to FIG. 3, the operation configuration of the matrix manager is well illustrated.

In other words, the matrix manager creates uniform variables to be used in OpenGL ES Version 2 environment and transmits them to the shader manager, which is used for OpenGL ES Version 1.x based source code. Specifically, View Matrix uniform, Projection Matrix uniform corresponding to Projection Matrix Stack, and Texture Matrix uniform corresponding to Texture Matrix Stack are generated and transmitted to the shader manager.

Next, the attribute manager processes the vertex, normal, and texture data used in OpenGL ES Version 1.x as attributes in OpenGL ES Version 2, and binds each corresponding data to a number.

Referring to FIG. 4, the operation configuration of the attribute manager is well illustrated.

In other words, the matrix manager creates uniform variables to be used in OpenGL ES Version 2 environment and transmits them to the shader manager, which is used for OpenGL ES Version 1.x based source code. Specifically, View Matrix uniform, Projection Matrix uniform corresponding to Projection Matrix Stack, and Texture Matrix uniform corresponding to Texture Matrix Stack are generated and transmitted to the shader manager.

Meanwhile, the state manager stores each state of OpenGL ES, and since the shader code that is linked with each state is changed, variables for managing the state are required, and the state manager processes the events will be.

In particular, since the Lighting Sate, Lights State, Texture State, and Attributes State, which were used in OpenGL ES Version 1.x, have disappeared in the OpenGL ES Version 2 specification, the state manager performs processing to create variables that can manage each of these states do.

Referring to FIG. 5, the operation configuration of the state manager is well illustrated.

That is, the state manager generates Lighting State Uniformity corresponding to the Lighting Sate, Lights State Uniformity corresponding to the Lights State, Texture State Uniformity corresponding to the Texture State, and Attributes State Uniformity corresponding to the Attributes State to be transmitted to the shader manager.

On the other hand, the variable manager is used for interworking with external APIs in OpenGL ES Version 1.x, but performs processing on variables that have disappeared in the OpenGL ES Version 2 specification.

Referring to FIG. 6, the operation configuration of the variable manager is well illustrated.

That is, the variable manager corresponds to each of the Light Variable, Material Variable, Color Variable, and ColorMaterial Variable used in OpenGL ES Version 1.x, and generates variables that can be used in OpenGL ES Version 2. Specifically,

Light Variable uniform corresponding to Light Variable, Material Variable uniform corresponding to Material Variable, Color Variable uniform corresponding to Color Variable, and ColorMaterial Variable uniform corresponding to ColorMaterial Variable are generated and transmitted to Shader Manager.

On the other hand, the shader manager performs the function of processing the input of Uniform and Attribute Data of the upper managers in conjunction with the appropriate shader code so that the rendering operation is performed.

Referring to FIG. 7, the operation configuration of such a shader manager is well illustrated.

That is, the shader manager receives various Matrix Uniformities from the matrix manager, receives various attribute locations from the attribute manager, receives various state uniforms from the state manager, receives Variable Uniforms from the variable manager, (GLSL ES) and loads and builds appropriate shader codes corresponding to the state.

In addition, the shader manager allows the currently configured program to run through OpenGL ES and manages each detail data.

As described above, the source code conversion unit 130 performs a function of converting the source code inputted by the developer into various API versions to be operated by using various managers.

Here, the code converted by the source code conversion unit 130 may be in the form of text as written by the developer, or may be in the form of a binary code readable by a computer by partial compilation.

According to the processes of the managers, the developers can develop the same code regardless of the version of the 3D rendering API installed in the terminal or the like.

For example, a developer can easily create a program or a module that can be operated on terminals under the OpenGL ES Version 2 environment even when the program source code according to the OpenGL ES Version 1.x standard is written.

In other words, the program code integration processing system 100 according to the present invention receives the source code according to OpenGL ES Version 1, checks the variable and function list table corresponding to OpenGL ES Version 2, And / or a function is converted into a variable or a function corresponding to OpenGL ES Version 2, and then a code that can be executed in OpenGL ES Version 2 is generated using the converted source code and predetermined shader code, It is possible to maximize the utilization of source code written according to ES Version 1 specification.

Meanwhile, it goes without saying that the process of performing each of the above-described embodiments can be performed by a program or an application stored in a predetermined recording medium (for example, a computer-readable). Here, the recording medium includes an electronic recording medium such as a RAM (Random Access Memory), a magnetic recording medium such as a hard disk, and an optical recording medium such as a CD (Compact Disk).

At this time, the program stored in the recording medium may be executed on hardware such as a computer or a smart phone to perform each of the above embodiments. In particular, at least one of the functional blocks of the program code integration processing system according to the present invention described above can be implemented by such a program or an application.

The present invention is not limited to the above-described specific embodiments, and various modifications and changes may be made without departing from the gist of the present invention. It is to be understood that such variations and modifications are intended to be included in the scope of the appended claims.

100: Program code integrated processing system
110: input unit 120: request unit
130: source code conversion unit 140: compile processing unit

Claims (9)

(a) receiving a request to compile a source code;
(b) checking a variable and function list table corresponding to the inputted graphic processing API (application programming interface) version, and storing at least one of variables and functions included in the source code in a variable or function ;
and (c) performing a compiling process using the converted source code.
The method according to claim 1,
The source code is a code according to OpenGL ES Version 1 (OpenGL for Embedded Systems Version 1)
In step (b), when the graphics API version is OpenGL ES Version 2, a matrix manager for internal matrix processing, an attribute manager for defining each data attribute for rendering, a state manager for managing graphics processing state, A shader for generating code to be executed in the OpenGL ES Version 2 environment using information generated from the matrix manager, attribute manager, state manager, and variable manager, and predetermined shader code, And the conversion processing of the variable or the function is performed using the manager.
3. The method of claim 2,
The matrix manager generates a View Matrix uniform, a Projection Matrix uniform, and a Texture Matrix uniform according to the OpenGL ES Version 2 corresponding to the View Matrix, the Projection Matrix, and the Texture Matrix of the source code,
The attribute manager generates and maps Attribute 0, Attribute 1, Attribute 2, and Attribute 3 according to the OpenGL ES Version 2 to the vertex data, normal data, texture data, and color data of the source code, For example,
The state manager generates a Lighting State Uniform, a Lights State Uniform, a Texture State Uniform and an Attributes State Uniform according to the OpenGL ES Version 2 corresponding to the Lighting State, Lights State, Texture State, and Attributes State of the source code, Manager,
The variable manager generates Lights Variable Uniformity, Material Variable Uniformity, Color Variable Uniformity, and Color Material Variable Uniformity according to the OpenGL ES Version 2, respectively, corresponding to the Lights Variable, Material Variable, Color Variable, and Color Material Variable of the source code To the shader manager.
(a) receiving a source code according to OpenGL ES Version 1 (OpenGL for Embedded Systems Version 1);
(b) identifying a variable and function list table corresponding to OpenGL ES Version 2 and converting at least one of variables and functions included in the source code into variables or functions corresponding to the OpenGL ES Version 2;
(c) generating a code executable in OpenGL ES Version 2 using the converted source code and a predetermined shader code.
A computer-readable recording medium storing a program for executing the method according to any one of claims 1 to 4. An application program stored on a computer readable medium for executing the method of any one of claims 1 to 4 in combination with hardware. An input unit for receiving a source code and a graphics processing API (Application Programming Interface) version;
A request unit that is requested to compile the source code;
A source code conversion unit for checking a variable and function list table corresponding to the input graphic processing API version and converting at least one of variables and functions included in the source code into a variable or function corresponding to the graphical processing API version, Wow;
And a compiling processor for performing compilation processing using the converted source code.
8. The method of claim 7,
The source code is a code according to OpenGL ES Version 1 (OpenGL for Embedded Systems Version 1)
Wherein the source code conversion unit includes a matrix manager for internal matrix processing when the graphics processing API version is OpenGL ES Version 2, an attribute manager for defining data attributes for rendering, a status manager for managing graphics processing status, A shader manager for generating code to be executed in the OpenGL ES Version 2 environment using information generated from the matrix manager, the attribute manager, the state manager, and the variable manager, and predetermined shader codes, And the conversion processing of the variable or the function is performed using the conversion function.
9. The method of claim 8,
The matrix manager generates a View Matrix uniform, a Projection Matrix uniform, and a Texture Matrix uniform according to the OpenGL ES Version 2 corresponding to the View Matrix, the Projection Matrix, and the Texture Matrix of the source code,
The attribute manager generates and maps Attribute 0, Attribute 1, Attribute 2, and Attribute 3 according to the OpenGL ES Version 2 to the vertex data, normal data, texture data, and color data of the source code, For example,
The state manager generates a Lighting State Uniform, a Lights State Uniform, a Texture State Uniform and an Attributes State Uniform according to the OpenGL ES Version 2 corresponding to the Lighting State, Lights State, Texture State, and Attributes State of the source code, Manager,
The variable manager generates Lights Variable Uniformity, Material Variable Uniformity, Color Variable Uniformity, and Color Material Variable Uniformity according to the OpenGL ES Version 2, respectively, corresponding to the Lights Variable, Material Variable, Color Variable, and Color Material Variable of the source code To the shader manager.
KR1020160150072A 2016-11-11 2016-11-11 Apparatus and method for integrated processing program code KR20180052919A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020160150072A KR20180052919A (en) 2016-11-11 2016-11-11 Apparatus and method for integrated processing program code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020160150072A KR20180052919A (en) 2016-11-11 2016-11-11 Apparatus and method for integrated processing program code

Publications (1)

Publication Number Publication Date
KR20180052919A true KR20180052919A (en) 2018-05-21

Family

ID=62453254

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020160150072A KR20180052919A (en) 2016-11-11 2016-11-11 Apparatus and method for integrated processing program code

Country Status (1)

Country Link
KR (1) KR20180052919A (en)

Similar Documents

Publication Publication Date Title
CN110096338B (en) Intelligent contract execution method, device, equipment and medium
CN108027722B (en) Dynamically updating applications in compilation and deployment
KR102059705B1 (en) Adaptive portable libraries
US11354159B2 (en) Method, a device, and a computer program product for determining a resource required for executing a code segment
US8448132B2 (en) Systems and methods for modifying code generation templates
US11556348B2 (en) Bootstrapping profile-guided compilation and verification
CN107832059B (en) Code static analysis method and device based on Makefile
CN107077379B (en) A kind of virtual machine creation method and device
CN105378689A (en) Unified extensible firmware interface (UEFI) driver and protocol
EP3356932A1 (en) System and method for using ubershader variants without preprocessing macros
CN110609687A (en) Compiling method, device, electronic equipment and storage medium
KR20080039080A (en) Terminal having an interfacing function of the heterogeneity language compile library, api calling method and compile function generating method
CN113986402A (en) Function calling method and device, electronic equipment and storage medium
CN110221840B (en) Function implementation method and device of application program, equipment and storage medium
CN112256355B (en) Data-driven system function loading method, equipment and storage medium
CN112604273B (en) Data-driven game system function loading method, device and storage medium
US20140089906A1 (en) Dynamically building locale objects at run-time
CN117707543A (en) Application installation package manufacturing and installation method, computing device and storage medium
CN112882690A (en) Application development method and device
CN109918059B (en) Application function expansion method and device, terminal equipment and storage medium
CN113590221B (en) Method and device for detecting number of shader variants, electronic equipment and storage medium
US11775471B2 (en) System and method for caching converted files and compiling computer code from the cache
KR20180052919A (en) Apparatus and method for integrated processing program code
EP3834080B1 (en) Static reconcilliation of application view hierarchies
CN109947407B (en) Data acquisition method and device

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E601 Decision to refuse application