template<class Point> bool gpu_clip_safe(const Point& a,const Point& b,const Point& c)
The GPU clips pixels to its drawing area, but rejects primitives with spans >1023 horizontally or >511 vertically.
Parameter
Type
Meaning
a
const Point &
Value supplied for a. Keep referenced or pointed-to data valid for the complete call.
b
const Point &
Value supplied for b. Keep referenced or pointed-to data valid for the complete call.
c
const Point &
Value supplied for c. Keep referenced or pointed-to data valid for the complete call.
Returns:bool. Check the value before continuing when it represents success, availability or a resource handle.
Example
C++ example
#include "frustum.hpp"
// Replace these template arguments with types or values accepted by the declaration:
// Point
// Assume these named values have been initialized with valid data:
// const Point & a
// const Point & b
// const Point & c
auto result = epok::gpu_clip_safe<Point>(a, b, c);
Why use it
Template dispatch is resolved at compile time and normally adds no runtime indirection. The boolean result makes success, availability or state explicit without exceptions. The API maps closely to PSX GPU work, giving predictable ordering and low overhead.
Trade-offs and warnings
Every instantiated type must satisfy the header's compile-time requirements; extra instantiations can increase code size. Check the return value; `false` is part of normal control flow for many PSX resource operations. Respect packet lifetime, ordering-table direction and per-frame GPU/VRAM budgets; submission is not a desktop immediate-mode draw call. Pointer/reference arguments are borrowed unless the source contract says otherwise; keep them valid for the complete operation and never assume null is accepted.