Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
10d60495
Commit
10d60495
authored
15 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
lock drawing per openglWindow; this should fix bug
#1
parent
dc3afd3b
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Fltk/openglWindow.cpp
+8
-11
8 additions, 11 deletions
Fltk/openglWindow.cpp
Fltk/openglWindow.h
+1
-0
1 addition, 0 deletions
Fltk/openglWindow.h
with
9 additions
and
11 deletions
Fltk/openglWindow.cpp
+
8
−
11
View file @
10d60495
...
...
@@ -38,12 +38,11 @@ static void lassoZoom(drawContext *ctx, mousePosition &click1, mousePosition &cl
}
openglWindow
::
openglWindow
(
int
x
,
int
y
,
int
w
,
int
h
,
const
char
*
l
)
:
Fl_Gl_Window
(
x
,
y
,
w
,
h
,
l
)
:
Fl_Gl_Window
(
x
,
y
,
w
,
h
,
l
),
_lock
(
false
),
_selection
(
ENT_NONE
),
_trySelection
(
0
)
{
_ctx
=
new
drawContext
();
for
(
int
i
=
0
;
i
<
3
;
i
++
)
_point
[
i
]
=
0.
;
_selection
=
ENT_NONE
;
_trySelection
=
0
;
for
(
int
i
=
0
;
i
<
4
;
i
++
)
_trySelectionXYWH
[
i
]
=
0
;
_lassoXY
[
0
]
=
_lassoXY
[
1
]
=
0
;
...
...
@@ -110,9 +109,8 @@ void openglWindow::draw()
// some drawing routines can create data (STL triangulations, etc.):
// make sure that we don't fire draw() while we are already drawing
// (e.g. du to an impromptu Fl::check())
static
bool
busy
=
false
;
if
(
busy
)
return
;
busy
=
true
;
if
(
_lock
)
return
;
_lock
=
true
;
Msg
::
Debug
(
"openglWindow::draw()"
);
...
...
@@ -198,7 +196,7 @@ void openglWindow::draw()
drawBorder
();
}
busy
=
false
;
_lock
=
false
;
}
openglWindow
*
openglWindow
::
_lastHandled
=
0
;
...
...
@@ -522,9 +520,8 @@ bool openglWindow::processSelectionBuffer(int type, bool multipleSelection,
// some drawing routines can create data (STL triangulations, etc.):
// make sure that we don't fire redraw while we are already drawing
// (e.g. du to an impromptu Fl::check())
static
bool
busy
=
false
;
if
(
busy
)
return
false
;
busy
=
true
;
if
(
_lock
)
return
false
;
_lock
=
true
;
make_current
();
GLuint
*
selectionBuffer
=
new
GLuint
[
size
];
...
...
@@ -544,7 +541,7 @@ bool openglWindow::processSelectionBuffer(int type, bool multipleSelection,
GLint
numhits
=
glRenderMode
(
GL_RENDER
);
_ctx
->
render_mode
=
drawContext
::
GMSH_RENDER
;
busy
=
false
;
_lock
=
false
;
if
(
!
numhits
){
// no hits
delete
[]
selectionBuffer
;
...
...
This diff is collapsed.
Click to expand it.
Fltk/openglWindow.h
+
1
−
0
View file @
10d60495
...
...
@@ -22,6 +22,7 @@ class openglWindow : public Fl_Gl_Window {
private:
static
openglWindow
*
_lastHandled
;
static
void
_setLastHandled
(
openglWindow
*
);
bool
_lock
;
mousePosition
_click
,
_curr
,
_prev
;
drawContext
*
_ctx
;
double
_point
[
3
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment