GSoC 2019 Dev Log

From LibreCAD wiki
Revision as of 08:38, 19 June 2019 by Kartik Kumar (Talk | contribs)

Jump to: navigation, search

Community Bonding Period (May 6th - May 27th)

> During Community Bonding Period i continued doing more research work for the LibreCAD OpenGL rendering project.

> Linked a partial implemented OpenGL painter with the LibreCAD 3 which uses BufferObjects for rendering

> Implemented basic facilities like pan, zoom

> I started with finding the connections of rendering functions of drawables,drawentities etc.

> Implement and connect the drawables like grid,cursor, origin pointer etc.

> Found connection of tempentities , drawentities

> Tried and check ways of Text Rendering with OpenGL painter( basic ttf type / MSDF type )

> Found place for the caching the saved entities.

> Implemented few more functions in opengl painter (analogous to Cairo) which does Matrix/Vector/Coordinate manipulations(manually with GLM)

> Deciding the basic complete layout of OpenGL painter and found possible ways of complete implementation : https://github.com/sckorpio/LibreCAD_3

> I created blog for the development log on LibreCAD blog : https://blog.librecad.org/tag/google-summer-of-code-gsoc-2019/

TODO:

> Finalize and implement basic gl_entity class which could hold all type of possible entities and render them

> Create a gl_pack class which could hold a number of gl_entities to cache and render complex entities (like dimensions)

> Decide which text rendering should be used (basic ttf or MSDF or both..)

> little research work left on gradient rendering and line patterns and continuing work to complete the painter implementation

Coding Period Phase 1 (May 27th - June 28th)

Week 1

May 27th

> I started with reviewing the partially implemented opengl painter and used only one painter instance with each viewer (which was earlier 3 instances for background,foreground and document using cairo)

> making the painter instance creation more robust starting from UI

May 28th

> Started with testing the drawables rendering with opengl painter , drawables doest require caching

> Connect the signal(drawevent) and slot(grid's draw() code) , Tested the grid drawing calls with the opengl painter

TODO: Debug later -- the zooming out of grid misses some lines

May 29th

> Connect the lccursor with drawevent signal , Tested the cursor drawing calls with the opengl painter

May 30th

> Connected the tempentities with the signal, Now the entities (during drawing/editing process) can also be rendered

> Connected the dragpoints with the signal, Now the entities can be edited using dragpoints

> Checked the editing options correct working like- translate, rotate, scale , copy etc

May 31st

> Found some errors in cursor during high zoom, debugging the lccursor

> Trying to get the perfect viewport with error free pan and zoom so that later the new entities can be seen while testing

June 1st

> Separated the translate,rotate,scale matrix from the model,view,projection matrix in Renderer

> Fixed the clipping of grid while zooming out also speed up the cursor at high zoom.

June 2nd

> Implemented the reset_transformation function

> Now the zoom is perfect working , zooming into the cursor with stability

> In Cairo all matrix are 3*3 so manually implemented all with 4*4 matrices in OpenGL Renderer Class

Week 2

June 3rd

> Found need of Isolated Transformations

> Need of context saving and restoring which stores the transformation matrices, linewidth, color etc

June 4th

> Created a structure which can save the context attributes like glm::mat , linewidth , color

> Created Stack Implementation for the saving and restoring of context

> Implemented the painters save() and restore() methods, now isolated transformations working correctly

June 5th

> Joined the lcvdimensions with the render calls, dimensions all working fine now

> Temporary Implemented the rendering of empty quads in place of text , just to check the saving and restoring of context. Working fine

June 6th

> Implemented the Rotation Matrix manipulation methods

> The Text Quads are now getting rendered with correct angle, working OK

> Now the basic operations of OpenGL painter are functioning correct ( without caching mechanism )

June 7th

> Starting with Caching mechanism

> Reviewing all draw() codes once again to design and finalize the gl_entity class

June 8th

> Found some possible errors which can clash with opengl painter

> Fix those draw codes to work correctly with painter

June 9th

> BREAK

Week 3

June 10th

> Found possible issue with multiple matrix transformations, Need to remember the transformations after caching

> Redesigned the painter matrix manipulations with single CTM and MVP

> Shifting the model matrix to caching painter

June 11th

> Understanding the kernel and storage part of librecad

> Found the Signal and slot connections of events between the document and documentcanvas

June 12th

> Found error with the remove entity signal emitting code ( of paperviewer )

> Fixed some function in storage manager to solve the issue , now entities are rendering OK in paperviewer tab also

June 13th

> Found the duplication of entities storing in entity container of document canvas

> Tried to make a new cached container with key = id of entity

June 14th

> Found some issue with the draw code of paperbackground

> Fixed the missing stroke() call , now the paper background is rendering correct ( Temporary as a white rectangle )

June 15th

> Reviewed all draw() codes and planned the structure of caching , things which are constant and which are variable

> Updated the gl_entity class to hold attributes need in caching

June 16th

> BREAK

Week 3

June 10th

> Found possible issue with multiple matrix transformations, Need to remember the transformations after caching

> Redesigned the painter matrix manipulations with single CTM and MVP

> Shifting the model matrix to caching painter