[brlcad-tracker] [ brlcad-Patches-3512039 ] Refactoring in libdm
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: SourceForge.net <no...@so...> - 2012-08-08 19:19:02
|
Patches item #3512039, was opened at 2012-03-27 10:44 Message generated for change (Comment added) made by ksuzee You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=640804&aid=3512039&group_id=105292 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Closed Resolution: Accepted Priority: 6 Private: No Submitted By: Ksenija Slivko (ksuzee) Assigned to: Cliff Yapp (starseeker) Summary: Refactoring in libdm Initial Comment: This's file "utils.c" which will be contain common functions. Now there's the function which is common for dm-X.c dm-plot.c dm-ps.c. from folder /brlcad-svn/src/libdm. I 've found there some code duplication. Also I made "utils.h" in /brlcad-svn/include ---------------------------------------------------------------------- Comment By: Ksenija Slivko (ksuzee) Date: 2012-08-08 12:19 Message: Thank you. These two patches were put in one only because they had common CMakeFiles and one of them needed another one. As for X1, Y1, I used such names only because they were used in these files before reduction ---------------------------------------------------------------------- Comment By: Cliff Yapp (starseeker) Date: 2012-08-01 10:55 Message: Ksenija, I have applied this patch, after adding wrappers to conditionalize the OpenGL specific code for the compiler. Discussed it with Sean, and we have a couple comments: 1. This really should have been two patches - one for the 3D line drawing function shared by plot and ps, and one for the other OpenGL functions. 2. The function names are confusing - there are two line3D functions doing different things with very similar names. They should either be renamed to better reflect their specific tasks, or merged (if possible.) 3. It's better not to use variable names like X1, Y1, etc - on some platforms those can cause conflict issues. Please review your other patches for these issues. ---------------------------------------------------------------------- Comment By: Ksenija Slivko (ksuzee) Date: 2012-07-30 10:55 Message: I have found the problem and resolved it. DM_WGL and DM_RTGL defines are not used on my platform, so compiller didn't throw the error. The error was at file dm-rtgl.c in function rtgl_drawLine2D(). drawLine2D() function's parameters were X1, Y1, X2, Y2 instead of x1, y1, x2, y2. ---------------------------------------------------------------------- Comment By: Cliff Yapp (starseeker) Date: 2012-07-30 05:14 Message: Had to revert (r51712) - the OpenGL functionality in dm_util needs to be wrapped with appropriate ifdef protections so it doesn't break builds without OpenGL, and the includes also need to provide the necessary headers so systems that do have OpenGL can reliably provide that functionality. Not sure why this didn't show up in my earlier build... Needs to be tested on a system without OpenGL, or simulate that effect by temporarily moving the OpenGL files out of place. ---------------------------------------------------------------------- Comment By: Cliff Yapp (starseeker) Date: 2012-07-29 13:59 Message: Applied r51707 ---------------------------------------------------------------------- Comment By: Cliff Yapp (starseeker) Date: 2012-07-29 13:59 Message: The changes provided have been applied to the latest sources and should be included in the next release of BRL-CAD. You're encouraged to make sure that the changes were applied correctly and are working as expected. Thank you for the patch! ---------------------------------------------------------------------- Comment By: Ksenija Slivko (ksuzee) Date: 2012-07-28 14:45 Message: Patch was updated. Everything is clear now. ---------------------------------------------------------------------- Comment By: Ksenija Slivko (ksuzee) Date: 2012-07-18 12:50 Message: Updated the patch. Added to util.c and util.h some necessary comments. Deleted unnecessary headers. ---------------------------------------------------------------------- Comment By: Ksenija Slivko (ksuzee) Date: 2012-06-13 11:22 Message: I changed everything, because it was my first patch and I didn't know, how to do this. Now everything is in a patch file, all the functions're in their files and the call inline function, which is in util.c and util.h ---------------------------------------------------------------------- Comment By: Sean Morrison (brlcad) Date: 2012-05-22 19:28 Message: Please provide this in patch format. If you run "svn diff file1 file2 file3 > my_patch.diff", it'll record just your changes into the my_patch.diff output file and you can attach that here. ---------------------------------------------------------------------- Comment By: Ksenija Slivko (ksuzee) Date: 2012-03-27 10:50 Message: I used Simian for finding duplication ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=640804&aid=3512039&group_id=105292 |