GSoC 2018, Week 4

Made few commits and submitted code with a few bugs left with the rendering of the painter due to QWidget.

June 8, 2018

Made a from changes in painter workflow. Now draw the line, rectangle, etc. will store instructions to draw particular patterns in form of drawing lines between two coordinates. Once stroke function is called all the data that is stored is drawn.

June 5-6, 2018

Removing the instances of the previous painter and working on rendering new painter.

June 4, 2018

Creating another function for the check of repeated drawing of the same pattern. So it stores the pattern in GPU cache and calls ‘glDrawArray’ to draw pattern instead of drawing it again.

June 4, 2018

Once the pattern is saved then dashes are rendered using stroke function by drawing the line for the ‘on’ part and draw nothing for the ‘off’ part.

June 3, 2018

Started working on the dash patterns. As no OpenGL libraries work on rendering dashes considering the line width and offset. For set_dash creating an array for storing the dash lengths with offset.

GSoC 2018, Week 3

June 1,2018

Continued working on replacing of the painter member functions.

May 31,2018

Working on replacing the part where the pointer to the painter is made and its member functions are called with the new painter and creating new member functions which do not exists in OpenGL library.

May 29-30,2018

Learning about OpenGL Shaders for the working of the fill (to fill an object with the color given through RGBA code). In particular, using vertex shaders and fragment shaders for rendering on the graphics card and not on CPU.

May 28,2018

Rendering of the coordinates with the cursor using OpenGL functions. Using glutBitmapCharacter() for the printing of the text on the screen and glRasterPos2f(x,y) for the position to render the text. Also changing the font type and font size.

GSoC 2018, Week 2

May 26,2018

Read about working of OpenGL Vertex Buffers and usage of some new functions like glPushMatrix and glPopMatrix and implemented the conversion of the device to user coordinates and vice versa.

May 25,2018

Got stuck with the rendering of the new painter due to some issues with the pointers but was finally able to resolve them with the help of my mentors. Also used QOpenGLWidget in place of QWidget for the rendering and read its documentation.

May 24,2018

Add new functions to the new painter such as creating lines, rectangles, etc using Vertex buffer objects. Also added many similar functions like clear, fill color with arguments as RGB codes.

May 23,2018

Learned few things about QOpenGLWidget and replaced it with QWidget at few places in order to create an OpenGL window. Removed the previous function to create painter and added files for new painter and make use of its members to create a window.

May 22,2018

Removing the part of the grid that was earlier rendered through Cairo but now it is done with the new painter. Now the grid will be rendered using the new painter and rest all things are same. Changes made are mostly in grid.cpp file and the functions related to the previous painter is removed.

May 21,2018

Completing the task of the grid for the new painter. The grid is rendered through OpenGL and lines are formed using ‘vertex buffer objects’ and then glDrawArrays(GL_LINES, 0, 2) will draw them on the painter.

Beginning of the Working period for GSoC 2018

Hello,

With the end of the Community Bonding period, the official coding period has begun. During the Community Bonding period, I interacted with my mentors and did some research for my projects i.e. LibreCAD 3 OpenGL Rendering. With help from them, I was able to build the LibreCAD 3 and run it. I went through the code base and had a reading of the module ‘lcviewernoqt’ inside LibreCAD 3 which is directly involved with my project.

Also along with these readings, I went through some research papers and articles for the formation of different types of lines i.e. different dashed lines/strokes formed using OpenGL libraries that is to be used in the formation of the grid in the painter and other shapes such as lines, circles, etc.

During the first week of the coding period, I would be working on the formation of the grid inside the painter, creating lines using Vertex Buffers and working of the scrollbar. Also, it would involve the extraction of the coordinates of the mouse pointer.

Thank You