Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
c2557e72
Commit
c2557e72
authored
Mar 31, 2014
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve lighting settings for heavy model
parent
f6a4c42c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
panel.py
printrun/gl/panel.py
+6
-9
No files found.
printrun/gl/panel.py
View file @
c2557e72
...
@@ -161,23 +161,20 @@ class wxGLPanel(wx.Panel):
...
@@ -161,23 +161,20 @@ class wxGLPanel(wx.Panel):
def
setup_lights
(
self
):
def
setup_lights
(
self
):
glEnable
(
GL_LIGHTING
)
glEnable
(
GL_LIGHTING
)
glEnable
(
GL_LIGHT0
)
glDisable
(
GL_LIGHT0
)
glLightModeli
(
GL_LIGHT_MODEL_LOCAL_VIEWER
,
1
)
glLightfv
(
GL_LIGHT0
,
GL_AMBIENT
,
vec
(
0.4
,
0.4
,
0.4
,
1.0
))
glLightfv
(
GL_LIGHT0
,
GL_AMBIENT
,
vec
(
0.2
,
0.2
,
0.2
,
1.0
))
glLightfv
(
GL_LIGHT0
,
GL_SPECULAR
,
vec
(
0
,
0
,
0
,
0
))
glLightfv
(
GL_LIGHT0
,
GL_SPECULAR
,
vec
(
0
,
0
,
0
,
0
))
glLightfv
(
GL_LIGHT0
,
GL_DIFFUSE
,
vec
(
0
,
0
,
0
,
0
))
glLightfv
(
GL_LIGHT0
,
GL_DIFFUSE
,
vec
(
0
,
0
,
0
,
0
))
glEnable
(
GL_LIGHT1
)
glEnable
(
GL_LIGHT1
)
glLightfv
(
GL_LIGHT1
,
GL_AMBIENT
,
vec
(
0
,
0
,
0
,
1.0
))
glLightfv
(
GL_LIGHT1
,
GL_AMBIENT
,
vec
(
0
,
0
,
0
,
1.0
))
glLightfv
(
GL_LIGHT1
,
GL_SPECULAR
,
vec
(
1.
,
1.
,
1.
,
1.
))
glLightfv
(
GL_LIGHT1
,
GL_SPECULAR
,
vec
(
0.2
,
0.2
,
0.2
,
1.0
))
glLightfv
(
GL_LIGHT1
,
GL_DIFFUSE
,
vec
(
0.72
,
0.72
,
0.72
,
1
))
glLightfv
(
GL_LIGHT1
,
GL_POSITION
,
vec
(
1
,
2
,
3
,
0
))
glLightfv
(
GL_LIGHT1
,
GL_POSITION
,
vec
(
1
,
2
,
3
,
0
))
glLightfv
(
GL_LIGHT1
,
GL_SPOT_EXPONENT
,
vec
(
1.
,
1.
,
1.
,
1.
))
glEnable
(
GL_LIGHT2
)
glEnable
(
GL_LIGHT2
)
glLightfv
(
GL_LIGHT2
,
GL_AMBIENT
,
vec
(
0
,
0
,
0
,
1.0
))
glLightfv
(
GL_LIGHT2
,
GL_AMBIENT
,
vec
(
0
,
0
,
0
,
1.0
))
glLightfv
(
GL_LIGHT2
,
GL_SPECULAR
,
vec
(
1.
,
1.
,
1.
,
1.
))
glLightfv
(
GL_LIGHT2
,
GL_SPECULAR
,
vec
(
0.2
,
0.2
,
0.2
,
1.0
))
glLightfv
(
GL_LIGHT2
,
GL_DIFFUSE
,
vec
(
0.8
,
0.8
,
0.8
,
1
))
glLightfv
(
GL_LIGHT2
,
GL_DIFFUSE
,
vec
(
0.8
,
0.8
,
0.8
,
1
))
glLightfv
(
GL_LIGHT2
,
GL_POSITION
,
vec
(
-
1
,
-
1
,
2
,
0
))
glLightfv
(
GL_LIGHT2
,
GL_POSITION
,
vec
(
-
1
,
-
1
,
3
,
0
))
glEnable
(
GL_
RESCALE_NORMAL
)
glEnable
(
GL_
NORMALIZE
)
glShadeModel
(
GL_SMOOTH
)
glShadeModel
(
GL_SMOOTH
)
def
reset_mview
(
self
,
factor
):
def
reset_mview
(
self
,
factor
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment