Page MenuHomePhabricator

Render Bezier Curves from RIFT bytecode
Closed, CompletedPublic5 Energy Points (d+f*r)



Render a Bezier curve on an SDL2 window using Cairo. (Use black for now, until color is provided by T1247: ARGB Colors.) The values used to generate the Bezier curve should ultimately come from RIFT bytecode, which may be hardcoded into the program until read/write of RIFT files has been added.

Dependencies and Tools

All of the following libraries are already linked to rA, either via rLIB or as system-wide dependencies (see the link "Guide: Building Code" below). Use them as needed:

  • Cairo: Vector drawing
  • Eigen: Linear algebra library
  • eventpp: Signals and callbacks
  • PawLIB: Testing, Utilities
  • SDL2: Rendering, hardware layer access
WARNING: Do not use the C++ bindings for Cairo (cairomm), as these rely on libsigc++, which has significant performance issues.


Break down this task into subtasks, and prioritize them. Be sure to mark all four main QTM measures (Priority, Gravity, Friction, Relativity) for each.

Remember to start by drawing a Bezier curve using hardcoded values, and then gradually move towards deriving those values from interpreted RIFT bytecode.

You may find it helpful to focus on either just Cairo or just SDL2 first. Cairo can output to a PNG instead of a window, and SDL2 can generate blank windows. Once both are working, connect the two.


Anari Spec: 3.2 Render Bezier Curves from RIFT VBDIs
RIFT Format Specification

Guide: Building Code — Anari
SDL2 Wiki (Documentation)
Cairo Graphics Documentation


Task Type
Proposed Urgency
g5: Critical
f3: Off-Road
Triage Relativity
Volatility (Caught At)
Not a Bug
Not a Bug/Unknown

Revisions and Commits

Event Timeline

jcmcdonald triaged this task as p4: Now priority.Nov 4 2019, 7:26 PM
jcmcdonald created this task.

Well, first, when it comes to libraries, you never "use it for" an IDE. The IDE is almost always extraneous to the build process, so it's best not to even factor it into your thinking.

Second, what "trouble" are you having specifically? Describe the problem in detail. What steps are you taking, what outcome are you expecting, and what's actually happening? Any error messages? All of that is needed, at minimum, before we can begin figuring out the problem.

jcmcdonald updated the task description. (Show Details)
jcmcdonald changed the edit policy from "All Users" to "Trusted [Group] (Project)".
jcmcdonald added a subscriber: mahussain.
jcmcdonald moved this task from Backlog to Restricted Project Column on the Anari [Project] board.Nov 15 2019, 2:51 PM
jcmcdonald edited projects, added Unknown Object (Project); removed Anari [Project].

Progress so far... (posted on behalf of @imirzali). It's rendering!!



line.png (626×802 px, 4 KB)

jcmcdonald set the point value for this task to 5.Apr 10 2020, 12:52 PM
jcmcdonald edited projects, added Anari [Project]; removed Unknown Object (Project).Jun 19 2021, 9:36 AM