Beispiel #1
0
	void Render(const PangoCairoLayout& layout)
	{
		_bitmap.Set(GLint(layout.Use()));
		_log_coords.Set(layout._log_coords);
		_tex_coords.Set(layout._tex_coords);
		_gl.DrawArrays(PrimitiveType::Points, 0, 1);
	}
Beispiel #2
0
 virtual float next1D(SampleBlock block) override final
 {
     if (_blockOffset[block] > blockMaximum(block))
         FAIL("_blockOffset[%s] (%d) > %d", block, _blockOffset[block], blockMaximum(block));
     int dimension = _pathOffset + block + _blockOffset[block];
     _blockOffset[block]++;
     if (dimension >= 1024)
         return _supplementalSampler.next1D();
     return BitManip::normalizedUint(sobol::sample(permutedIndex(), dimension, _scramble));
 }
Beispiel #3
0
 virtual Vec2f next2D() override final
 {
     float a = _sampler.next1D();
     float b = _sampler.next1D();
     return Vec2f(a, b);
 }
Beispiel #4
0
 virtual float next1D() override final
 {
     return _sampler.next1D();
 }
Beispiel #5
0
 virtual int nextDiscrete(int numChoices) override final
 {
     return int(_sampler.next1D()*numChoices);
 }
Beispiel #6
0
 virtual bool nextBoolean(float pTrue) override final
 {
     return _sampler.next1D() < pTrue;
 }
Beispiel #7
0
 virtual void loadState(InputStreamHandle &in) override
 {
     _sampler.loadState(in);
 }
Beispiel #8
0
 virtual void saveState(OutputStreamHandle &out) override
 {
     _sampler.saveState(out);
 }
Beispiel #9
0
 virtual int nextDiscrete(SampleBlock /*block*/, int numChoices) override final
 {
     return int(_supplementalSampler.next1D()*numChoices);
 }
Beispiel #10
0
 virtual bool nextBoolean(SampleBlock /*block*/, float pTrue) override final
 {
     return _supplementalSampler.next1D() < pTrue;
 }
Beispiel #11
0
 virtual void loadState(InputStreamHandle &in)  override final
 {
     FileUtils::streamRead(in, _seed);
     _supplementalSampler.loadState(in);
 }
Beispiel #12
0
 virtual void saveState(OutputStreamHandle &out) override final
 {
     FileUtils::streamWrite(out, _seed);
     _supplementalSampler.saveState(out);
 }