Difference between revisions of "GSoC 2019 Dev Log"

From LibreCAD wiki
Jump to: navigation, search
(Coding Period Phase 2 (June 29th - July 26th))
(Week 6)
Line 265: Line 265:
  
 
== '''Week 6''' ==
 
== '''Week 6''' ==
 +
'''July 1st'''
 +
 +
> Completed the Gradient rendering ( Gradient Entity , functions etc )
 +
 +
> Implemented the Linear_Gradient calculation function using vector geometry math
 +
 +
> Finally got the correct gradient background and paper background result all working OK
 +
 +
'''July 2nd'''

Revision as of 18:49, 1 July 2019

 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 4

June 17th

> Discussed the different ways of caching with mentors and decided to implement a particular

> Started with making a separate class named caching painter which will only cache things without any rendering

June 18th

> Started making other classes like Cacher, gl_pack etc which will work in caching

> Added few more functions in main painter and documentcanvas for making caching more abstracted

June 19th

> Continuing working on these classes

June 20th

> Almost completed with the gl_entity, gl_pack, cacher , cacherpainter classes

> Now able to run the draw() codes through caching painter

> Able to cache the gl_packs and implemented the required query functions regarding caching

June 21st

> Ran Caching with basic entities lines , circle , arc etc and with dimensions ( leaving text) all working OK

> Fixed caching issues , all caching working OK

> Found some signal issues in PAPER viewer while MODEL viewer is all OK

June 22nd

> BREAK

June 23rd

> Fixed the entity storage issue and signals

> Changed the entityDrawItem map in document canvas with key as entity's ID

> Cleaned the Code till now

Week 5

June 24th

> Started with updating the gl_entity to hold the attributes of text rendering

> Making some temporary functions to render direct quads

June 25th

> Merged the old commits from the original repo

> Resolved the issues during compiling and finally updating and cleaning the repo till worked done now

> Submitted the first evaluation form

June 26th

> Got the Feedback on the caching mechanism implemented

> Discussed with mentor how to separate the classes for different types

June 27th

> Started with separating the draw() code from renderer to entity class

> Redesigning the structure of classes to work accordingly

June 28th

> Tried Compiling more than one shader working OK

> One Shader for the basic shape drawing the second one for rendering the gradients

 Coding Period Phase 2 (June 29th - July 26th) 

June 29th

> Discussed more with Mentor to make the entities more abstracted and robust

> Avoiding the conditional statements and now implementing the draw logic of different entity in their respective classes

June 30th

> First time successfully separated the draw code , working OK

> Now working on making a Base class of entity which others will implement

Week 6

July 1st

> Completed the Gradient rendering ( Gradient Entity , functions etc )

> Implemented the Linear_Gradient calculation function using vector geometry math

> Finally got the correct gradient background and paper background result all working OK

July 2nd