You are here: start » geeny » home » reference » engine » graphics

Textures

              rendLoadTextureLibrary(ATOM libname)
              rendSaveTextureLibrary(ATOM libname, ATOM texname)
              rendFreeTextureLibrary(ATOM libname = nul)

ITEXTURE      rendGetTexture(ATOM name)
ITEXTURE      rendGetTexture(ATOM name, ATOM libname) 

Color

ICOLOR        rendColor(INTEGER r, INTEGER g, INTEGER b, INTEGER a)
ICOLOR        rendColorVector(VECTOR col)
ICOLOR        rendColorDepth(FLOAT depth)

INTEGER       rendColorR(ICOLOR col)
INTEGER       rendColorG(ICOLOR col)
INTEGER       rendColorB(ICOLOR col)
INTEGER       rendColorA(ICOLOR col)     

FLOAT         rendDepthColor(ICOLOR col)
              rendColorAdd(ICOLOR & dst, ICOLOR src)
              rendColorSub(ICOLOR & dst, ICOLOR src)
              rendColorMul(ICOLOR & dst, ICOLOR src)
              rendColorMin(ICOLOR & dst, ICOLOR src)
              rendColorMax(ICOLOR & dst, ICOLOR src)
              rendColorAlpha(ICOLOR & dst, ICOLOR src)

              rendColorBlend(ATOM blnd, ICOLOR & dst, ICOLOR src)
              rendColorBlend(ATOM blnd, INTEGER c, ICOLORS dst, ICOLOR src)
              rendColorBlend(ATOM blnd, INTEGER c, ICOLORS dst, ICOLORS src)

              rendColorMix(ICOLOR & dst, ICOLOR src, FLOAT factor)
              rendColorMix(INTEGER c, ICOLORS dst, ICOLORS src, FLOAT factor)

              rendColorRamp(INTEGER c, ICOLORS dst, ICOLOR a, ICOLOR b)

              rendColorPalette(ICOLOR & dst, ICOLOR src, ITEXTURE pal)
              rendColorPalette(INTEGER c, ICOLORS dst, ICOLORS src, 
                ITEXTURE pal)
 

State machine

              rendReset()
              rendSet()

ITEXTURE      rendSetTarget(ITEXTURE target = nul)
ITEXTURE      rendSetTestTarget(ITEXTURE target = nul)
ITEXTURE      rendGetTarget()
ITEXTURE      rendGetTestTarget()
ITEXTURE      rendGetTexture()
ITEXTURE      rendGetTexturePass(INTEGER pass)
ITEXTURE      rendSetPalette(ITEXTURE palette = nul) 
ITEXTURE      rendSetTexture(ITEXTURE texture = nul) 
ITEXTURE      rendSetTestTexture(ITEXTURE texture = nul)

Render setup

              rendSetTest(ATOM test = { 'less' 'less_equal' 'equal' 
                'not_equal' 'greater' 'greater_equal' })
              rendSetTestRenderer(ATOM renderer = { 'image' 'fill' 
                'ramp' 'pattern' 'texture' })
              rendSetWrite(ATOM channel = { 'color' 'test' }, BOOL write) 
              rendSetSkip(INTEGER skip = 0)

              rendSetBlending(ATOM blend = { 'copy' 'add' 'mul' 
                'sub' 'alpha' 'mask' 'maskalpha' 'cookie' 'min' 'max' 
                'posterize' 'shl' 'shr'})
              rendSetRenderer(ATOM renderer = { 'image' 'fill' 'ramp' 
                 'pattern' 'texture' })
              rendSetSampler(ATOM sampler = { 'nearest' 'min' 'min2' 
                 'lin' 'lin2' })
              rendSetMapper(ATOM mapper = { 'wrap' 'clip' 'wrap3d' 
                 'clip3d' })
                                                      
              rendSetColor(ATOM cname = { nul 'mask' 'paletteoffset' 
                 'cookie' }, ICOLOR col)
              rendSetColorDef(ICOLOR col)

Source coordinates

              rendSetCoords(INTEGERS x, INTEGERS y [, INTEGERS z])
              rendSetCoords(FLOATS x, FLOATS y [, FLOATS z])
              rendSetCoords(FLOATS xy)
              rendSetCoords(VECTORS xyzw)

Pass

Viewport and offset

              
INTEGER       rendGetX()
INTEGER       rendGetY()
              rendGetOffset(INTEGER & x, INTEGER & y)
              rendGetViewport(INTEGER & x1, INTEGER & x2, INTEGER & y1, 
                INTEGER & y2)
              rendSetOffset(INTEGER x = nul , INTEGER y = nul)
              rendSetOffsetFloat(FLOAT x = nul , FLOAT y = nul)
              rendSetViewport(INTEGER x1, INTEGER x2, INTEGER y1, INTEGER y2)
              rendSetViewport()           

Brush

            
              rendSetBrush(IBRUSH brush = nul)
              rendBrushAppend(INTEGER pass = 1)
              rendBrushNest(INTEGER pass = 1)
              rendBrushBack()
                                                                    
              rendBrushCopy(IBRUSH dest, IBRUSH source)

Text

              
              rendSetTextFont(INTEGERS fontformat = nul)
              rendSetTextSpacing(INTEGER spacing = 0, 
                INTEGER space = FontDefaultSpace)
              rendSetTextAlignment(ATOM alignment = 
                { 'baseline' 'top' 'bottom' })
              
INTEGER       rendGetTextX(STRING str)
INTEGER       rendGetTextY()

Rasterizer setup

              rendSetShape(ATOM prop, ATOM val) 

              rendSetShape(ATOM prop, INTEGER val) 
              rendSetShape('smoothing', INTEGER val = { 0 1 2 .. }) 
              rendSetShape('linewidth', INTEGER val = { 1 2 3 .. }) 
              rendSetShape('lastpixel', INTEGER val = { 0 1 }) *
              rendSetShape('culling',   INTEGER val = { 0 -1 1 }) 

              rendSetShape() 

Rendering

              
              rendClear(ICOLOR col, ICOLOR depth)

INTEGER       rendText(INTEGER x, INTEGER y, STRING str)
              
              rendSprite(INTEGER x, INTEGER y)
              rendSpriteSub(INTEGER x, INTEGER y, INTEGER v1, INTEGER u1, 
                INTEGER v2, INTEGER u2)
              rendSpriteFrame(INTEGER x, INTEGER y, INTEGER frame)
              rendSpriteFrameSub(INTEGER x, INTEGER y, INTEGER v1, 
                INTEGER u1, INTEGER v2, INTEGER u2, INTEGER frame)
              
              rendFill(INTEGER x1, INTEGER y1, INTEGER x2, INTEGER y2)
              rendFill(INTEGER x1, INTEGER y1, INTEGER x2, INTEGER y2, 
                ICOLOR col)


Particles

              rendParticleSelect(INTEGER n, INTEGERS xy)
              
              rendParticles(INTEGER n, INTEGERS x, INTEGERS y)
              rendParticles(INTEGER n, INTEGERS x, INTEGERS y, ICOLORS c)
              
              rendParticlesFast(INTEGER n, INTEGERS x, INTEGERS y, ICOLORS c)

Lines

              rendLine(INTEGER x1, INTEGER y1, INTEGER x2, INTEGER y2)
              rendLine(INTEGER x1, INTEGER y1, INTEGER x2, INTEGER y2, 
                ICOLOR a) 
              rendLine(INTEGER x1, INTEGER y1, INTEGER x2, INTEGER y2, 
                ICOLOR a, ICOLOR b) 

              rendLineFloat(FLOAT x1, FLOAT y1, FLOAT x2, FLOAT y2)
              rendLineFloat(FLOAT x1, FLOAT y1, FLOAT x2, FLOAT y2, 
                ICOLOR a) 
              
              rendLineFloat(FLOAT x1, FLOAT y1, FLOAT x2, FLOAT y2, 
                ICOLOR a, ICOLOR b) 
              
              rendLineIndex(INTEGER i1, INTEGER i2)
              rendLinesIndex(INTEGER n, INTEGERS i)
              rendLineStrip(INTEGER n, INTEGERS i)

Triangles

              rendTriangle(INTEGERS x, INTEGERS y)
              rendTriangle(INTEGERS x, INTEGERS y, INTEGERS ipar)
              rendTriangles(INTEGER n, INTEGERS x, INTEGERS y)
              rendTriangles(INTEGER n, INTEGERS x, INTEGERS y, 
                INTEGERS i, INTEGER iskp)
              rendTriangleIndex(INTEGER i1, INTEGER i2, INTEGER i3)
              rendTrianglesIndex(INTEGER n, INTEGERS i)
              rendTrianglesIndex(INTEGER n, INTEGERS i, INTEGERS ii)
              rendTrianglesRange(INTEGER from, INTEGER to)
              rendTriangleStripIndex(INTEGER n, INTEGERS i)
              rendTriangleStripIndex(INTEGER n, INTEGERS i, INTEGERS ii)
              rendTriangleStripRange(INTEGER from, INTEGER to)

Auxiliary

              rendClip(INTEGER & x1, INTEGER & y1, INTEGER & x2, INTEGER & y2)
              rendClip(INTEGER & x1, INTEGER & y1)             
 
geeny/home/reference/engine/graphics.txt · Last modified: 2006/10/30 18:28 by matija
Recent changes · Show pagesource · Login