Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatl committed Oct 31, 2017
1 parent 781a328 commit 492f28a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 14 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ __pycache__/
# C extensions
*.so

# Images
*.jpg
*.png

# Distribution / packaging
.Python
build/
Expand Down
15 changes: 1 addition & 14 deletions meshrender/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from OpenGL.GL import *
from OpenGL.GL import shaders
from OpenGL.arrays import *
from OpenGL.GLUT import *

from .constants import MAX_N_LIGHTS, Z_NEAR, Z_FAR
from .light import AmbientLight, PointLight, DirectionalLight
Expand Down Expand Up @@ -39,16 +38,7 @@ def __init__(self, scene):
major_version=3,
minor_version=2
)

self._window = pyglet.window.Window(config=conf, width=1, height=1)
#self._window.set_visible(False)
#glutInit()
#glutInitDisplayMode(GLUT_RGBA)
#glutInitWindowSize(1,1)
#glutInitContextVersion(3,3)
#glutInitContextProfile(GLUT_CORE_PROFILE)
#self._window = glutCreateWindow('render')
#glutHideWindow()
self._window = pyglet.window.Window(config=conf, visible=False, resizable=False, width=1, height=1)

# Bind the frame buffer for offscreen rendering
self._bind_frame_buffer()
Expand Down Expand Up @@ -118,7 +108,6 @@ def close(self):
-------
Once this has been called, the OpenGLRenderer object should be discarded.
"""
#glutDestroyWindow(self._window)
self._window.close()

def _bind_frame_buffer(self):
Expand Down Expand Up @@ -224,8 +213,6 @@ def _load_meshes(self):
GL_STATIC_DRAW)

# Unbind all buffers
glDisableVertexAttribArray(0)
glDisableVertexAttribArray(1)
glBindVertexArray(0)
glBindBuffer(GL_ARRAY_BUFFER, 0)
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0)
Expand Down
Binary file removed test/color.jpg
Binary file not shown.
Binary file removed test/depth.jpg
Binary file not shown.

0 comments on commit 492f28a

Please sign in to comment.