Plug-in system for graph development

By introducing a plug-in system in OpenGL ES graphics development, providing graphical interface and automatic parameter packaging and replacement functions, the problem of high threshold for use of OpenGL ES is solved, and a more efficient and flexible graphics development process is achieved.

CN119576427APending Publication Date: 2025-03-07HEFEI HUANXIN MICROELECTRONICS TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410991574.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

When developing graphics based on OpenGL ES, how to reduce the threshold for using OpenGL ES to facilitate developers' integration and use, especially to reduce the difficulty of learning and coding.

Method used

A plug-in system for graphics development is proposed, including a graphical interface module, a parameter collection module, a project template with pending parameters and a writing module. The graphical interface module provides visual parameter input, the parameter collection module automatically encapsulates parameter information, writes the module to automatically replace parameters into the project template, and generates compiled template objects.

Benefits of technology

It reduces the difficulty of non-professional developers using OpenGL ES, improves development efficiency, reduces human errors, and provides a standardized basic framework to support diversified development needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576427A_ABST
    Figure CN119576427A_ABST
Patent Text Reader

Abstract

The invention discloses a plug-in system for graph development, and relates to the technical field of graph processing. The system specifically comprises a graphical interface module which is provided with a plurality of controls and is used for receiving parameters input by a user; the parameter collection module is used for acquiring parameter information input by a user in the graphical interface module, defining and packaging the parameter information according to a preset rule, and generating a key value pair array; an engineering template with undetermined parameters is constructed and generated according to the integrated development environment; the write-in module copies the engineering template with the parameters to be determined, traverses the key value pair array, replaces the parameters to be determined in the engineering template with the parameters to be determined with the parameters in the key value pair array, and defines the parameters to be determined in the engineering template in one-to-one correspondence with the parameter definitions in the key value pair array during replacement; and generating the template object which can be compiled and deployed by the development environment so as to reduce the development difficulty of the graphic application. The method and the device aim at reducing the threshold of using the OpenGL ES when graph development is carried out based on the OpenGL ES, and convenience is brought to developers to carry out integrated use.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of graphics processing technology, and in particular to a plug-in system for graphics development. Background Art

[0002] In recent years, with the popularity of smart phones and mobile devices, graphics development technology based on the Android platform has received widespread attention and application. With its open source nature and huge user base, the Android platform has become the main battlefield for mobile graphics development. At present, the graphics development technology on the Android platform is mainly divided into two categories: development based on professional graphics development software and development based on OpenGL ES.

[0003] Based on the idea of ​​professional graphics development software. This type of software includes mainstream commercial game modeling software such as Unity and open source software such as Godot Engine. These software help developers achieve complex graphics development tasks through visual operations, script programming, and Android project export. In this type of software, visual operations refer to modeling, setting materials, configuring environments (such as cameras and lighting), etc. through a graphical user interface (GUI) to present a static rendering model. In this way, developers can intuitively create and edit 3D models, greatly reducing the complexity and error rate of modeling.

[0004] Scripting refers to the use of programming languages ​​such as C# or Python to control the movement of a model or its parts. This process allows developers to write scripts to achieve dynamic display and interactive functions of the model, making graphics development not limited to static rendering, but capable of creating complex animations and user interaction effects. For example, in Unity, developers can use C# scripts to control the movement of game characters, animation playback, physical collisions, etc., to achieve a rich gaming experience.

[0005] Android project export means exporting the models and scenes completed by developers in these professional software as Android projects for further development and optimization in Android Studio. Through this process, developers can seamlessly integrate complex 3D models and scenes into Android applications and generate APK files to run on Android devices.

[0006] However, professional graphics development software often requires the purchase of expensive licenses, which is a considerable financial burden for some small development teams and individual developers. At the same time, the learning threshold of this type of software is high, and developers need to master both visual operations and script programming, which may be a considerable challenge for novices.

[0007] Graphics development based on OpenGL ES. OpenGL ES (OpenGL for Embedded Systems) is a cross-platform graphics development library optimized for mobile devices and a subset of OpenGL for desktop platforms. Google's Android SDK has built-in OpenGL ES library, and developers can implement graphics rendering and development by calling related APIs. Using OpenGLES, developers can write code directly on the Android platform to achieve high-performance 2D and 3D graphics rendering.

[0008] A significant advantage of this technology is that it is open source and free, and all developers can use and distribute it freely. However, the learning threshold of OpenGL ES is high, and developers need to have a deep understanding of the relevant theoretical knowledge of graphics, such as coordinate transformation, lighting model, texture mapping, etc. In addition, the API of OpenGL ES is relatively low-level, and developers need to write a lot of code to implement basic graphics functions, which places high demands on developers' programming ability and patience. Despite this, OpenGLES is still the first choice for many professional graphics developers due to its high performance and flexibility.

[0009] Therefore, when developing graphics based on OpenGL ES, how to lower the threshold for using OpenGL ES and facilitate developers' integrated use has become a technical problem that needs to be solved urgently. Summary of the invention

[0010] The main purpose of the present invention is to provide a plug-in system for graphics development, aiming to lower the threshold for using OpenGL ES when performing graphics development based on OpenGL ES, and facilitate developers to integrate and use it.

[0011] In order to achieve the above object, the present invention proposes a plug-in system for graphics development, comprising: A graphical interface module is provided with a plurality of controls for accepting parameters input by the user; The parameter collection module obtains the parameter information input by the user in the graphical interface module, and defines and encapsulates the parameter information according to preset rules to generate a key-value pair array; Project templates with undetermined parameters are generated based on the integrated development environment; and A writing module is used to copy the engineering template with pending parameters, and the key-value pair array is traversed to replace the pending parameters in the engineering template with pending parameters with the parameters in the key-value pair array. During the replacement, the pending parameter definition in the engineering template corresponds one-to-one with the parameter definition in the key-value pair array, and a template object that can be compiled and deployed by the development environment is generated to reduce the difficulty of developing graphics applications.

[0012] In one embodiment of the present application, the plurality of controls include: Select the path of the file model and the material model, set the vertex shader parameters, the fragment shader parameters, the rendering parameters, and at least one of the texture maps.

[0013] In one embodiment of the present application, the graphical interface module further includes a rendering engine unit for generating in real time a rendering result of the model after relevant parameters are set.

[0014] In an embodiment of the present application, the parameter information is defined and packaged according to a preset rule, including the following steps: Add different identifiers to different parameter information input by the user in the graphical interface module; Encapsulate each different parameter information and its corresponding identifier into a key-value pair; Get all key-value pairs and write them into a key-value pair array.

[0015] In one embodiment of the present application, copying the engineering template with pending parameters and traversing the key-value pair array further includes: When the pending parameter definitions in the project template do not correspond one-to-one to the parameter definitions in the key-value pair array, the code segment where the uncorresponding pending parameters in the project template are located is deleted or the uncorresponding pending parameters in the project template use default values.

[0016] In one embodiment of the present application, the engineering template with pending parameters is encapsulated with a common standard OpenGL development framework code, wherein the parameter part is a key placeholder corresponding to the parameter key-value pair collected by the parameter collection module.

[0017] By adopting the above technical solution, the graphical interface module provides visual parameter input, and users can complete the development of the graphical application program interface without directly writing code. This reduces the difficulty of use for non-professional developers and improves development efficiency. The parameter collection module automatically obtains and encapsulates the parameter information input by the user, avoiding the tedious process of manually collecting and processing parameters. The writing module automatically replaces the parameters into the template, reducing human errors and improving work efficiency. The engineering template with pending parameters provides a standardized basic framework, on which users can carry out secondary development and expansion. The writing module ensures the flexibility of the template, and users can customize parameters according to different needs to meet diverse development needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The present invention is described in detail below with reference to specific embodiments and accompanying drawings, wherein: Figure 1 It is a schematic structural diagram of the first embodiment of the present invention. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention is described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the following specific embodiments are only used to explain the present invention and do not constitute a limitation to the present invention.

[0020] like Figure 1 As shown, in order to achieve the above-mentioned purpose, the present invention proposes a plug-in system for graphics development, comprising: A graphical interface module is provided with a plurality of controls for accepting parameters input by the user; The parameter collection module obtains the parameter information input by the user in the graphical interface module, and defines and encapsulates the parameter information according to preset rules to generate a key-value pair array; Project templates with undetermined parameters are generated based on the integrated development environment; and A writing module is used to copy the engineering template with pending parameters, and the key-value pair array is traversed to replace the pending parameters in the engineering template with pending parameters with the parameters in the key-value pair array. During the replacement, the pending parameter definition in the engineering template corresponds one-to-one with the parameter definition in the key-value pair array, and a template object that can be compiled and deployed by the development environment is generated to reduce the difficulty of developing graphics applications.

[0021] Specifically, in the graphical interface module, multiple controls are designed and arranged. These controls include text boxes, drop-down menus, file selection dialog boxes, sliders, etc., through which users input or select parameters. Controls can use graphical interface design tools (such as Qt, JavaFX, etc.) to create user interfaces. Each control is bound to a corresponding event listener. When the user inputs parameters or makes a selection, the listener captures these operations and records the parameter values. The parameters entered by the user are displayed in real time on the interface and stored in a data structure (such as a dictionary or object) in the memory for subsequent processing.

[0022] The parameter collection module is responsible for obtaining the parameter information input by the user from the graphical interface module. According to the preset naming rules, these parameters are defined and encapsulated to generate a key-value pair array.

[0023] The parameter collection module accesses the data structure of the graphical interface module and extracts the parameters entered by the user. According to the preset rules (such as unified naming conventions), the parameter name and parameter value are paired and stored in a Map<String, Value> In the data structure. After the parameters are collected, the data in the Map is converted into a key-value pair array for subsequent module processing.

[0024] Build a project template with pending parameters. This template is a basic project framework that contains the initialization code and general function code of the standard graphics application interface (such as OpenGL), but the specific parameters are named as parameter keys and are waiting to be replaced. It uses an integrated development environment (such as Android Studio) to create a standard project template. The template includes the necessary configuration files, resource files, and code files. Use placeholders (such as ${parameter_name}) in the code to mark the position of the pending parameters. Make sure that all parameters that need to be replaced in the template have clear placeholder tags, and these tags are consistent with the naming rules used in the parameter collection module.

[0025] The writing module copies the project template whose parameters are to be determined, traverses the key-value pair array, replaces the placeholders in the template corresponding to the keys in the key-value pairs with the parameter values, and generates a template object that can be compiled and deployed by the development environment.

[0026] The writing module first copies the project template with pending parameters, and then reads the key-value pair array. By traversing the array, locate the placeholders in the template and replace them with the corresponding parameter values. After the replacement is completed, save the modified template as a new project file. When replacing each key-value pair, ensure that the format of the replaced file is correct to avoid syntax errors or configuration errors. For placeholders that are not successfully matched, delete the corresponding code segment or use the default parameter value to ensure the integrity and correctness of the template.

[0027] By adopting the above technical solution, the graphical interface module provides visual parameter input, and users can complete the development of the graphical application program interface without directly writing code. This reduces the difficulty of use for non-professional developers and improves development efficiency. The parameter collection module automatically obtains and encapsulates the parameter information input by the user, avoiding the tedious process of manually collecting and processing parameters. The writing module automatically replaces the parameters into the template, reducing human errors and improving work efficiency. The engineering template with pending parameters provides a standardized basic framework, on which users can carry out secondary development and expansion. The writing module ensures the flexibility of the template, and users can customize parameters according to different needs to meet diverse development needs.

[0028] In one embodiment of the present application, the plurality of controls include: Select the path of the file model and the material model, set the vertex shader parameters, the fragment shader parameters, the rendering parameters, and at least one of the texture maps.

[0029] Specifically, the file model path selection control is implemented as a file selection dialog box. When the user clicks the control, a file browsing window pops up, through which the user can navigate in the file system and select the path of one or more model files. This control is used to allow the user to specify the path of the 3D model file to be loaded, which is in .obj format. Through the intuitive file selection interface, the user can easily select the required model file path, reducing the errors that may be caused by manually entering the path.

[0030] Similar to the file model path selection control, the material model path selection control is also a file selection dialog box specifically used to select the path of the material file. This control is used to specify the material file path of the model. By providing an easy-to-use file browsing interface, users can quickly and accurately select material files to ensure that the model presents the desired appearance.

[0031] The texture map control is implemented as a file selection dialog box. When the user clicks the control, a file browsing window will pop up, through which the user can navigate in the file system and select the path of one or more texture map files. Load the texture map specified by the user.

[0032] The vertex shader parameter setting control can be implemented as a text box to input or select the parameter value of the vertex shader. This control is used to set the parameters required by the vertex shader, such as lighting direction, transformation matrix, vertex position, etc. By providing multiple input methods, users can flexibly set vertex shader parameters and accurately control the vertex processing process of the model.

[0033] The fragment shader parameter setting control is a text box or color selector, which is used to enter or select the parameter value of the fragment shader. This control is used to set the parameters of the fragment shader, such as color, light intensity, texture coordinates, etc. It provides an intuitive parameter setting method, and users can easily adjust the fragment shader parameters to achieve detailed pixel-level control.

[0034] The rendering parameter setting control includes text boxes, sliders, and check boxes, which are used to enter or select parameters for the rendering process. This control is used to set OpenGL rendering parameters, such as depth testing, blending mode, anti-aliasing, etc. Through the graphical parameter setting interface, users can quickly adjust rendering parameters, optimize rendering effects, and improve the performance and visual quality of graphics applications.

[0035] The camera position parameter setting control in the rendering parameter setting control can be a text box or a 3D control, which is used to input or adjust the position and direction of the camera. This control is used to set the position and viewing angle of the virtual camera in the 3D scene, such as the camera's x, y, z coordinates and rotation angle. Through intuitive control methods, users can easily set and adjust the camera position to obtain the desired viewing angle and shooting effect.

[0036] The lighting parameter setting control in the rendering parameter setting control can be implemented as a slider, color selector, etc., for inputting or adjusting lighting parameters. This control is used to set the light source parameters in the scene, such as light source position, color, intensity, direction, etc. Through the graphical lighting setting interface, users can easily adjust the light source parameters to create realistic lighting effects and enhance the three-dimensionality and realism of the scene.

[0037] In one embodiment of the present application, the graphical interface module further includes a rendering engine unit for generating in real time a rendering result of the model after relevant parameters are set.

[0038] Specifically, a rendering engine unit is integrated in the graphical interface module to generate the rendering results of the model in real time after the relevant parameters are set. The rendering engine unit is implemented using OpenGL or other 3D rendering libraries. By writing rendering code, the rendering engine receives the parameters passed from the user interface module and generates the rendering results of the 3D model based on these parameters. The rendering results are displayed in real time in the designated area of ​​the graphical interface. The rendering engine continuously receives the latest parameter values ​​and updates the rendering content to ensure that the user can immediately see the effect of the parameter adjustment.

[0039] With the above technical solution, through the graphical interface module, users do not need to write code, but only need to input or select parameters through graphical controls to carry out graphics development, which greatly reduces the technical threshold. The integration of the rendering engine unit allows users to view the rendering results after parameter adjustment in real time, immediately feedback and verify the effect of parameter settings, and facilitate users to make instant adjustments and optimizations.

[0040] In one embodiment of the present application, the step of defining and packaging the parameter information according to a preset rule includes the following steps: Add different identifiers to different parameter information input by the user in the graphical interface module; Encapsulate each different parameter information and its corresponding identifier into a key-value pair; Get all key-value pairs and write them into a key-value pair array.

[0041] Specifically, in the early stages of development, develop a set of naming rules to define a unique identifier for each type of parameter. For example, file path parameters can use file_path, vertex shader parameters can use vertex_shader_param, and so on. In the graphical interface module, bind each parameter control to the corresponding identifier. These identifiers can be set through the properties or IDs of the control. For example, in Qt, you can use the setProperty("identifier", "file_path") method to bind an identifier to a control. Whenever a user enters or modifies a parameter in a control, an event listener captures these changes and stores the parameter value together with its identifier in an in-memory data structure.

[0042] When the user enters or modifies a parameter, the event listener is triggered and the value of the current control and its identifier are read out. The read identifier and parameter value are encapsulated into a key-value pair. For example, in Java, Map<String,Value> Every time a parameter is updated, the corresponding key-value pair is updated in real time and stored in the parameter collection in memory.

[0043] Collect all the encapsulated key-value pairs and generate a key-value array for easy passing to subsequent modules. Extract all key-value pairs from the parameter set in memory. Convert the collected key-value pairs into a key-value array.

[0044] By adopting the above technical solution, a large amount of parameter information can be efficiently managed and processed by adding a unique identifier to each parameter and encapsulating the parameter and the identifier into a key-value pair. This avoids the problem of parameter naming confusion and duplication, and improves the reliability of data processing. Binding the parameter value to the identifier and storing it in the form of a key-value pair ensures the consistency and integrity of the data. During the parameter transmission and processing process, data loss or error will not occur due to changes in parameter names or positions.

[0045] In one embodiment of the present application, copying the engineering template with pending parameters and traversing the key-value pair array further includes: When the pending parameter definitions in the project template do not correspond one-to-one to the parameter definitions in the key-value pair array, the code segment where the uncorresponding pending parameters in the project template are located is deleted or the uncorresponding pending parameters in the project template use default values.

[0046] Specifically, create a copy from the original project template. This copy will be used in subsequent operations to ensure that the original template remains unchanged. Iterate over the provided key-value array and process each key-value pair one by one. The key represents the name of the parameter to be determined, and the value represents the value of the parameter to be determined.

[0047] Traverse the contents of the template file and find all pending parameters. For each pending parameter, check whether it has a corresponding key in the key-value array. If there is a corresponding key, replace the pending parameter in the template with the value in the key-value array.

[0048] If a pending parameter in the template does not have a corresponding key in the key-value pair array, delete the code segment containing the pending parameter. Or use the default value for the uncorresponding pending parameter.

[0049] By using the above technical solution, deleting the code segments that do not correspond to the parameters can reduce the code volume, making the generated final project file more concise and avoiding unnecessary code. Using the default value can avoid system anomalies and improve the robustness of the system.

[0050] In one embodiment of the present application, the engineering template with pending parameters is encapsulated with a common standard OpenGL development framework code, wherein the parameter part is a key placeholder corresponding to the parameter key-value pair collected by the parameter collection module.

[0051] Specifically, it encapsulates the common standard OpenGL development framework code, so that developers do not need to write basic code from scratch every time, which significantly reduces repetitive work and improves development efficiency. By using engineering templates with pending parameters, developers can quickly start new projects and only need to focus on specific business logic and parameter configuration. By using placeholders to represent parameters, developers can dynamically configure different parameters according to specific needs, such as file paths, shader parameters, rendering parameters, etc., which greatly improves the flexibility of the template. The template can adapt to different project requirements, and developers only need to provide different parameter sets to generate engineering code suitable for different scenarios.

[0052] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the inventive concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.

Claims

1. A plug-in system for graphics development, characterized in that: include: A graphical interface module is provided with a plurality of controls for accepting parameters input by the user; The parameter collection module obtains the parameter information input by the user in the graphical interface module, and defines and encapsulates the parameter information according to preset rules to generate a key-value pair array; Project templates with pending parameters are generated based on the integrated development environment; as well as A writing module is used to copy the engineering template with pending parameters, and the key-value pair array is traversed to replace the pending parameters in the engineering template with pending parameters with the parameters in the key-value pair array. During the replacement, the pending parameter definition in the engineering template corresponds one-to-one with the parameter definition in the key-value pair array, and a template object that can be compiled and deployed by the development environment is generated to reduce the difficulty of developing graphics applications.

2. The plug-in system for graphics development according to claim 1, characterized in that: The plurality of controls include: Select the path of the file model and the material model, set the vertex shader parameters, the fragment shader parameters, the rendering parameters, and at least one of the texture maps.

3. The plug-in system for graphics development according to claim 1, characterized in that: The graphical interface module also includes a rendering engine unit, which is used to generate a rendering result of the model in real time after relevant parameters are set.

4. The plug-in system for graphics development according to claim 1, characterized in that: The method of defining and packaging the parameter information according to preset rules comprises the following steps: Add different identifiers to different parameter information input by the user in the graphical interface module; Encapsulate each different parameter information and its corresponding identifier into a key-value pair; Get all key-value pairs and write them into a key-value pair array.

5. The plug-in system for graphics development according to claim 1, characterized in that: Copying the project template with pending parameters and traversing the key-value pair array further includes: When the pending parameter definitions in the project template do not correspond one-to-one to the parameter definitions in the key-value pair array, the code segment where the uncorresponding pending parameters in the project template are located is deleted or the uncorresponding pending parameters in the project template use default values.

6. The plug-in system for graphics development according to claim 1, characterized in that: The engineering template with pending parameters encapsulates a common standard OpenGL development framework code, wherein the parameter part is a key placeholder corresponding to the parameter key-value pair collected by the parameter collection module.

Citation Information

Patent Citations

  • Visual programming-based cross-platform rendering effect edition system

    CN108597014A

  • A method and a device for processing a configuration file based on a visual interface

    CN109683953A

  • System, method and device for generating WEB application through visual configuration and medium

    CN110609681A

  • Web end visual development method and system and storage medium

    CN114138256A

  • Data analysis method and device based on visual configuration and terminal

    CN115525288A