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
Analyze
Contributor 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
gmsh
gmsh
Commits
ba2d3883
Commit
ba2d3883
authored
22 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
small cleanup
parent
aeb76158
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Graphics/Draw.cpp
+4
-6
4 additions, 6 deletions
Graphics/Draw.cpp
with
4 additions
and
6 deletions
Graphics/Draw.cpp
+
4
−
6
View file @
ba2d3883
// $Id: Draw.cpp,v 1.4
0
2003-03-24
19:47:27
geuzaine Exp $
// $Id: Draw.cpp,v 1.4
1
2003-03-24
20:44:09
geuzaine Exp $
//
//
// Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -74,7 +74,7 @@ void Draw2d(void)
...
@@ -74,7 +74,7 @@ void Draw2d(void)
glMatrixMode
(
GL_PROJECTION
);
glMatrixMode
(
GL_PROJECTION
);
glLoadIdentity
();
glLoadIdentity
();
/
*
to draw directly in screen coords
*/
/
/
to draw directly in screen coords
glOrtho
((
double
)
CTX
.
viewport
[
0
],
glOrtho
((
double
)
CTX
.
viewport
[
0
],
(
double
)
CTX
.
viewport
[
2
],
(
double
)
CTX
.
viewport
[
2
],
(
double
)
CTX
.
viewport
[
1
],
(
double
)
CTX
.
viewport
[
3
],
-
1.
,
1.
);
(
double
)
CTX
.
viewport
[
1
],
(
double
)
CTX
.
viewport
[
3
],
-
1.
,
1.
);
...
@@ -142,7 +142,7 @@ void Orthogonalize(int x, int y)
...
@@ -142,7 +142,7 @@ void Orthogonalize(int x, int y)
if
(
CTX
.
ortho
)
{
if
(
CTX
.
ortho
)
{
// Warning: for large s (i.e. big zooms) the PolygonOffset will
// Warning: for large s (i.e. big zooms) the PolygonOffset will
// degrade...
// degrade...
double
clip
=
CTX
.
s
[
0
]
*
10
;
double
clip
=
CTX
.
s
[
2
]
*
10
;
glOrtho
(
CTX
.
vxmin
,
CTX
.
vxmax
,
CTX
.
vymin
,
CTX
.
vymax
,
0
,
clip
*
CTX
.
lc
);
glOrtho
(
CTX
.
vxmin
,
CTX
.
vxmax
,
CTX
.
vymin
,
CTX
.
vymax
,
0
,
clip
*
CTX
.
lc
);
glMatrixMode
(
GL_MODELVIEW
);
glMatrixMode
(
GL_MODELVIEW
);
glLoadIdentity
();
glLoadIdentity
();
...
@@ -176,7 +176,7 @@ void InitRenderModel(void)
...
@@ -176,7 +176,7 @@ void InitRenderModel(void)
glColorMaterial
(
GL_FRONT_AND_BACK
,
GL_AMBIENT_AND_DIFFUSE
);
glColorMaterial
(
GL_FRONT_AND_BACK
,
GL_AMBIENT_AND_DIFFUSE
);
glMaterialf
(
GL_FRONT_AND_BACK
,
GL_SHININESS
,
40.
);
glMaterialf
(
GL_FRONT_AND_BACK
,
GL_SHININESS
,
40.
);
glLightModelf
(
GL_LIGHT_MODEL_TWO_SIDE
,
GL_TRUE
);
glLightModelf
(
GL_LIGHT_MODEL_TWO_SIDE
,
GL_TRUE
);
/
*
let's add some shininess to all these automatically created materials
*/
/
/
let's add some shininess to all these automatically created materials
specular
[
0
]
=
CTX
.
shine
;
specular
[
0
]
=
CTX
.
shine
;
specular
[
1
]
=
CTX
.
shine
;
specular
[
1
]
=
CTX
.
shine
;
specular
[
2
]
=
CTX
.
shine
;
specular
[
2
]
=
CTX
.
shine
;
...
@@ -302,7 +302,6 @@ void Filter_SelectionBuffer(int n, GLuint * typ, GLuint * ient,
...
@@ -302,7 +302,6 @@ void Filter_SelectionBuffer(int n, GLuint * typ, GLuint * ient,
}
}
}
}
// Zoom
// FIXME: this is notoriously wrong :-)
// FIXME: this is notoriously wrong :-)
void
myZoom
(
GLdouble
X1
,
GLdouble
X2
,
GLdouble
Y1
,
GLdouble
Y2
,
void
myZoom
(
GLdouble
X1
,
GLdouble
X2
,
GLdouble
Y1
,
GLdouble
Y2
,
...
@@ -314,7 +313,6 @@ void myZoom(GLdouble X1, GLdouble X2, GLdouble Y1, GLdouble Y2,
...
@@ -314,7 +313,6 @@ void myZoom(GLdouble X1, GLdouble X2, GLdouble Y1, GLdouble Y2,
yscale1
=
CTX
.
s
[
1
];
yscale1
=
CTX
.
s
[
1
];
set_s
(
0
,
CTX
.
s
[
0
]
*
(
CTX
.
vxmax
-
CTX
.
vxmin
)
/
(
X2
-
X1
));
set_s
(
0
,
CTX
.
s
[
0
]
*
(
CTX
.
vxmax
-
CTX
.
vxmin
)
/
(
X2
-
X1
));
set_s
(
1
,
CTX
.
s
[
1
]
*
(
CTX
.
vymax
-
CTX
.
vymin
)
/
(
Y1
-
Y2
));
set_s
(
1
,
CTX
.
s
[
1
]
*
(
CTX
.
vymax
-
CTX
.
vymin
)
/
(
Y1
-
Y2
));
/* bif bif bif */
set_s
(
2
,
0.5
*
(
CTX
.
s
[
0
]
+
CTX
.
s
[
1
]));
set_s
(
2
,
0.5
*
(
CTX
.
s
[
0
]
+
CTX
.
s
[
1
]));
set_t
(
0
,
set_t
(
0
,
CTX
.
t
[
0
]
*
(
xscale1
/
CTX
.
s
[
0
])
-
((
Xc1
+
Xc2
)
/
2.
)
*
(
1.
-
CTX
.
t
[
0
]
*
(
xscale1
/
CTX
.
s
[
0
])
-
((
Xc1
+
Xc2
)
/
2.
)
*
(
1.
-
...
...
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