From BlenderWiki

Jump to: navigation, search
Note: This is an archived version of the Blender Developer Wiki. The current and active wiki is available on wiki.blender.org.

The Raster Aspect

Header File: GPU_raster.h

Switching

void GPU_raster_begin(void);
void GPU_raster_end  (void);

Feature Flags

typedef enum GPURasterShaderOption {
	GPU_RASTER_STIPPLE = (1<<0), /* polygon or line stippling */
	GPU_RASTER_AA      = (1<<1), /* anti-aliasing             */
	GPU_RASTER_POLYGON = (1<<2), /* choose polygon or line    */
} GPURasterShaderOption;

OpenGL Replacements

void    gpuPolygonStipple(const GLubyte* mask);
 
void    gpuLineStipple(GLint factor, GLushort pattern);
 
void    gpuLineWidth(GLfloat width);
 
void    gpuPolygonMode(GLenum mode);
GLenum  gpuGetPolygonMode(void);
GLfloat gpuGetLineWidth(void);

Preset Stipple Patterns

const GLubyte GPU_stipple_halftone        [128];
const GLubyte GPU_stipple_quarttone       [128];
const GLubyte GPU_stipple_diag_stripes_pos[128];
const GLubyte GPU_stipple_diag_stripes_neg[128];
void GPU_raster_set_line_style(int factor);