Editing User:AnkushKhandelwal/OpenGLRendering
From BRL-CAD
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | + | '''OpenGL Framework''' | |
− | ''' | ||
− | |||
− | |||
− | |||
Brief Description: The Objective of the project is to Re-factor and re-write the existing code of OpenSCAD preferably by implementing or using an existing rendering/scenegraph framework for cleaner rendering code. This newly developed infrastucture can be imported to softwares like GLES2 which opens up more possibilities like WebGL and native support for ARM Linux platforms that usually only provide GLES2 implementation. | Brief Description: The Objective of the project is to Re-factor and re-write the existing code of OpenSCAD preferably by implementing or using an existing rendering/scenegraph framework for cleaner rendering code. This newly developed infrastucture can be imported to softwares like GLES2 which opens up more possibilities like WebGL and native support for ARM Linux platforms that usually only provide GLES2 implementation. | ||
Line 11: | Line 7: | ||
*'''IRC username''': ank_95 | *'''IRC username''': ank_95 | ||
*'''Contact Number''': +918886330979 | *'''Contact Number''': +918886330979 | ||
− | |||
− | |||
==Background Information== | ==Background Information== | ||
− | * Pursuing Computer Science from IIIT Hyderabad, Andhra Pradesh, India. Currently in 2nd year | + | * Pursuing Computer Science from IIIT Hyderabad, Hyderabad, Andhra Pradesh, India. Currently in 2nd year. |
− | + | * Worked in c, c++ and OpenGL 2/3. | |
− | * Worked in c, c++ and OpenGL | ||
− | |||
* Interested in Graphics and front-end development. | * Interested in Graphics and front-end development. | ||
* I am a Linux user and want to step in the Open Source World. | * I am a Linux user and want to step in the Open Source World. | ||
− | * I am familiar with git. | + | * I am familiar with git. Commit my work on git using github account(github.com/ankush1995). |
− | |||
− | |||
==Project Information== | ==Project Information== | ||
Line 42: | Line 32: | ||
https://github.com/openscad/openscad/wiki/Information-About-Other-Frameworks. | https://github.com/openscad/openscad/wiki/Information-About-Other-Frameworks. | ||
+ | '''Creating or Selecting Scenegraph/Rendering Library''' | ||
+ | |||
+ | In openSCAD OpenGL ES2 is not yet supported, till now immediate-mode opengl is used. The Goal of this scene-graph library would be to provide rendering data structure to abstract buffer objects and also to manage Qt event mappings to camera. By the hepl of this library the internal segments of openSCAD will be entirely independent of rendering. | ||
+ | This Library will help to refactor internal OpenSCAD code instead of the current rendering used in OpenSCAD. The Rendering using the Library will be more simple and clean, it will be helpful for calling CGAL objects, Polyset objects and helper objects like axis display. With this library many features can be implemented like the speeding up of OpenGL 3d mesh drawing etc. | ||
'''Spliting the OpenGL code in Different classes - CODE EXTRACTION''' | '''Spliting the OpenGL code in Different classes - CODE EXTRACTION''' | ||
We need to split out the openGL code from the polyset classes and all other classes and make a different class or data structure and it is used directly. In All it should be a seperate component which takes objects (for example , polyset) and renders it, in an effort to isolate the rendering from the rest of the software. The code of OpenSCAD is in openGL 2 and 1.1 + extentions and also we have users on openGL 2 and openGL 1.1 + extentions , so abstracting away OpenGL extensions and version differences is important. | We need to split out the openGL code from the polyset classes and all other classes and make a different class or data structure and it is used directly. In All it should be a seperate component which takes objects (for example , polyset) and renders it, in an effort to isolate the rendering from the rest of the software. The code of OpenSCAD is in openGL 2 and 1.1 + extentions and also we have users on openGL 2 and openGL 1.1 + extentions , so abstracting away OpenGL extensions and version differences is important. | ||
− | + | If we know exactly how much GL code is in a file , the next step would be to turn it into a separate component, i.e. a class or set of functions that take a polyset as parameter and renders it. This class would then be responsible for converting polyset data into something more suitable for OpenGL.For example it does not make sense to render one single object in OpenGL ,it is not even supported in mordern OpenGL without enabling legacy compatibility. | |
− | |||
− | |||
− | |||
− | If we know exactly how much GL code is in a file , the next step would be to turn it into a separate component, i.e. a class or set of functions that take a polyset as parameter and renders it | ||
− | |||
− | |||
− | |||
− | |||
− | |||
Then, in the future, when we use a real OpenGL framework, the renderer will most likely build a VBO using classes internal to that specific rendering framework all the VBO stuff would then be built without having to make any changes to the PolySet class. | Then, in the future, when we use a real OpenGL framework, the renderer will most likely build a VBO using classes internal to that specific rendering framework all the VBO stuff would then be built without having to make any changes to the PolySet class. | ||
If we can compile for example polyset without actually having OpenGL (e.g. on GLES2 box like Chromebook) in it then it will be a measure of success of code extraction. | If we can compile for example polyset without actually having OpenGL (e.g. on GLES2 box like Chromebook) in it then it will be a measure of success of code extraction. | ||
A patch has been submitted in which the OpenGL code is in one file and other renderin code is in another : https://github.com/openscad/openscad/pull/1249 | A patch has been submitted in which the OpenGL code is in one file and other renderin code is in another : https://github.com/openscad/openscad/pull/1249 | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
'''Off-Screen Rendering''' | '''Off-Screen Rendering''' | ||
Line 86: | Line 64: | ||
'''Week 1(May 25)''' | '''Week 1(May 25)''' | ||
− | * Identify Goals and Requirements | + | * Identify Goals and Requirements. |
− | * | + | * Listing out various Rendering Engines on which experiment can be done of the newly developed code after the completion of project. |
+ | * Looking through the files from which GL code is to be extracted and understanding it. | ||
− | '''Week 2-3 | + | '''Week 2-3''' |
− | * | + | * Working on scene-graph like Library which is comparatively a large task. |
− | + | * Starting separating GL code from the various files. | |
− | * Starting separating | ||
− | |||
− | '''Week 4 | + | '''Week 4''' |
− | * | + | * Working on the Library continues. |
− | * | + | * This library is a seperate GL rendering library which will make the internals of openSCAD independent of rendering, then we just have to pass objects. |
− | |||
− | |||
− | |||
− | '''Week 5 | + | '''Week 5''' |
− | * Making a seperate segment ( either a | + | * Extracting the OpenGL code from the polyset classes and helper classes. |
− | + | * Making a seperate segment ( either a class or a data structure ). | |
− | |||
− | |||
− | |||
− | |||
− | '''Week 6 | + | '''Week 6''' |
− | * | + | * Create an abstract supertype of the class containg GL code. |
− | * | + | * Constructing most of the part of Rendering Library. |
− | |||
− | |||
''' MID-term Evaluations''' | ''' MID-term Evaluations''' | ||
− | '''Week 7 | + | '''Week 7''' |
− | * | + | * Continuing with making a superset class to render the GL code. |
− | * | + | * Testing of rendering Library Begins. |
− | |||
− | '''Week 8-9 | + | '''Week 8-9''' |
* Solving issues on github, #292, #675, #418 etc. | * Solving issues on github, #292, #675, #418 etc. | ||
− | * | + | * if successful, Heavy testing of the Library. |
− | + | * else, looking for prominent solution. | |
− | |||
− | * | ||
− | '''Week 10 | + | '''Week 10''' |
* Integration phase begins. | * Integration phase begins. | ||
− | * | + | * using library in other files. |
− | |||
− | '''Week 12 | + | '''Week 11-12''' |
− | |||
* Experimenting with other frameworks. | * Experimenting with other frameworks. | ||
− | * trying to implement Off-screne Rendering feature with the help of new OpenSCAD which supports OpenGL ES2 | + | * trying to implement Off-screne Rendering feature with the help of new OpenSCAD which supports OpenGL ES2. |
− | '''Week 13 | + | '''Week 13''' |
* Cleaning up the code. | * Cleaning up the code. | ||
* Time to make up for missed milestone (if any). | * Time to make up for missed milestone (if any). | ||
Line 146: | Line 109: | ||
''' Week 14''' | ''' Week 14''' | ||
* more testing and cleaning. | * more testing and cleaning. | ||
− | |||
''' Final Evaluation''' | ''' Final Evaluation''' | ||
Line 152: | Line 114: | ||
==Deliverables== | ==Deliverables== | ||
− | * Cleaner rendering code | + | * Cleaner rendering code |
− | |||
* Better support and better responsiveness for bigger models | * Better support and better responsiveness for bigger models | ||
* view-modal of the OpenGL code | * view-modal of the OpenGL code |