X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/f9812559e766a409abfbd2d3bae519298339ab65..3675da388f7ca12cdc6d93f4a8b94ef4bdd96b19:/culooks_drawing.cpp?ds=inline diff --git a/culooks_drawing.cpp b/culooks_drawing.cpp index 61dc30a..65c7644 100644 --- a/culooks_drawing.cpp +++ b/culooks_drawing.cpp @@ -93,7 +93,7 @@ void culooks::drawing::reshapeFunc(int w, int h) void culooks::drawing::displayFunc() { culooks::window *Win = getWin(); - + glClearColor(Win->bgcolor[0], Win->bgcolor[1], Win->bgcolor[2], Win->bgcolor[3]); glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); @@ -119,13 +119,13 @@ void culooks::drawing::displayFunc() void culooks::drawing::initWindow(int winid) { - glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGB|GLUT_DEPTH); + glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGBA|GLUT_DEPTH); glutInitWindowSize(culooks::Windows[winid].second->w, culooks::Windows[winid].second->h); glutInitWindowPosition(winid*100,winid*100); glutCreateWindow( ("culooks / " + culooks::Windows[winid].second->name).c_str() ); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glEnable(GL_BLEND); + glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); glHint(GL_POINT_SMOOTH_HINT, GL_NICEST); glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST); @@ -161,7 +161,6 @@ void culooks::drawing::idleFunc() void* culooks::drawing::glutThread(void *_comArg) { comarg *comArg = (comarg*)_comArg; - glutInit(comArg->argc, comArg->argv); initWindow(0); glutMainLoop();