Epok Engine

EPOK RUNTIME

epok::pack_color

Function · 1 overload

Function

Performs `pack color` as part of PSX polygon preparation, clipping and submission.

Belongs to
epok
Header
polygon.hpp
Overloads
1

Declaration

Declaration
inline uint32_t pack_color(uint32_t r, uint32_t g, uint32_t b)

Performs `pack color` as part of PSX polygon preparation, clipping and submission.

ParameterTypeMeaning
ruint32_tValue supplied for r. Keep referenced or pointed-to data valid for the complete call.
guint32_tValue supplied for g. Keep referenced or pointed-to data valid for the complete call.
buint32_tValue supplied for b. Keep referenced or pointed-to data valid for the complete call.

Returns: uint32_t. Check the value before continuing when it represents success, availability or a resource handle.

Example

C++ example
#include "polygon.hpp"

// Assume these named values have been initialized with valid data:
// uint32_t r
// uint32_t g
// uint32_t b

auto result = epok::pack_color(r, g, b);

Why use it

It provides direct, allocation-conscious access to PSX polygon preparation, clipping and submission. No exception-based error path is implied by the signature.

Trade-offs and warnings

Call it only in the lifecycle phase described by the module. Validate indices, capacities and object state before use.

Declared in runtime/polygon.hpp:42

Related members