srp
software rendering pipeline
Loading...
Searching...
No Matches
clipping.c File Reference
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include "pipeline/clipping.h"
#include "pipeline/interpolation.h"
#include "memory/arena_p.h"
#include "math/utils.h"
#include "utils/message_callback_p.h"
#include "utils/voidptr.h"
Include dependency graph for clipping.c:
enum  ClipPlane {
  PLANE_LEFT , PLANE_RIGHT , PLANE_BOTTOM , PLANE_TOP ,
  PLANE_NEAR , PLANE_FAR , PLANE_COUNT
}
 
static uint8_t computeClipCode (const SRPVertexShaderOut *v)
 
static size_t clipAgainstPlane (SRPVertexShaderOut *in, size_t inCount, ClipPlane plane, const SRPShaderProgram *sp, SRPVertexShaderOut *out)
 
static void interpolateVertex (const SRPVertexShaderOut *a, const SRPVertexShaderOut *b, float t, const SRPShaderProgram *sp, SRPVertexShaderOut *out)
 
static float planeDistance (const SRPVertexShaderOut *v, ClipPlane p)
 
size_t clipTriangle (const SRPTriangle *in, const SRPShaderProgram *sp, SRPTriangle *out)
 
bool clipLine (SRPLine *line, const SRPShaderProgram *sp)
 
bool clipPoint (SRPPoint *p)
 

Detailed Description

Clipping implementation