ipdf/code.git
9 years agoStill-broken quadtree shenanigans!
David Gow [Tue, 12 Aug 2014 14:07:56 +0000 (22:07 +0800)]
Still-broken quadtree shenanigans!

Quadtrees are, therefore, still disabled by default.

9 years agoYes, we do need to delete m_op somehow.
David Gow [Thu, 7 Aug 2014 14:45:02 +0000 (22:45 +0800)]
Yes, we do need to delete m_op somehow.

9 years ago"fixed" Rational::ToDouble().
David Gow [Thu, 7 Aug 2014 14:30:37 +0000 (22:30 +0800)]
"fixed" Rational::ToDouble().

Previously if the numerator or denominator was > the range of a double,
Rational.ToDouble() would return NaN. We now check for this case, and
discard precision accordingly.

9 years agoFix compiling with Arbint/Gmpint rationals
David Gow [Thu, 7 Aug 2014 14:05:03 +0000 (22:05 +0800)]
Fix compiling with Arbint/Gmpint rationals

9 years agoFix SVG rendering of glyphs.svg
David Gow [Thu, 7 Aug 2014 13:40:33 +0000 (21:40 +0800)]
Fix SVG rendering of glyphs.svg

- Convert Quadratics -> Cubics properly
- Correctly handle relative movements in LineTo.

9 years agoThe power of truetype font rendering!
David Gow [Thu, 7 Aug 2014 13:34:33 +0000 (21:34 +0800)]
The power of truetype font rendering!

9 years agoMerge branch 'master' of git.ucc.asn.au:/ipdf/code
Sam Moore [Thu, 7 Aug 2014 02:46:46 +0000 (10:46 +0800)]
Merge branch 'master' of git.ucc.asn.au:/ipdf/code

Dammit I hate merges

9 years agoCubic Beziers and more SVG stuff
Sam Moore [Thu, 7 Aug 2014 02:42:02 +0000 (10:42 +0800)]
Cubic Beziers and more SVG stuff

Cubic Beziers!
Actually transform the coordinates properly!

Sort of maybe kind of render shape.svg correctly*

* Shading and stroke width will be available in the premium edition, order today for $99.99

9 years agoMerge branch 'master' of git.ucc.asn.au:ipdf/code
David Gow [Wed, 6 Aug 2014 16:09:37 +0000 (00:09 +0800)]
Merge branch 'master' of git.ucc.asn.au:ipdf/code

9 years agoSome QuadTree fixes.
David Gow [Wed, 6 Aug 2014 16:09:23 +0000 (00:09 +0800)]
Some QuadTree fixes.

9 years agoMerge branch 'master' of git.ucc.asn.au:/ipdf/code
Sam Moore [Wed, 6 Aug 2014 10:14:14 +0000 (18:14 +0800)]
Merge branch 'master' of git.ucc.asn.au:/ipdf/code

At least I set my time correctly this time. ho ho.

9 years agoThe view size is not 640x480 and hasn't been for a long time
Sam Moore [Wed, 6 Aug 2014 10:11:40 +0000 (18:11 +0800)]
The view size is not 640x480 and hasn't been for a long time

So taking that plus some other stuff into account, the CPU renderer
for Beziers now uses the same number of lines as the GPU renderer!

Except when the bezier is a straight line. Then it just uses 1.

They still look slightly different. There is probably something wrong
with my Bresenham implementation.

9 years agoQuadTree should segfault less frequently.
David Gow [Wed, 6 Aug 2014 03:56:03 +0000 (11:56 +0800)]
QuadTree should segfault less frequently.

Still gives incorrect results w/ GPU transform.

9 years agoFix Bézier CPU rendering.
David Gow [Tue, 5 Aug 2014 15:10:28 +0000 (23:10 +0800)]
Fix Bézier CPU rendering.

9 years agoFix beziers on GPU.
David Gow [Tue, 5 Aug 2014 14:54:25 +0000 (22:54 +0800)]
Fix beziers on GPU.

We can now render an SVG correctly(ish)! Woah!

9 years agoFix a huge bunch of memory corruption bugs in GL
David Gow [Tue, 5 Aug 2014 14:19:26 +0000 (22:19 +0800)]
Fix a huge bunch of memory corruption bugs in GL

It now is equally broken across Intel and nVidia.

The brokenness can be very pretty, though.

9 years agoDon't try to unmap buffers which aren't mapped.
David Gow [Tue, 5 Aug 2014 13:48:59 +0000 (21:48 +0800)]
Don't try to unmap buffers which aren't mapped.

Fixes the GL_INAVLID_OPERATION that snuck in: this would occur
when calling GraphicsBuffer::Resize() on an unmapped, non-invalidated buffer.

9 years agoPerpetrate SVG on the codebase
Sam Moore [Tue, 5 Aug 2014 18:46:41 +0000 (02:46 +0800)]
Perpetrate SVG on the codebase

Well, parts of it.
We can have black and white SVG only.
I think it's currently buggy.

I figure we should probably be able to actually parse a document format.
And SVG, despite being XML, seems like the least terrible.

Using pugixml for XML parsing and horrible string tokenising because
SVG is not really a DOM language because of the "d" attribute (-_-)

Did I mention it was the least terrible?

Also, there seem to be lots and lots of bugs with things,
including Quadtree rendering of Beziers and actually just  GPU rendering of more than one
Bezier in general.

Also I compiled atril without zoom limits but it crashes
due to things not related to precision. So we're beating atril I guess. Woo!

9 years agoCS Lab machines have met their nemesis
Sam Moore [Mon, 4 Aug 2014 07:52:58 +0000 (15:52 +0800)]
CS Lab machines have met their nemesis

The ongoing adventures of overcomplicated makefile land.

David is dictating this commit message by the way,

PS:
 They are i686 and only g++0x from before 0x

Tune in next week for another exciting episode (or installment, you, the
viewer, decide!) of randomly ifdefing things out! Will our heroes
successfully defeat the 32 bit long? Or will they perish in an integer
overflow?

(I think the project is beginning to affect our minds)

9 years agoApparently things were done
Sam Moore [Mon, 4 Aug 2014 11:16:58 +0000 (19:16 +0800)]
Apparently things were done

9 years agoRemove terrible "pow()" functions
Sam Moore [Sun, 3 Aug 2014 13:55:56 +0000 (21:55 +0800)]
Remove terrible "pow()" functions

There are many reasons why that was terrible and it finally all came apart
in a segfaultastic display.

We now have Power which only works for integer powers
But we only need those at the moment anyway.

9 years agoVFPU derpage fixed
Sam Moore [Sun, 3 Aug 2014 12:50:10 +0000 (20:50 +0800)]
VFPU derpage fixed

In my defence, hex and binary are only 14 digits apart

9 years agoAdd VFPU::Float (but it is broken)
Sam Moore [Tue, 29 Jul 2014 14:36:53 +0000 (22:36 +0800)]
Add VFPU::Float (but it is broken)

Fails every single realops test.
Also it's stuck at 32 bits still.

9 years agoUse "Real" in CPU renderer for filled circles
Sam Moore [Tue, 29 Jul 2014 14:12:16 +0000 (22:12 +0800)]
Use "Real" in CPU renderer for filled circles

9 years agoGet it compiling on Cabellera (g++0x not c++11)
Sam Moore [Fri, 25 Jul 2014 05:03:15 +0000 (13:03 +0800)]
Get it compiling on Cabellera (g++0x not c++11)

... But at what cost?

9 years agoMore QuadTree code.
David Gow [Wed, 23 Jul 2014 04:50:48 +0000 (12:50 +0800)]
More QuadTree code.

9 years agoFix some quadtree rendering bugs.
David Gow [Wed, 16 Jul 2014 07:40:29 +0000 (15:40 +0800)]
Fix some quadtree rendering bugs.

9 years agoQuadtree Rendering for CPU transorm+render
David Gow [Wed, 16 Jul 2014 06:48:11 +0000 (14:48 +0800)]
Quadtree Rendering for CPU transorm+render

9 years agoQuadTree Rendering with GPU coord transform.
David Gow [Tue, 15 Jul 2014 13:26:52 +0000 (21:26 +0800)]
QuadTree Rendering with GPU coord transform.

9 years agoWe should compile even if REAL is not 5
David Gow [Tue, 15 Jul 2014 13:10:05 +0000 (21:10 +0800)]
We should compile even if REAL is not 5

9 years agoActually add the Quadtree coordinate code
David Gow [Mon, 14 Jul 2014 15:12:56 +0000 (23:12 +0800)]
Actually add the Quadtree coordinate code

9 years agoQuadtree transforms
David Gow [Mon, 14 Jul 2014 01:24:00 +0000 (09:24 +0800)]
Quadtree transforms

9 years agoMerge branch 'master' of git.ucc.asn.au:ipdf/code
David Gow [Mon, 7 Jul 2014 16:02:11 +0000 (00:02 +0800)]
Merge branch 'master' of git.ucc.asn.au:ipdf/code

9 years agoQuadtrees! (Almost)
David Gow [Mon, 7 Jul 2014 16:01:55 +0000 (00:01 +0800)]
Quadtrees! (Almost)

9 years agoChange Rational<Arbint> -> Rational<Gmpint>
Sam Moore [Mon, 7 Jul 2014 08:46:12 +0000 (16:46 +0800)]
Change Rational<Arbint> -> Rational<Gmpint>

Works better (not surprising). Can change back @real.h:52

9 years agoNow with GNU MultiPrecision (GMP) integers
Sam Moore [Mon, 7 Jul 2014 08:19:50 +0000 (16:19 +0800)]
Now with GNU MultiPrecision (GMP) integers

gmpint.h is (in theory) mostly inline and shouldn't add much overhead
and was simpler than trying to understand the C++ "binding".

The Str() function is kind of terrible but that can't be helped.

Also fixed bug in realops tester (even the testers have bugs...)
And removed asm tester because the asm function is gone.

The bezier testers now don't compile, I don't think we need them anymore.

9 years agoMerge branch 'master' of git.ucc.asn.au:ipdf/code
David Gow [Mon, 7 Jul 2014 05:15:59 +0000 (13:15 +0800)]
Merge branch 'master' of git.ucc.asn.au:ipdf/code

9 years agoZooming is now sligtly less slow.
David Gow [Mon, 7 Jul 2014 05:14:23 +0000 (13:14 +0800)]
Zooming is now sligtly less slow.

9 years agoC++11 lambdas - are they really worth it?
Sam Moore [Mon, 7 Jul 2014 03:48:36 +0000 (11:48 +0800)]
C++11 lambdas - are they really worth it?

9 years agoDivide some numbers by 5.
David Gow [Mon, 7 Jul 2014 03:10:59 +0000 (11:10 +0800)]
Divide some numbers by 5.

9 years agoFix GPU rendering a bit. Will probably break >1 ob
David Gow [Mon, 7 Jul 2014 02:57:20 +0000 (10:57 +0800)]
Fix GPU rendering a bit. Will probably break >1 ob

9 years agoMerge branch 'master' of git.ucc.asn.au:/ipdf/code
Sam Moore [Mon, 7 Jul 2014 01:53:15 +0000 (09:53 +0800)]
Merge branch 'master' of git.ucc.asn.au:/ipdf/code

We both fixed bugs.

9 years agoClear the carry/borrow flag before add/sub
David Gow [Mon, 7 Jul 2014 01:49:48 +0000 (09:49 +0800)]
Clear the carry/borrow flag before add/sub

9 years agoArbint subtraction/addition deal with borrow/carry correctly, maybe
Sam Moore [Mon, 7 Jul 2014 01:49:20 +0000 (09:49 +0800)]
Arbint subtraction/addition deal with borrow/carry correctly, maybe

Eventually they will be right.

This still doesn't fix the wierd bezier bug or the growing digits really fast (exponential?). I suspect the former is related
to pow(Rational<Arbint>, Rational<Arbint>) and the latter probably makes sense if you do the theory (considering how fast Rational<int64_t> overflowed).

9 years agoArbint subtraction should work* now
Sam Moore [Mon, 7 Jul 2014 01:17:12 +0000 (09:17 +0800)]
Arbint subtraction should work* now

Yes I was being clever and resizing if sub.m_digits.size() > this->m_digits.size()
But I forgot about when this->m_digits.size() > sub.m_digits.size()

Passes tests/realops.test now!

On the other hand, CPU rendering of Beziers doesn't work anymore.
I think it's just drawing two lines instead of lots of them.

9 years agoMore debugging, harder realops test
Sam Moore [Sun, 6 Jul 2014 14:41:19 +0000 (22:41 +0800)]
More debugging, harder realops test

9 years agoMaybe this is more correct. realops likes it.
David Gow [Sun, 6 Jul 2014 14:31:09 +0000 (22:31 +0800)]
Maybe this is more correct. realops likes it.

9 years agodigit_t is now unsigned, asm division for 1 digit
David Gow [Sun, 6 Jul 2014 14:23:57 +0000 (22:23 +0800)]
digit_t is now unsigned, asm division for 1 digit

We now do the "two's complement" in SubBasic by hand. It is maybe even
correct.

9 years agoRational<Arbint> now passes realops.test
David Gow [Sun, 6 Jul 2014 13:51:10 +0000 (21:51 +0800)]
Rational<Arbint> now passes realops.test

9 years agoArbint now does sign in division correctly
Sam Moore [Sun, 6 Jul 2014 12:30:40 +0000 (20:30 +0800)]
Arbint now does sign in division correctly

The tester still sometimes picks up a fith Rational<Arbint> /= operation though.

9 years agoMore testing particularly of negatives
Sam Moore [Sun, 6 Jul 2014 12:17:09 +0000 (20:17 +0800)]
More testing particularly of negatives

9 years agoMerge branch 'master' of git.ucc.asn.au:/ipdf/code
Sam Moore [Sun, 6 Jul 2014 11:45:52 +0000 (19:45 +0800)]
Merge branch 'master' of git.ucc.asn.au:/ipdf/code

Dammit I forgot to `git stash; git pull; git stash apply`

9 years agoImproved "realops" tester
Sam Moore [Sun, 6 Jul 2014 11:44:50 +0000 (19:44 +0800)]
Improved "realops" tester

And there are signs of serious problems in Arbint too!

9 years agoSlightly less memory errors
Sam Moore [Sun, 6 Jul 2014 10:19:34 +0000 (18:19 +0800)]
Slightly less memory errors

Using more std::vector and less memcpy/memset etc.
Still seems to have issues but not segfaulting as much.

Fixed m_sign missing in = operator

9 years agoFix a warning/compile error.
David Gow [Sun, 6 Jul 2014 09:50:49 +0000 (17:50 +0800)]
Fix a warning/compile error.

9 years agoHorribly unreliable Arbint's and Rational<Arbint>'s
Sam Moore [Sun, 6 Jul 2014 09:32:28 +0000 (17:32 +0800)]
Horribly unreliable Arbint's and Rational<Arbint>'s

Changes from before: Arbint's use a division algorithm based on bitshifting.

So, you might get a random segfault (if you scroll you will definitely get a random segfault)
and pretty much every single operation with Rational<Arbints> gives you an accuracy warning...

And yet somehow I can render a Bezier. Really slowly.

9 years agoSome initial QuadTree goodness.
David Gow [Sun, 6 Jul 2014 08:30:39 +0000 (16:30 +0800)]
Some initial QuadTree goodness.

9 years agoRender object range on the CPU
David Gow [Sun, 6 Jul 2014 06:17:33 +0000 (14:17 +0800)]
Render object range on the CPU

9 years agoRender part of a document (incorrectly) on the GPU
David Gow [Sun, 6 Jul 2014 05:41:16 +0000 (13:41 +0800)]
Render part of a document (incorrectly) on the GPU

In order to get QuadTrees working, we're going to need to
render small "parts" of a document individually. The way this works
is that, when calling RenderObjectsOnGPU, we now pass a range of
object IDs. The ObjectRenderer will then find (in O(N) time, sadly)
the range of indices needed for that object type and then render those.

Béziers, and other objects which rely on the ObjectID on the GPU being
correct might be broken by this (in some cases), though if so it shouldn't
be too hard to fix by passing an offset in as a uniform.

9 years agonow with fewer midnight-isms
David Gow [Sun, 6 Jul 2014 01:46:52 +0000 (09:46 +0800)]
now with fewer midnight-isms

9 years agoThis might help: divide an arbint by a uint64
David Gow [Sat, 5 Jul 2014 16:32:16 +0000 (00:32 +0800)]
This might help: divide an arbint by a uint64

9 years agoAdd assembly sources to git
Sam Moore [Sat, 5 Jul 2014 10:05:46 +0000 (18:05 +0800)]
Add assembly sources to git

9 years agoDivision less buggy, still slow
Sam Moore [Sat, 5 Jul 2014 09:33:39 +0000 (17:33 +0800)]
Division less buggy, still slow

Ok I need to put more thought into this. Or just look it up.

9 years agoIt compiles... and runs with FPS of zero
Sam Moore [Sat, 5 Jul 2014 07:52:38 +0000 (15:52 +0800)]
It compiles... and runs with FPS of zero

Well I suppose this shouldn't have been totally unexpected...

9 years agoArbint class implemented
Sam Moore [Sat, 5 Jul 2014 07:31:02 +0000 (15:31 +0800)]
Arbint class implemented

Seems to not explode, at least, when it only has one digit...

9 years agoInner step of multiplication in x64 assembly
Sam Moore [Sat, 5 Jul 2014 05:56:01 +0000 (13:56 +0800)]
Inner step of multiplication in x64 assembly

Just does the multiplication of the array by one digit, taking into account overflows.
I hope. It's kind of difficult to test.

What I need is a VM with equivelant instruction set but magically uses decimals instead of binary 64 bit, so I can test with numbers
that my feeble human brain understands directly...

9 years agoArbint class with += and -= operators
Sam Moore [Sat, 5 Jul 2014 04:44:48 +0000 (12:44 +0800)]
Arbint class with += and -= operators

Using x64 assembly routines for addition and subtraction loops,
but C++ for memory management through std::vector

Dealing with the sign is a bit annoying.

(Get it?)

9 years agoUse the lea instruction to reduce number of "inc"s
David Gow [Fri, 4 Jul 2014 13:47:33 +0000 (21:47 +0800)]
Use the lea instruction to reduce number of "inc"s

9 years agoMore moronic bugs
Sam Moore [Fri, 4 Jul 2014 13:20:33 +0000 (21:20 +0800)]
More moronic bugs

So that P/-Q simplifies to -P/Q, -P/-Q simplifies to P/Q, properly this time

9 years agoArbitrary integer addition in x64 assembly
Sam Moore [Fri, 4 Jul 2014 13:08:35 +0000 (21:08 +0800)]
Arbitrary integer addition in x64 assembly

Who needs portability?

Also yes I could probably just use a library but that seems like cheating.

9 years agoMaybe don't use all of the lines. Or maybe do.
Sam Moore [Fri, 4 Jul 2014 06:05:44 +0000 (14:05 +0800)]
Maybe don't use all of the lines. Or maybe do.

The CPU version. CPU rendering still looks slightly different to GPU.
Replicates behaviour in 54798ed9050d0742c6cdab067fad0cc364b1d6b2

Also actually use the right +/- operators for Rational.
Oh and compile as rational by default because we like things to explode right?

9 years agoMoronic bug identified, also Backtrace is a thing now
Sam Moore [Fri, 4 Jul 2014 05:09:47 +0000 (13:09 +0800)]
Moronic bug identified, also Backtrace is a thing now

Copy/Paste bug @rational.h:123

At least division and addition both involve maths right?

9 years agoRational representation
Sam Moore [Mon, 30 Jun 2014 04:29:14 +0000 (12:29 +0800)]
Rational representation

Buggy, partly due to integer overflows, partly due to moronic bugs that have yet to be determined.

9 years agoMaybe don't use all of the lines. Or maybe do.
David Gow [Mon, 30 Jun 2014 04:26:52 +0000 (12:26 +0800)]
Maybe don't use all of the lines. Or maybe do.

9 years agoFix the missing bit of GPU béziers.
David Gow [Thu, 19 Jun 2014 06:20:15 +0000 (14:20 +0800)]
Fix the missing bit of GPU béziers.

Off by one!

9 years agoBéziers on the GPU.
David Gow [Wed, 18 Jun 2014 15:36:27 +0000 (23:36 +0800)]
Béziers on the GPU.

So this was a terrible thing in many ways.

What we're doing:
- Converting all of the coefficients to floats (+ doing a bit of
  preprocessing) and uploading the the GPU.
- Uploading the data_indices array from the document to the GPU.
- Using the vertex ids in the IBO when rendering béziers to get
  the object id, then looking up the data_indices array (as a texture)
  to find which bézier coefficients to use, then reading the bézier
  coefficients from another buffer texture and finally having the
  geometry shader generate 100 lines much as the CPU one does.

We're using buffer textures to access these things because they don't
have fixed sizes (and can get big), so we can't use uniform buffers and
because shader storage buffer objects need OpenGL 4.3, which only graphics
cards manufactured in the last 45 seconds actually support.

9 years agoThe Béziers are quadratic not cubic...
Sam Moore [Wed, 18 Jun 2014 09:19:40 +0000 (17:19 +0800)]
The Béziers are quadratic not cubic...

I can maths

9 years agoBéziers
Sam Moore [Wed, 18 Jun 2014 08:41:40 +0000 (16:41 +0800)]
Béziers

It's hard to type the ́e so I will just call them Beziers from now.

New struct represents a cubic bezier, can be evaluated. The Objects struct contains a vector of beziers, and a vector of indices for each object.
If an ObjectType is BEZIER than the index can be used to look up the bezier control points. Control points are relative to the bounding rectangle;
so we can reuse the same curves (eg: For fonts).

Rendering happens on CPU only, sub divide and use Bresenham lines.
Bresenham lines are not quite optimal but I eventually gave up.

So we don't have a "line" type, but you can make one by creating a Bezier where x1,y1 == x0,y0
They look kind of wobbly.

Save/Load not tested. It might break. But it will have to be pretty heavily rewritten soon anyway.

9 years agoPerformance graphs!
Sam Moore [Tue, 17 Jun 2014 09:26:46 +0000 (17:26 +0800)]
Performance graphs!

Amazeballs

9 years agoPython script for plotting data using Gnuplot
Sam Moore [Tue, 17 Jun 2014 09:25:47 +0000 (17:25 +0800)]
Python script for plotting data using Gnuplot

9 years agoBugfixes for CPU rendering
Sam Moore [Tue, 17 Jun 2014 03:45:11 +0000 (11:45 +0800)]
Bugfixes for CPU rendering

Fix segfault caused by RectOutlineRenderer not properly checking bounds on pixel array.
Fix positioning of RectOutline sides in other locations when they were off the screen.

When you zoom in too far, an integer overflow will occur and the CPU rendered objects disappear.
This occured at widths of about 1e-7 (for our test pattern). Improved for now by int -> int64_t

Later need to replace everything except the actual array access with Real's I think. Then make Real's arbitrary precision. Done.

There is a slight size difference between CPU rendered and GPU rendered objects; not sure what the source of this is. Blame rounding.

GPU sometimes leaves off the corner pixels of the rectangles by the way.

9 years agoFix RenderPixels, CPU rendering "works"
David Gow [Tue, 17 Jun 2014 02:14:44 +0000 (10:14 +0800)]
Fix RenderPixels, CPU rendering "works"

9 years agoImplemented CPU rendering for current ObjectTypes
Sam Moore [Mon, 16 Jun 2014 17:01:55 +0000 (01:01 +0800)]
Implemented CPU rendering for current ObjectTypes

RECT_FILLED (easy), RECT_OUTLINE (ok I need to maths), CIRCLE_FILLED (oh my god how do I maths)

Screen::RenderPixels is FITH but can see the correct(ish) output in "cpu_rendering_last_frame.bmp"

TODO:
 - Fix Screen::RenderPixels
 - Fix reading a BMP from the screen (so we can do "gpu_rendering_last_frame.bmp" as well)
 - Put Beziers in
 - Implement infinite precision document format
 - Profit

9 years agoRefactor Rendering of Objects (prepare for CPU rendering)
Sam Moore [Mon, 16 Jun 2014 14:19:32 +0000 (22:19 +0800)]
Refactor Rendering of Objects (prepare for CPU rendering)

New abstract class ObjectRenderer and derived classes for each type of Object.
It's a bit more complex but hopefully easier to build on now.

There are probably a heap of bugs in this, but I can see the test pattern again, so I'll commit before it gets worse.

Note: We now have to make sure Screen is initialised first or the segfaults will hit the fan.
(Now it makes sense why all those things weren't in constructors in the first place :S)

It also now segfaults if you get View and Screen the wrong way round.

9 years agoThe magic RenderPixels function.
David Gow [Mon, 16 Jun 2014 04:14:43 +0000 (12:14 +0800)]
The magic RenderPixels function.

9 years agoGLSL Shaders -> Files (instead of #define)
Sam Moore [Mon, 16 Jun 2014 03:13:16 +0000 (11:13 +0800)]
GLSL Shaders -> Files (instead of #define)

So we can edit them without going insane.

9 years agoWork around a bug in the Intel driver
David Gow [Thu, 5 Jun 2014 15:22:30 +0000 (23:22 +0800)]
Work around a bug in the Intel driver

Looks like we found a new bug in the intel driver!
https://bugs.freedesktop.org/show_bug.cgi?id=79685

9 years agoCircles (ellipses) have been added (filled only)
David Gow [Thu, 5 Jun 2014 09:26:21 +0000 (17:26 +0800)]
Circles (ellipses) have been added (filled only)

9 years agoMinor perf improvement on nVidia
David Gow [Wed, 4 Jun 2014 14:34:02 +0000 (22:34 +0800)]
Minor perf improvement on nVidia

nVidia's driver does not like you mapping a STATIC buffer, as they're
usually in parts of VRAM not directly accessible by the CPU. The driver
therefore has to migrate the buffer somewhere slower.

We initialize the object bounds buffer by mapping it and writing directly
into it. This is good where we're doing coordinate transform on the CPU:
we're changing it every frame and it can be a dynamic buffer, but we only
need to do it once if the GPU is doing coordinate transforms so we make it a
static buffer.

This change "fakes" mapping a STATIC buffer for the first time by allocating
some CPU-side memory, having the application write into that, and then initializing
the buffer with that. This removes a performance warning on nVidia when switching
to GPU-side coordinate transforms.

9 years agoFix an intel LG warning by orphaning text memory
David Gow [Sun, 1 Jun 2014 07:58:07 +0000 (15:58 +0800)]
Fix an intel LG warning by orphaning text memory

9 years agoNo more pointer arithmetic in GL/use geom shaders
David Gow [Sun, 1 Jun 2014 06:41:43 +0000 (14:41 +0800)]
No more pointer arithmetic in GL/use geom shaders

9 years agoMaybe make some GL code easier to understand
David Gow [Sat, 31 May 2014 13:15:20 +0000 (21:15 +0800)]
Maybe make some GL code easier to understand

9 years agoUpdated upstream stb_truetype with warning fix
David Gow [Mon, 26 May 2014 04:16:50 +0000 (12:16 +0800)]
Updated upstream stb_truetype with warning fix

9 years agoFix all of the warnings, re-enable -Werror, etc.
David Gow [Sun, 25 May 2014 07:42:47 +0000 (15:42 +0800)]
Fix all of the warnings, re-enable -Werror, etc.

9 years agoFix the Floating Point
Sam Moore [Fri, 9 May 2014 12:23:50 +0000 (20:23 +0800)]
Fix the Floating Point

Pun intended

I had two bugs that cancelled each other out and made a self consistent float that was wrong except for all the ones I compared it to!

David helped fix it.

9 years agoTests: MakeBitmap -> PointsToBitmap in its own header
Sam Moore [Thu, 8 May 2014 09:26:43 +0000 (17:26 +0800)]
Tests: MakeBitmap -> PointsToBitmap in its own header

To use in other testers.

9 years agoTester for Beziers
Sam Moore [Thu, 8 May 2014 05:30:39 +0000 (13:30 +0800)]
Tester for Beziers

After a brief* exciting time in which I thought Beziers looked strange at big enough scales, they don't.

Not much progress on the Lit Review front...

9 years agoTest from one of Kahan's articles
Sam Moore [Thu, 1 May 2014 16:21:11 +0000 (00:21 +0800)]
Test from one of Kahan's articles

"Why is Floating-Point Computation so Hard to Debug when it Goes Wrong?"

This is a MUCH better example than massive rounding errors as in calculatepi.test

9 years agoTester from some lecture notes by Kahan
Sam Moore [Thu, 1 May 2014 10:55:28 +0000 (18:55 +0800)]
Tester from some lecture notes by Kahan

Supposedly this is a benchmark for determining the worst accuracy of a CPU using roots to a quadratic
I think something wierd is going on; a result of infinity means there is no rounding errors but I'm not sure what results of -nan mean
and that's what I get.

The article is referenced as kahan1996ieee754 in the literature notes

9 years agoMerge branch 'master' of git.ucc.asn.au:/ipdf/code
Sam Moore [Wed, 30 Apr 2014 13:44:34 +0000 (21:44 +0800)]
Merge branch 'master' of git.ucc.asn.au:/ipdf/code

Forgot to run `git pull` earlier.
No conflicts.

UCC git Repository :: git.ucc.asn.au