integrated latest patches by Edgar

metadata
Wenzel Jakob 2013-08-02 17:36:28 +02:00
commit e990c3d7f8
3 changed files with 46 additions and 35 deletions

View File

@ -1,2 +1,7 @@
all: all:
./gendoc.py ./gendoc.py
clean:
$(RM) main.pdf
$(RM) plugins_generated.tex
$(RM) *.aux main.bbl main.blg main.log main.out main.toc

View File

@ -1,6 +1,6 @@
#! /usr/bin/python #!/usr/bin/env python
# #
# This script walks through all plugin files and # This script walks through all plugin files and
# extracts documentation that should go into the # extracts documentation that should go into the
# reference manual # reference manual
@ -61,34 +61,40 @@ def process(path, target):
for entry in ordering: for entry in ordering:
extract(target, entry[1]) extract(target, entry[1])
os.chdir(os.path.dirname(__file__)) def process_src(target, src_subdir, section=None):
f = open('plugins_generated.tex', 'w') if section is None:
f.write('\input{section_shapes}\n') section = "section_" + src_subdir
process('../src/shapes', f) target.write('\input{{{0}}}\n'.format(section))
f.write('\input{section_bsdf}\n') process('../src/{0}'.format(src_subdir), target)
process('../src/bsdfs', f)
f.write('\input{section_textures}\n') def texify(texfile):
process('../src/textures', f) from subprocess import Popen, PIPE, check_call
f.write('\input{section_subsurface}\n') version = Popen(["pdflatex", "-version"], stdout=PIPE).communicate()[0]
process('../src/subsurface', f) # Call decode() to convert from bytes to string, required in Python 3
f.write('\input{section_media}\n') if re.match('.*MiKTeX.*', version.decode()):
process('../src/medium', f) # MiKTeX's "texify" calls latex/bibtex in tandem automatically
f.write('\input{section_phase}\n') print("Running texify on {0}...".format(texfile))
process('../src/phase', f) check_call(['texify', '-pq', texfile])
f.write('\input{section_volumes}\n') else:
process('../src/volume', f) check_call(['pdflatex', texfile])
f.write('\input{section_emitters}\n') check_call(['bibtex', texfile.replace('.tex', '.aux')])
process('../src/emitters', f) check_call(['pdflatex', texfile])
f.write('\input{section_sensors}\n') check_call(['pdflatex', texfile])
process('../src/sensors', f)
f.write('\input{section_integrators}\n') os.chdir(os.path.dirname(os.path.abspath(__file__)))
process('../src/integrators', f) with open('plugins_generated.tex', 'w') as f:
f.write('\input{section_samplers}\n') process_src(f, 'shapes')
process('../src/samplers', f) process_src(f, 'bsdfs', 'section_bsdf')
f.write('\input{section_films}\n') process_src(f, 'textures')
process('../src/films', f) process_src(f, 'subsurface')
f.write('\input{section_rfilters}\n') process_src(f, 'medium', 'section_media')
f.close() process_src(f, 'phase')
os.system('bibtex main.aux') process_src(f, 'volume', 'section_volumes')
os.system('pdflatex main.tex') process_src(f, 'emitters')
#os.system('pdflatex main.tex | grep -i warning | grep -v "Package \(typearea\|hyperref\)"') process_src(f, 'sensors')
process_src(f, 'integrators')
process_src(f, 'samplers')
process_src(f, 'films')
process_src(f, 'rfilters')
texify('main.tex')

View File

@ -157,7 +157,7 @@ void GLRenderer::init(Device *device, Renderer *other) {
Log(m_warnLogLevel, "Capabilities: Vertex buffer objects are NOT supported!"); Log(m_warnLogLevel, "Capabilities: Vertex buffer objects are NOT supported!");
} }
if (glewIsSupported("GL_EXT_geometry_shader4")) { if (glewIsSupported("GL_EXT_geometry_shader4") && glewIsSupported("GL_EXT_gpu_shader4")) {
m_capabilities->setSupported( m_capabilities->setSupported(
RendererCapabilities::EGeometryShaders, true); RendererCapabilities::EGeometryShaders, true);
Log(m_logLevel, "Capabilities: Geometry shaders are supported."); Log(m_logLevel, "Capabilities: Geometry shaders are supported.");