Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk6 min

From glBegin(GL_TRIANGLES) to CUDA Kernels: What Graphics Programming Taught Me About Systems

A first-person journey from legacy OpenGL drawing to CUDA kernels shows how visible graphics bugs reveal deeper systems concepts—and why GPU speed is not automatic.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In Viraj Jamdhade’s October 1, 2026 DEV Community essay, learning graphics programming becomes a way to see systems concepts in action: coordinate spaces, matrix order, rendering stages, procedural work, and the cost of moving data to a GPU. The essay is a first-person learning narrative—not a formal tutorial or performance comparison—and its CUDA example explains how independent work can be assigned to threads without claiming a speedup. Read the essay on DEV Community.

Why graphics made systems concepts visible

Jamdhade describes starting with small C and C++ graphics programs on Windows using Win32, FreeGLUT, and OpenGL. The appeal was practical: a drawing that appears in the wrong place, disappears, or flickers makes a mistake observable. Instead of treating systems ideas as abstractions, the author could ask concrete questions: “Why is (0.5, 0.0, 0.0) on the right?” or “Why didn’t my mouse click line up with my drawing?”

As an Amazon Associate I earn from qualifying purchases.

The essay’s route is from drawing to the machinery behind drawing. Its early `glBegin(GL_TRIANGLES)` examples use legacy OpenGL because the immediate-mode style is straightforward to experiment with; the author does not present it as a recommendation for modern rendering. The value of the approach is that it makes foundational ideas easier to encounter, not that it represents today’s preferred graphics architecture.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Coordinate spaces explain mismatched input and drawing

A mouse position and a vertex can use different coordinate systems. In the Win32 setup described in the essay, screen coordinates start at the top-left and Y increases downward. The example OpenGL setup uses a different convention, so the same screen position cannot simply be treated as an OpenGL position. The author maps screen coordinates into a normalized range and flips Y to account for the difference.

This is a lesson about the particular setup in the essay, not a universal description of every OpenGL application. The coordinate ranges and transformations depend on how an application configures its window, projection, and viewport. The useful debugging question is: “Where do my vertices actually live?” Before changing a mouse handler or moving geometry by trial and error, identify the coordinate space on each side of the conversion.

Transform order changes the meaning of motion

Jamdhade found that swapping translation and rotation changed a cube from spinning in place to orbiting. That is a practical illustration of matrix multiplication’s noncommutative nature: applying the same transformations in a different order generally produces a different result.

To reason about a transform, follow the sequence in which it acts on the object and be explicit about the coordinate space involved. Rotation around an object’s own center and rotation around another point are different operations; translation before or after rotation can change which of those behaviors you get. When an object moves unexpectedly, checking the transform order is often more informative than changing individual numeric values.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Projection and view determine how the scene is seen

The essay contrasts orthographic projection, where apparent size does not shrink with distance, with perspective projection, which makes distant objects appear smaller. It also calls attention to aspect ratio: the relationship between viewport width and height affects how a scene is mapped onto the window, so a mismatch can distort the image.

Jamdhade uses `gluLookAt` to explain the view transformation. Conceptually, it transforms the scene so the chosen eye position becomes the origin and the camera’s orientation defines how the world is viewed. That framing helps distinguish the camera’s role from an object’s own model transformation: changing the view can make the whole scene appear to move even when its geometry has not changed.

The rendering pipeline connects geometry to pixels

The essay describes a rendering path through vertex transformation, clipping, viewport mapping, rasterization, depth testing, and pixel writes. Each stage answers a different question: where transformed vertices are, which portions are in view, how geometry maps to the window, which pixels it covers, and which visible surface should win.

Depth testing resolves visible surfaces

When Jamdhade’s cube displayed faces in the wrong order, enabling depth testing corrected the visible result in that example. The depth buffer lets the renderer compare surface depth as fragments are processed, rather than relying only on the order in which faces were submitted.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Double buffering avoids showing a partial frame

With a single visible buffer, a viewer can see drawing while a frame is still being produced. The essay describes using double buffering so rendering happens off-screen and the completed image is then presented, avoiding the visibly partial frame that prompted the author’s change.

The author also notes that 60 frames per second corresponds to an approximate budget of 16.6 milliseconds per frame. This is arithmetic about the time available at that target rate, not a measured result from the author’s programs.

Procedural geometry turns rules into shapes

Jamdhade moved from hand-written geometry toward computation: loops for grids, trigonometric functions for cylinders, and rewriting rules plus turtle state for L-systems. In an L-system, rewriting expands a symbolic string according to rules, while a turtle interprets commands such as moving forward or turning to generate a shape.

The author reports that performance became a problem as the L-system string grew. The essay supplies no controlled timings, so it does not establish a specific scaling rate or a general performance threshold. Its systems lesson is narrower and useful: generated output can grow substantially as rules are expanded, and the costs of producing and processing that output deserve attention.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

CPU and GPU work differ in independence and data movement

The essay contrasts a CPU loop that adds corresponding array elements with a CUDA example in which a thread computes an output element using its block and thread indices. The conceptual shift is to identify independent units of work: if each output depends only on its matching inputs, separate elements can be assigned to separate threads.

Question CPU loop in the essay CUDA example in the essay
How is element-wise work expressed? A loop visits elements and adds corresponding values. A thread computes an element selected by block and thread position.
What is made explicit? The sequential iteration over the arrays. The independent output element assigned to each thread.
What performance result is reported? No measured timing is supplied. No measured speedup is supplied.

Parallel structure alone does not establish that a GPU will be faster. The essay emphasizes that data-transfer costs matter and can outweigh computation in some workloads. A sensible comparison therefore considers how much independent work exists, how much data must move, and the total work involved—not just the number of threads available.

A separate CUDA/OpenGL code sample shows an interoperation pattern: map a graphics resource, obtain a mapped pointer, run image filtering, unmap the resource, and display the result. It demonstrates that graphics and compute work can share a resource through such a sequence; it should not be read as current official API guidance. View the sample mirror on GitHub.

Abstractions trade setup effort for control

The essay’s path also raises a broader systems comparison. Higher-level tools can make it quicker to express a drawing or operation, while lower-level control can expose more of the context creation, buffers, and data flow that the system manages. More control also means more responsibility for getting those pieces right.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

That trade-off is visible in the progression from a simple immediate-mode drawing example toward questions about pipeline stages and GPU work. The essay does not claim that lower-level programming is automatically better; its value is that understanding what abstractions hide can help explain behavior and guide later choices.

What the essay does—and does not—claim about next steps

Jamdhade says their OpenCL exploration was still at a reading-and-confusion stage. Modern OpenGL, profiling, and finding a useful parallel workload are framed as future study, not completed projects. The author’s closing reflection captures the learning arc: “Every layer I explored, from coordinates to matrices to the pipeline to the hardware, led to another layer underneath.”

For a reader following a similar path, that sequence offers a practical way to build understanding: make a small thing visible, investigate why it behaves as it does, then follow the relevant abstraction downward. Moving into modern OpenGL or GPU computing adds different tools and responsibilities; the essay’s strongest contribution is the set of questions it teaches a beginner to ask, rather than a claim that one API or processor is the right choice for every task.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.