From 138ac61612df8323c756a9546ed8424b712bb930 Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 17 Feb 2006 04:41:45 +0000 Subject: Removed option for using polygon stipple for transparency. git-svn-id: http://svn.leocad.org/trunk@480 c7d43263-9d01-0410-8a33-9dba5d9f93d6 --- common/curve.cpp | 175 ++++++++++++++++++++++------------------------------ common/defines.h | 2 +- common/object.h | 1 - common/piece.cpp | 66 +++++++------------- common/piece.h | 2 +- common/pieceinf.cpp | 6 -- common/project.cpp | 35 ++++------- linux/dialogs.cpp | 11 +--- win/Prefpage.cpp | 2 - 9 files changed, 110 insertions(+), 190 deletions(-) diff --git a/common/curve.cpp b/common/curve.cpp index 243e43c..c20b804 100755 --- a/common/curve.cpp +++ b/common/curve.cpp @@ -600,131 +600,104 @@ void Curve::TesselateHose () void Curve::Render (LC_RENDER_INFO* pInfo) { - if ((m_nState & LC_CURVE_HIDDEN) != 0) - return; + if ((m_nState & LC_CURVE_HIDDEN) != 0) + return; - // FIXME: create a "set color" function in LC_RENDER_INFO - if (pInfo->lighting || !pInfo->stipple) - glColor4ubv (ColorArray[m_nColor]); - else - glColor3ubv (FlatColorArray[m_nColor]); + // FIXME: create a "set color" function in LC_RENDER_INFO + if (pInfo->lighting) + glColor4ubv (ColorArray[m_nColor]); + else + glColor3ubv (FlatColorArray[m_nColor]); - if (pInfo->stipple) - { - if (m_nColor > 13 && m_nColor < 22) - { - if (!pInfo->transparent) - { - pInfo->transparent = true; - glEnable (GL_POLYGON_STIPPLE); - } - } - else - { - if (pInfo->transparent) - { - pInfo->transparent = false; - glDisable (GL_POLYGON_STIPPLE); - } - } - } - else - { - if (m_nColor > 13 && m_nColor < 22) // FIXME: use a #define - { - if (!pInfo->transparent) - { - pInfo->transparent = true; - glEnable (GL_BLEND); - glDepthMask (GL_FALSE); - glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - } - } - else - { - if (pInfo->transparent) - { - pInfo->transparent = false; - glDepthMask (GL_TRUE); - glDisable (GL_BLEND); - } - } - } + if (m_nColor > 13 && m_nColor < 22) // FIXME: use a #define + { + if (!pInfo->transparent) + { + pInfo->transparent = true; + glEnable (GL_BLEND); + glDepthMask (GL_FALSE); + glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + } + } + else + { + if (pInfo->transparent) + { + pInfo->transparent = false; + glDepthMask (GL_TRUE); + glDisable (GL_BLEND); + } + } - // glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); - glCallList (m_nDisplayList); + // glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); + glCallList (m_nDisplayList); - // if (m_nState & LC_CURVE_SELECTED) - { - // turn off transparency to draw the control points - if (pInfo->transparent) - { - pInfo->transparent = false; - if (pInfo->stipple) - glDisable (GL_POLYGON_STIPPLE); - else - { - if (pInfo->transparent) + // if (m_nState & LC_CURVE_SELECTED) { - glDepthMask (GL_TRUE); - glDisable (GL_BLEND); + // turn off transparency to draw the control points + if (pInfo->transparent) + { + pInfo->transparent = false; + if (pInfo->transparent) + { + glDepthMask (GL_TRUE); + glDisable (GL_BLEND); + } + } + + for (int i = 0; i < m_Points.GetSize (); i++) + m_Points[i]->Render (pInfo); } - } - } - - for (int i = 0; i < m_Points.GetSize (); i++) - m_Points[i]->Render (pInfo); - } - /* - if (IsSelected ()) - { + /* + if (IsSelected ()) + { - for (int i = 0; i < m_nNumPoints; i++) - { - if (m_pPoints[i].m_nFlags & LC_CURVE_POINT_FOCUSED) + for (int i = 0; i < m_nNumPoints; i++) + { + if (m_pPoints[i].m_nFlags & LC_CURVE_POINT_FOCUSED) glColor3ubv (FlatColorArray[LC_COL_FOCUSED]); - else if (m_pPoints[i].m_nFlags & LC_CURVE_POINT_SELECTED) + else if (m_pPoints[i].m_nFlags & LC_CURVE_POINT_SELECTED) glColor3ubv (FlatColorArray[LC_COL_SELECTED]); - else + else glColor3f(0.5f, 0.8f, 0.5f); // FIXME: same as camera color, add to FlatColorArray - // glColor3ub (0, 0, 0); // FIXME: inverse of background - // FIXME: add a new color to the array and change the names from LC_COL to LC_COLOR ? + // glColor3ub (0, 0, 0); // FIXME: inverse of background + // FIXME: add a new color to the array and change the names from LC_COL to LC_COLOR ? - glPushMatrix (); - // RenderSegment (m_pPoints[i].m_fPos, m_pPoints[i+1].m_fPos, m_pSegments[i].m_fR1, m_pSegments[i].m_fR2); - glTranslatef (m_pPoints[i].m_fPos[0], m_pPoints[i].m_fPos[1], m_pPoints[i].m_fPos[2]); - glCallList (m_nSphereList); + glPushMatrix (); + // RenderSegment (m_pPoints[i].m_fPos, m_pPoints[i+1].m_fPos, m_pSegments[i].m_fR1, m_pSegments[i].m_fR2); + glTranslatef (m_pPoints[i].m_fPos[0], m_pPoints[i].m_fPos[1], m_pPoints[i].m_fPos[2]); + glCallList (m_nSphereList); - if (m_pPoints[i].m_nFlags & LC_CURVE_POINT_FOCUSED) - { + if (m_pPoints[i].m_nFlags & LC_CURVE_POINT_FOCUSED) + { glBegin (GL_LINES); if (i < m_nNumSegments) { - glVertex3fv (m_pSegments[i].m_fR1); - glVertex3f (0, 0, 0); + glVertex3fv (m_pSegments[i].m_fR1); + glVertex3f (0, 0, 0); } else if (i > 0) { - glVertex3f (-m_pSegments[i-1].m_fR2[0], -m_pSegments[i-1].m_fR2[1], -m_pSegments[i-1].m_fR2[2]); - glVertex3f (0, 0, 0); + glVertex3f (-m_pSegments[i-1].m_fR2[0], -m_pSegments[i-1].m_fR2[1], -m_pSegments[i-1].m_fR2[2]); + glVertex3f (0, 0, 0); } glEnd (); - } + } - glPopMatrix (); - } - } - */ + glPopMatrix (); + } + } + */ - /* - if (m_nFlags & LC_CURVE_LOOP) - { - i = m_nNumPoints - 1; - RenderSegment (m_pPoints[0].pos, m_pPoints[i].pos, m_pPoints[0].normal, m_pPoints[i].normal); - } - */ + /* + if (m_nFlags & LC_CURVE_LOOP) + { + i = m_nNumPoints - 1; + RenderSegment (m_pPoints[0].pos, m_pPoints[i].pos, m_pPoints[0].normal, m_pPoints[i].normal); + } + */ } diff --git a/common/defines.h b/common/defines.h index ebea0ff..3db9215 100644 --- a/common/defines.h +++ b/common/defines.h @@ -146,7 +146,7 @@ int stricmp(const char* str1, const char* str2); #define LC_DET_LINEAR 0x02000 // Linear filtering #define LC_DET_FAST 0x04000 // Fast rendering (boxes) #define LC_DET_BACKGROUND 0x08000 // Background rendering -#define LC_DET_SCREENDOOR 0x10000 // No alpha blending +//#define LC_DET_SCREENDOOR 0x10000 // No alpha blending #define LC_DRAW_AXIS 0x0001 // Orientation icon #define LC_DRAW_GRID 0x0002 // Grid diff --git a/common/object.h b/common/object.h index 229f76c..10c5f17 100755 --- a/common/object.h +++ b/common/object.h @@ -44,7 +44,6 @@ typedef struct typedef struct { bool lighting; - bool stipple; bool edges; float fLineWidth; diff --git a/common/piece.cpp b/common/piece.cpp index 684bcd5..8b1b59b 100644 --- a/common/piece.cpp +++ b/common/piece.cpp @@ -26,9 +26,11 @@ static LC_OBJECT_KEY_INFO piece_key_info[LC_PK_COUNT] = ///////////////////////////////////////////////////////////////////////////// // Static functions -inline static void SetCurrentColor(unsigned char nColor, bool* bTrans, bool bLighting, bool bNoAlpha) +inline static void SetCurrentColor(unsigned char nColor, bool* bTrans, bool bLighting) { - if (bLighting || !bNoAlpha) + bool Transparent = (nColor > 13 && nColor < 22); + + if (bLighting || Transparent) glColor4ubv(ColorArray[nColor]); else glColor3ubv(FlatColorArray[nColor]); @@ -36,45 +38,23 @@ inline static void SetCurrentColor(unsigned char nColor, bool* bTrans, bool bLig if (nColor > 27) return; - if (bNoAlpha) + if (Transparent) { - if (nColor > 13 && nColor < 22) - { - if (!*bTrans) - { - *bTrans = true; - glEnable(GL_POLYGON_STIPPLE); - } - } - else + if (!*bTrans) { - if (*bTrans) - { - *bTrans = false; - glDisable(GL_POLYGON_STIPPLE); - } + *bTrans = true; + glEnable(GL_BLEND); + glDepthMask(GL_FALSE); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } } else { - if (nColor > 13 && nColor < 22) + if (*bTrans) { - if (!*bTrans) - { - *bTrans = true; - glEnable(GL_BLEND); - glDepthMask(GL_FALSE); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - } - } - else - { - if (*bTrans) - { - *bTrans = false; - glDepthMask(GL_TRUE); - glDisable(GL_BLEND); - } + *bTrans = false; + glDepthMask(GL_TRUE); + glDisable(GL_BLEND); } } } @@ -1138,15 +1118,13 @@ void Piece::BuildDrawInfo() } } -void Piece::Render(bool bLighting, bool bNoAlpha, bool bEdges, unsigned char* nLastColor, bool* bTrans) +void Piece::Render(bool bLighting, bool bEdges, unsigned char* nLastColor, bool* bTrans) { glPushMatrix(); glTranslatef(m_fPosition[0], m_fPosition[1], m_fPosition[2]); glRotatef(m_fRotation[3], m_fRotation[0], m_fRotation[1], m_fRotation[2]); glVertexPointer (3, GL_FLOAT, 0, m_pPieceInfo->m_fVertexArray); -// glEnable(GL_POLYGON_STIPPLE); - for (int sh = 0; sh < m_pPieceInfo->m_nTextureCount; sh++) { glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); @@ -1154,7 +1132,7 @@ void Piece::Render(bool bLighting, bool bNoAlpha, bool bEdges, unsigned char* nL if (m_pPieceInfo->m_pTextures[sh].color == LC_COL_DEFAULT) { - SetCurrentColor(m_nColor, bTrans, bLighting, bNoAlpha); + SetCurrentColor(m_nColor, bTrans, bLighting); *nLastColor = m_nColor; } @@ -1186,12 +1164,12 @@ void Piece::Render(bool bLighting, bool bNoAlpha, bool bEdges, unsigned char* nL { if (*info == LC_COL_DEFAULT) { - SetCurrentColor(m_nColor, bTrans, bLighting, bNoAlpha); + SetCurrentColor(m_nColor, bTrans, bLighting); *nLastColor = m_nColor; } else { - SetCurrentColor((unsigned char)*info, bTrans, bLighting, bNoAlpha); + SetCurrentColor((unsigned char)*info, bTrans, bLighting); *nLastColor = (unsigned char)*info; } } @@ -1223,7 +1201,7 @@ void Piece::Render(bool bLighting, bool bNoAlpha, bool bEdges, unsigned char* nL if (lock) glUnlockArraysEXT(); - SetCurrentColor(m_nState & LC_PIECE_FOCUSED ? LC_COL_FOCUSED : LC_COL_SELECTED, bTrans, bLighting, bNoAlpha); + SetCurrentColor(m_nState & LC_PIECE_FOCUSED ? LC_COL_FOCUSED : LC_COL_SELECTED, bTrans, bLighting); *nLastColor = m_nState & LC_PIECE_FOCUSED ? LC_COL_FOCUSED : LC_COL_SELECTED; if (lock) @@ -1258,12 +1236,12 @@ void Piece::Render(bool bLighting, bool bNoAlpha, bool bEdges, unsigned char* nL { if (*info == LC_COL_DEFAULT) { - SetCurrentColor(m_nColor, bTrans, bLighting, bNoAlpha); + SetCurrentColor(m_nColor, bTrans, bLighting); *nLastColor = m_nColor; } else { - SetCurrentColor((unsigned char)*info, bTrans, bLighting, bNoAlpha); + SetCurrentColor((unsigned char)*info, bTrans, bLighting); *nLastColor = (unsigned char)*info; } } @@ -1294,7 +1272,7 @@ void Piece::Render(bool bLighting, bool bNoAlpha, bool bEdges, unsigned char* nL { if (lock) glUnlockArraysEXT(); - SetCurrentColor((m_nState & LC_PIECE_FOCUSED) ? LC_COL_FOCUSED : LC_COL_SELECTED, bTrans, bLighting, bNoAlpha); + SetCurrentColor((m_nState & LC_PIECE_FOCUSED) ? LC_COL_FOCUSED : LC_COL_SELECTED, bTrans, bLighting); *nLastColor = m_nState & LC_PIECE_FOCUSED ? LC_COL_FOCUSED : LC_COL_SELECTED; if (lock) diff --git a/common/piece.h b/common/piece.h index 7a2de67..91dfc74 100644 --- a/common/piece.h +++ b/common/piece.h @@ -105,7 +105,7 @@ public: void GetRotation (float* rotation) { memcpy(rotation, m_fRotation, sizeof(m_fRotation)); } - void Render(bool bLighting, bool bNoAlpha, bool bEdges, unsigned char* nLastColor, bool* bTrans); + void Render(bool bLighting, bool bEdges, unsigned char* nLastColor, bool* bTrans); inline void RenderBox(bool bHilite, float fLineWidth) { glPushMatrix(); diff --git a/common/pieceinf.cpp b/common/pieceinf.cpp index 9a9d30a..5aca46d 100644 --- a/common/pieceinf.cpp +++ b/common/pieceinf.cpp @@ -1709,13 +1709,11 @@ void PieceInfo::RenderPiece(int nColor) glColor3ubv(FlatColorArray[nColor]); if (nColor > 13 && nColor < 22) { -// glEnable (GL_POLYGON_STIPPLE); glEnable (GL_BLEND); glDepthMask (GL_FALSE); } else { -// glDisable (GL_POLYGON_STIPPLE); glDepthMask (GL_TRUE); glDisable (GL_BLEND); } @@ -1758,7 +1756,6 @@ void PieceInfo::RenderPiece(int nColor) if (curcolor > 13 && curcolor < 22) { -// glEnable (GL_POLYGON_STIPPLE); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable (GL_BLEND); glDepthMask (GL_FALSE); @@ -1766,7 +1763,6 @@ void PieceInfo::RenderPiece(int nColor) } else { -// glDisable (GL_POLYGON_STIPPLE); glDepthMask (GL_TRUE); glDisable (GL_BLEND); glColor3ubv (FlatColorArray[curcolor]); @@ -1801,7 +1797,6 @@ void PieceInfo::RenderPiece(int nColor) if (curcolor > 13 && curcolor < 22) { -// glEnable (GL_POLYGON_STIPPLE); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable (GL_BLEND); glDepthMask (GL_FALSE); @@ -1809,7 +1804,6 @@ void PieceInfo::RenderPiece(int nColor) } else { -// glDisable (GL_POLYGON_STIPPLE); glDepthMask (GL_TRUE); glDisable (GL_BLEND); glColor3ubv(FlatColorArray[curcolor]); diff --git a/common/project.cpp b/common/project.cpp index 1ddf706..2965858 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -1635,7 +1635,7 @@ typedef struct LC_BSPNODE } LC_BSPNODE; static void RenderBSP(LC_BSPNODE* node, float* eye, bool* bSel, - bool bLighting, bool bNoAlpha, bool bEdges, unsigned char* nLastColor, bool* bTrans) + bool bLighting, bool bEdges, unsigned char* nLastColor, bool* bTrans) { if (node->piece) { @@ -1656,20 +1656,20 @@ static void RenderBSP(LC_BSPNODE* node, float* eye, bool* bSel, } } - node->piece->Render(bLighting, bNoAlpha, bEdges, nLastColor, bTrans); + node->piece->Render(bLighting, bEdges, nLastColor, bTrans); return; } if (eye[0]*node->plane[0] + eye[1]*node->plane[1] + eye[2]*node->plane[2] + node->plane[3] > 0.0f) { - RenderBSP(node->back, eye, bSel, bLighting, bNoAlpha, bEdges, nLastColor, bTrans); - RenderBSP(node->front, eye, bSel, bLighting, bNoAlpha, bEdges, nLastColor, bTrans); + RenderBSP(node->back, eye, bSel, bLighting, bEdges, nLastColor, bTrans); + RenderBSP(node->front, eye, bSel, bLighting, bEdges, nLastColor, bTrans); } else { - RenderBSP(node->front, eye, bSel, bLighting, bNoAlpha, bEdges, nLastColor, bTrans); - RenderBSP(node->back, eye, bSel, bLighting, bNoAlpha, bEdges, nLastColor, bTrans); + RenderBSP(node->front, eye, bSel, bLighting, bEdges, nLastColor, bTrans); + RenderBSP(node->back, eye, bSel, bLighting, bEdges, nLastColor, bTrans); } } @@ -1932,7 +1932,6 @@ void Project::RenderScene(bool bShaded, bool bDrawViewports) { LC_RENDER_INFO info; info.lighting = (m_nDetail & LC_DET_LIGHTING) != 0; - info.stipple = (m_nDetail & LC_DET_SCREENDOOR) != 0; info.edges = (m_nDetail & LC_DET_BRICKEDGES) != 0; info.fLineWidth = m_fLineWidth; @@ -2008,7 +2007,7 @@ void Project::RenderScene(bool bShaded, bool bDrawViewports) } } */ - pPiece->Render((m_nDetail & LC_DET_LIGHTING) != 0, (m_nDetail & LC_DET_SCREENDOOR) != 0, (m_nDetail & LC_DET_BRICKEDGES) != 0, &nLastColor, &bTrans); + pPiece->Render((m_nDetail & LC_DET_LIGHTING) != 0, (m_nDetail & LC_DET_BRICKEDGES) != 0, &nLastColor, &bTrans); } else { @@ -2024,7 +2023,7 @@ void Project::RenderScene(bool bShaded, bool bDrawViewports) m_pViewCameras[vp]->GetEyePos (eye); BuildBSP(&tree, pList); RenderBSP(&tree, eye, &bSel, - (m_nDetail & LC_DET_LIGHTING) != 0, (m_nDetail & LC_DET_SCREENDOOR) != 0, (m_nDetail & LC_DET_BRICKEDGES) != 0, &nLastColor, &bTrans); + (m_nDetail & LC_DET_LIGHTING) != 0, (m_nDetail & LC_DET_BRICKEDGES) != 0, &nLastColor, &bTrans); } @@ -2078,19 +2077,14 @@ void Project::RenderScene(bool bShaded, bool bDrawViewports) } } */ - pPiece->Render((m_nDetail & LC_DET_LIGHTING) != 0, (m_nDetail & LC_DET_SCREENDOOR) != 0, (m_nDetail & LC_DET_BRICKEDGES) != 0, &nLastColor, &bTrans); + pPiece->Render((m_nDetail & LC_DET_LIGHTING) != 0, (m_nDetail & LC_DET_BRICKEDGES) != 0, &nLastColor, &bTrans); } } #endif if (bTrans) { - if (m_nDetail & LC_DET_SCREENDOOR) - glDisable(GL_POLYGON_STIPPLE); - else - { - glDepthMask(GL_TRUE); - glDisable(GL_BLEND); - } + glDepthMask(GL_TRUE); + glDisable(GL_BLEND); } if (bSel) glLineWidth(m_fLineWidth); @@ -2863,15 +2857,8 @@ void Project::RenderBoxes(bool bHilite) // Initialize OpenGL void Project::RenderInitialize() { - unsigned long stipple_pattern[32]; int i; - for (i = 0; i < 32; i += 2) - { - stipple_pattern[i] = 0xAAAAAAAA; - stipple_pattern[i+1] = 0x55555555; - } glLineStipple (1, 65280); - glPolygonStipple ((GLubyte*)&stipple_pattern[0]); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_POLYGON_OFFSET_FILL); diff --git a/linux/dialogs.cpp b/linux/dialogs.cpp index 1de8dd9..aa9a158 100644 --- a/linux/dialogs.cpp +++ b/linux/dialogs.cpp @@ -1528,7 +1528,7 @@ typedef struct { void* data; GtkWidget *det_edges, *det_dither, *det_lighting, *det_smooth; - GtkWidget *det_antialias, *det_linear, *det_screen, *det_fast; + GtkWidget *det_antialias, *det_linear, *det_fast; GtkWidget *det_solid, *det_hidden, *det_background, *det_width; GtkWidget *draw_grid, *draw_gridunits, *draw_axis, *draw_preview; GtkWidget *draw_snapx, *draw_snapy, *draw_snapz, *draw_angle; @@ -1553,7 +1553,6 @@ static void preferencesdlg_ok (GtkWidget *widget, gpointer data) if (GTK_TOGGLE_BUTTON (s->det_smooth)->active) detail |= LC_DET_SMOOTH; if (GTK_TOGGLE_BUTTON (s->det_antialias)->active) detail |= LC_DET_ANTIALIAS; if (GTK_TOGGLE_BUTTON (s->det_linear)->active) detail |= LC_DET_LINEAR; - if (GTK_TOGGLE_BUTTON (s->det_screen)->active) detail |= LC_DET_SCREENDOOR; if (GTK_TOGGLE_BUTTON (s->det_fast)->active) detail |= LC_DET_FAST; if (GTK_TOGGLE_BUTTON (s->det_solid)->active) detail |= LC_DET_BOX_FILL; if (GTK_TOGGLE_BUTTON (s->det_hidden)->active) detail |= LC_DET_HIDDEN_LINE; @@ -1617,7 +1616,6 @@ static void preferencesdlg_default (GtkWidget *widget, gpointer data) if (GTK_TOGGLE_BUTTON (s->det_smooth)->active) detail |= LC_DET_SMOOTH; if (GTK_TOGGLE_BUTTON (s->det_antialias)->active) detail |= LC_DET_ANTIALIAS; if (GTK_TOGGLE_BUTTON (s->det_linear)->active) detail |= LC_DET_LINEAR; - if (GTK_TOGGLE_BUTTON (s->det_screen)->active) detail |= LC_DET_SCREENDOOR; if (GTK_TOGGLE_BUTTON (s->det_fast)->active) detail |= LC_DET_FAST; if (GTK_TOGGLE_BUTTON (s->det_solid)->active) detail |= LC_DET_BOX_FILL; if (GTK_TOGGLE_BUTTON (s->det_hidden)->active) detail |= LC_DET_HIDDEN_LINE; @@ -1757,11 +1755,6 @@ int preferencesdlg_execute(void* param) gtk_table_attach (GTK_TABLE (table), s.det_linear, 0, 1, 5, 6, (GtkAttachOptions)(GTK_EXPAND|GTK_FILL), (GtkAttachOptions)(GTK_EXPAND|GTK_FILL), 0, 0); - s.det_screen = gtk_check_button_new_with_label ("Screen door transparency"); - gtk_widget_show (s.det_screen); - gtk_table_attach (GTK_TABLE (table), s.det_screen, 0, 1, 6, 7, - (GtkAttachOptions)(GTK_EXPAND|GTK_FILL), (GtkAttachOptions)(GTK_EXPAND|GTK_FILL), 0, 0); - s.det_fast = gtk_check_button_new_with_label ("Fast rendering"); gtk_widget_show (s.det_fast); gtk_table_attach (GTK_TABLE (table), s.det_fast, 1, 2, 0, 1, @@ -2108,8 +2101,6 @@ int preferencesdlg_execute(void* param) (opts->nDetail & LC_DET_ANTIALIAS) ? TRUE : FALSE); gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (s.det_linear), (opts->nDetail & LC_DET_LINEAR) ? TRUE : FALSE); - gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (s.det_screen), - (opts->nDetail & LC_DET_SCREENDOOR) ? TRUE : FALSE); gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (s.det_fast), (opts->nDetail & LC_DET_FAST) ? TRUE : FALSE); gtk_toggle_button_set_state (GTK_TOGGLE_BUTTON (s.det_solid), diff --git a/win/Prefpage.cpp b/win/Prefpage.cpp index 9d22e67..ed40138 100644 --- a/win/Prefpage.cpp +++ b/win/Prefpage.cpp @@ -197,7 +197,6 @@ void CPreferencesDetail::SetOptions(DWORD dwDetail, float fLine) m_bFast = (dwDetail & LC_DET_FAST) != 0; m_bHidden = (dwDetail & LC_DET_HIDDEN_LINE) != 0; m_bSolid = (dwDetail & LC_DET_BOX_FILL) != 0; - m_bNoAlpha = (dwDetail & LC_DET_SCREENDOOR) != 0; m_fLineWidth = fLine; } @@ -214,7 +213,6 @@ void CPreferencesDetail::GetOptions(DWORD* dwDetail, float* fLine) if (m_bFast) *dwDetail |= LC_DET_FAST; if (m_bHidden) *dwDetail |= LC_DET_HIDDEN_LINE; if (m_bSolid) *dwDetail |= LC_DET_BOX_FILL; - if (m_bNoAlpha) *dwDetail |= LC_DET_SCREENDOOR; *fLine = m_fLineWidth; } -- cgit v1.2.3