View Issue Details

IDProjectCategoryView StatusLast Update
0002897FreeCADBugpublic2017-03-07 12:07
ReporterKunda1 Assigned Tovejmarie  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
PlatformOSTravis OSXOS Version
Product Version0.17 
Target Version0.17Fixed in Version0.17 
Summary0002897: OpenGL methods have been deprecated starting in MacOSX 10.9
DescriptionLooks like some OpenGL methods have been deprecated in favor of newer methods:
See http://stackoverflow.com/questions/30361168/how-to-fix-my-deprecated-use-of-gluortho2d

Errors thrown by TravisCI OSX build in https://travis-ci.org/FreeCAD/FreeCAD/jobs/198293796#L3172-L3178
/Users/travis/build/FreeCAD/FreeCAD/src/Mod/Image/Gui/GLImageBox.cpp:102:5: warning: 'gluOrtho2D' is deprecated: first deprecated in OS X 10.9 - "Use GLKMatrix4MakeOrtho" [-Wdeprecated-declarations]
    gluOrtho2D(0, width() - 1, height() - 1, 0);
    ^
/System/Library/Frameworks/OpenGL.framework/Headers/glu.h:276:13: note: 'gluOrtho2D' has been explicitly marked deprecated here

extern void gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top) OPENGL_DEPRECATED_MSG(10_0, 10_9, "Use GLKMatrix4MakeOrtho");
            ^
1 warning generated.

See also https://travis-ci.org/FreeCAD/FreeCAD/jobs/198293796#L3245-L3259
TagsMacOSX
FreeCAD Information

Activities

Kunda1

2017-02-10 21:32

administrator   ~0008267

Reminder sent to: blacey

Just sending @blacey an FYI about 0002897

blacey

2017-02-10 22:38

developer   ~0008269

@vejmarie, do you want to take this one while you are messing around with OpenGL? It looks really straight-forward if you read the stackoverview link included in the description.

blacey

2017-02-16 03:00

developer   ~0008319

Assigned to @vejmarie per his Gitter post to take a look.

vejmarie

2017-02-24 20:20

developer   ~0008426

I just checked, and this stuff is located into dead code (aka it is never called anywhere in FreeCAD and we can even comment the function). I think we shall just comment it for the moment, and remove it in a couple of months if nobody wants to re-activate it. What do you think ?

blacey

2017-02-26 00:41

developer   ~0008437

Thanks @vejmarie, your plan sounds fine by me but perhaps we can just remove the legacy code and re-add if necessary.

Adding @wmayer so he can weigh in.

ian.rees

2017-02-26 05:34

developer   ~0008438

+1 for just deleting unnecessary code - it's less work and just as safe.

wmayer

2017-03-03 16:04

administrator   ~0008527

I just checked, and this stuff is located into dead code
GLImageBox.cpp is part of the Image module and maybe rarely used but it's definitely not dead code.

vejmarie

2017-03-03 16:13

developer   ~0008528

Hi wmayer,
The call is there

void GLImageBox::resizeGL( int w, int h )
{
    glViewport( 0, 0, (GLint)w, (GLint)h );
    glMatrixMode( GL_PROJECTION );
    glLoadIdentity();
    gluOrtho2D(0, width() - 1, height() - 1, 0);
    glMatrixMode(GL_MODELVIEW);
}
and the ResizeGL function is never called in FreeCAD, that is why I proposed to remove it from the file by commenting it. GLImageBox.cpp is a old stuff. I can migrate it to a newer GL code, but the issue I faced was how to test it, as it is not called into FreeCAD ;). Ok I can call it and see if it work, but I even have some doubt on that because it will requires to change the viewprovider call to call the resize at the right time. "lot" of work for something currently unused ;).

vejmarie

2017-03-03 20:18

developer   ~0008529

Ok, I found a way to test the stuff. I will push for a PR within the next couple of minutes to close that issus

vejmarie

2017-03-03 21:46

developer   ~0008534

This has been fixed in PR 0000584 I think we can close the issue

Issue History

Date Modified Username Field Change
2017-02-10 21:17 Kunda1 New Issue
2017-02-10 21:17 Kunda1 Tag Attached: MacOSX
2017-02-10 21:32 Kunda1 Note Added: 0008267
2017-02-10 21:33 Kunda1 Project Path => FreeCAD
2017-02-10 22:38 blacey Note Added: 0008269
2017-02-16 02:59 blacey Assigned To => vejmarie
2017-02-16 02:59 blacey Status new => assigned
2017-02-16 03:00 blacey Note Added: 0008319
2017-02-20 22:51 Kunda1 Target Version => 0.17
2017-02-24 20:20 vejmarie Note Added: 0008426
2017-02-26 00:41 blacey Note Added: 0008437
2017-02-26 05:34 ian.rees Note Added: 0008438
2017-03-03 16:04 wmayer Note Added: 0008527
2017-03-03 16:13 vejmarie Note Added: 0008528
2017-03-03 20:18 vejmarie Note Added: 0008529
2017-03-03 21:46 vejmarie Note Added: 0008534
2017-03-07 12:07 wmayer Status assigned => closed
2017-03-07 12:07 wmayer Resolution open => fixed
2017-03-07 12:07 wmayer Fixed in Version => 0.17