Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gl2ps
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dan
gl2ps
Commits
52880c01
Commit
52880c01
authored
21 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
new option: GL2PS_NO_BLENDING
parent
adec8ec0
No related branches found
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
Makefile
+4
-0
4 additions, 0 deletions
Makefile
doc/Makefile
+7
-3
7 additions, 3 deletions
doc/Makefile
doc/gl2ps.tex
+6
-3
6 additions, 3 deletions
doc/gl2ps.tex
gl2ps.c
+8
-8
8 additions, 8 deletions
gl2ps.c
gl2ps.h
+2
-1
2 additions, 1 deletion
gl2ps.h
with
27 additions
and
15 deletions
Makefile
+
4
−
0
View file @
52880c01
...
@@ -20,6 +20,10 @@ clean:
...
@@ -20,6 +20,10 @@ clean:
rm
-f
*
.tex
*
.ps
*
.eps
*
.eps.gz
*
.pdf
*
.o gl2psTest a.out
*
~
rm
-f
*
.tex
*
.ps
*
.eps
*
.eps.gz
*
.pdf
*
.o gl2psTest a.out
*
~
cd
doc
&&
${
MAKE
}
clean
cd
doc
&&
${
MAKE
}
clean
purge
:
rm
-f
`
find
.
-name
"*~"
-o
-name
"*~~"
-o
-name
"
\#
*"
\
-o
-name
".
\#
*"
-o
-name
"gmon.out"
`
mac
:
mac
:
gcc
-Wall
-g
-o
gl2psTest gl2psTest.c gl2ps.c
\
gcc
-Wall
-g
-o
gl2psTest gl2psTest.c gl2ps.c
\
-framework
OpenGL
-framework
GLUT
-framework
Cocoa
-framework
OpenGL
-framework
GLUT
-framework
Cocoa
...
...
This diff is collapsed.
Click to expand it.
doc/Makefile
+
7
−
3
View file @
52880c01
default
:
default
:
gl2ps.ps gl2ps.html gl2ps.pdf
gl2ps.ps
:
gl2ps.tex
rm
-f
gl2ps.toc gl2ps.out gl2ps.aux
latex gl2ps
latex gl2ps
latex gl2ps
latex gl2ps
latex gl2ps
latex gl2ps
dvips gl2ps
-o
dvips gl2ps
-o
make html
gl2ps.pdf
:
gl2ps.tex
rm
-f
gl2ps.toc gl2ps.out gl2ps.aux
rm
-f
gl2ps.toc gl2ps.out gl2ps.aux
pdflatex gl2ps
pdflatex gl2ps
pdflatex gl2ps
pdflatex gl2ps
pdflatex gl2ps
pdflatex gl2ps
html
:
gl2ps.html
:
gl2ps.tex gl2ps.ps
rm
-f
gl2ps.html
rm
-f
gl2ps.html
echo
"<!DOCTYPE HTML PUBLIC
\"
-//W3C//DTD HTML 4.0 Transitional//EN
\"
>"
>>
gl2ps.html
echo
"<!DOCTYPE HTML PUBLIC
\"
-//W3C//DTD HTML 4.0 Transitional//EN
\"
>"
>>
gl2ps.html
echo
"<html>"
>>
gl2ps.html
echo
"<html>"
>>
gl2ps.html
...
...
This diff is collapsed.
Click to expand it.
doc/gl2ps.tex
+
6
−
3
View file @
52880c01
% $Id: gl2ps.tex,v 1.1
69
2004-05-09
0
8:
19:33
geuzaine Exp $
% $Id: gl2ps.tex,v 1.1
70
2004-05-09
1
8:
06:01
geuzaine Exp $
%
%
% GL2PS, an OpenGL to PostScript Printing Library
% GL2PS, an OpenGL to PostScript Printing Library
% Copyright (C) 1999-2004 Christophe Geuzaine <geuz@geuz.org>
% Copyright (C) 1999-2004 Christophe Geuzaine <geuz@geuz.org>
...
@@ -229,6 +229,9 @@ determine the way primitives are handled:
...
@@ -229,6 +229,9 @@ determine the way primitives are handled:
the plotting of smooth shaded primitives but can lead to problems when
the plotting of smooth shaded primitives but can lead to problems when
converting PostScript files into PDF files. See also options
\dd
{
nr
}
,
converting PostScript files into PDF files. See also options
\dd
{
nr
}
,
\dd
{
ng
}
,
\dd
{
nb
}
below.
\dd
{
ng
}
,
\dd
{
nb
}
below.
\item
[\dd{GL2PS_NO_BLENDING}]
Blending (transparency) is disabled
alltogether (regardless of the current
\dd
{
GL
_
BLEND
}
or
\dd
{
GL2PS
_
BLEND
}
status).
\item
[\dd{GL2PS_OCCLUSION_CULL}]
All the hidden polygons are removed from
\item
[\dd{GL2PS_OCCLUSION_CULL}]
All the hidden polygons are removed from
the output, thus substantially reducing the size of the output file.
the output, thus substantially reducing the size of the output file.
\item
[\dd{GL2PS_USE_CURRENT_VIEWPORT}]
The current OpenGL viewport is used
\item
[\dd{GL2PS_USE_CURRENT_VIEWPORT}]
The current OpenGL viewport is used
...
@@ -540,8 +543,8 @@ glGetIntegerv(GL_VIEWPORT, viewport);
...
@@ -540,8 +543,8 @@ glGetIntegerv(GL_VIEWPORT, viewport);
while( state == GL2PS
_
OVERFLOW )
{
while( state == GL2PS
_
OVERFLOW )
{
buffsize += 1024*1024;
buffsize += 1024*1024;
gl2psBeginPage ( "MyTitle", "MySoftware", viewport,
gl2psBeginPage ( "MyTitle", "MySoftware", viewport,
GL2PS
_
EPS, GL2PS
_
BSP
_
SORT,
GL2PS
_
EPS, GL2PS
_
BSP
_
SORT,
GL2PS
_
SILENT |
GL2PS
_
SIMPLE
_
LINE
_
OFFSET | GL2PS
_
SILENT
|
GL2PS
_
SIMPLE
_
LINE
_
OFFSET | GL2PS
_
NO
_
BLENDING
|
GL2PS
_
OCCLUSION
_
CULL | GL2PS
_
BEST
_
ROOT,
GL2PS
_
OCCLUSION
_
CULL | GL2PS
_
BEST
_
ROOT,
GL
_
RGBA, 0, NULL, 0, 0, 0, buffsize,
GL
_
RGBA, 0, NULL, 0, 0, 0, buffsize,
fp, NULL );
fp, NULL );
...
...
This diff is collapsed.
Click to expand it.
gl2ps.c
+
8
−
8
View file @
52880c01
/* $Id: gl2ps.c,v 1.17
2
2004-05-09 1
6:35:27
geuzaine Exp $ */
/* $Id: gl2ps.c,v 1.17
3
2004-05-09 1
8:06:01
geuzaine Exp $ */
/*
/*
* GL2PS, an OpenGL to PostScript Printing Library
* GL2PS, an OpenGL to PostScript Printing Library
* Copyright (C) 1999-2004 Christophe Geuzaine <geuz@geuz.org>
* Copyright (C) 1999-2004 Christophe Geuzaine <geuz@geuz.org>
...
@@ -687,7 +687,7 @@ static void gl2psAdaptVertexForBlending(GL2PSvertex *v)
...
@@ -687,7 +687,7 @@ static void gl2psAdaptVertexForBlending(GL2PSvertex *v)
if
(
!
v
||
!
gl2ps
)
if
(
!
v
||
!
gl2ps
)
return
;
return
;
if
(
GL_FALSE
==
gl2ps
->
blending
){
if
(
gl2ps
->
options
&
GL2PS_NO_BLENDING
||
!
gl2ps
->
blending
){
v
->
rgba
[
3
]
=
1
.
0
F
;
v
->
rgba
[
3
]
=
1
.
0
F
;
return
;
return
;
}
}
...
@@ -4399,12 +4399,7 @@ GL2PSDLL_API GLint gl2psDrawPixels(GLsizei width, GLsizei height,
...
@@ -4399,12 +4399,7 @@ GL2PSDLL_API GLint gl2psDrawPixels(GLsizei width, GLsizei height,
switch
(
format
){
switch
(
format
){
case
GL_RGBA
:
case
GL_RGBA
:
if
(
GL_TRUE
==
glIsEnabled
(
GL_BLEND
)){
if
(
gl2ps
->
options
&
GL2PS_NO_BLENDING
||
!
gl2ps
->
blending
){
size
=
height
*
width
*
4
;
prim
->
data
.
image
->
pixels
=
(
GLfloat
*
)
gl2psMalloc
(
size
*
sizeof
(
GLfloat
));
memcpy
(
prim
->
data
.
image
->
pixels
,
pixels
,
size
*
sizeof
(
GLfloat
));
}
else
{
/* special case: blending turned off */
/* special case: blending turned off */
prim
->
data
.
image
->
format
=
GL_RGB
;
prim
->
data
.
image
->
format
=
GL_RGB
;
size
=
height
*
width
*
3
;
size
=
height
*
width
*
3
;
...
@@ -4416,6 +4411,11 @@ GL2PSDLL_API GLint gl2psDrawPixels(GLsizei width, GLsizei height,
...
@@ -4416,6 +4411,11 @@ GL2PSDLL_API GLint gl2psDrawPixels(GLsizei width, GLsizei height,
++
piv
;
++
piv
;
}
}
}
}
else
{
size
=
height
*
width
*
4
;
prim
->
data
.
image
->
pixels
=
(
GLfloat
*
)
gl2psMalloc
(
size
*
sizeof
(
GLfloat
));
memcpy
(
prim
->
data
.
image
->
pixels
,
pixels
,
size
*
sizeof
(
GLfloat
));
}
break
;
break
;
case
GL_RGB
:
case
GL_RGB
:
default:
default:
...
...
This diff is collapsed.
Click to expand it.
gl2ps.h
+
2
−
1
View file @
52880c01
/* $Id: gl2ps.h,v 1.8
6
2004-0
3-17
1
7
:0
2:39
geuzaine Exp $ */
/* $Id: gl2ps.h,v 1.8
7
2004-0
5-09
1
8
:0
6:01
geuzaine Exp $ */
/*
/*
* GL2PS, an OpenGL to PostScript Printing Library
* GL2PS, an OpenGL to PostScript Printing Library
* Copyright (C) 1999-2004 Christophe Geuzaine <geuz@geuz.org>
* Copyright (C) 1999-2004 Christophe Geuzaine <geuz@geuz.org>
...
@@ -123,6 +123,7 @@
...
@@ -123,6 +123,7 @@
#define GL2PS_NO_PIXMAP (1<<8)
#define GL2PS_NO_PIXMAP (1<<8)
#define GL2PS_USE_CURRENT_VIEWPORT (1<<9)
#define GL2PS_USE_CURRENT_VIEWPORT (1<<9)
#define GL2PS_COMPRESS (1<<10)
#define GL2PS_COMPRESS (1<<10)
#define GL2PS_NO_BLENDING (1<<11)
/* Arguments for gl2psEnable/gl2psDisable */
/* Arguments for gl2psEnable/gl2psDisable */
...
...
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