⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mgcsoftrasterizers.cpp

📁 3D Game Engine Design Source Code非常棒
💻 CPP
字号:
// Magic Software, Inc.
// http://www.magic-software.com
// Copyright (c) 2000, All Rights Reserved
//
// Source code from Magic Software is supplied under the terms of a license
// agreement and may not be copied or disclosed except in accordance with the
// terms of that agreement.  The various license agreements may be found at
// the Magic Software web site.  This file is subject to the license
//
// RESTRICTED USE SOURCE CODE
// http://www.magic-software.com/License/restricted.pdf

#include "MgcSoftRenderer.h"

// One of bit 0 or bit 1 must be set.
//
// bit 0 = color
// bit 1 = texture
// bit 2 = perspective correction (bit 1 must be set)
// bit 3 = depth buffer
// bit 4 = 1-bit alpha blending
//
// When the function pointer is a null renderer, DrawEdgeNULL or DrawTriNull,
// the requested renderer is not valid.

MgcSoftRenderer::ERasterizer MgcSoftRenderer::ms_aoERasterizer[32] =
{
    /* 00000 */ MgcSoftRenderer::DrawEdgeNULL,
    /* 00001 */ MgcSoftRenderer::DrawEdgeC,
    /* 00010 */ MgcSoftRenderer::DrawEdgeT,
    /* 00011 */ MgcSoftRenderer::DrawEdgeTC,
    /* 00100 */ MgcSoftRenderer::DrawEdgeNULL,
    /* 00101 */ MgcSoftRenderer::DrawEdgeNULL,
    /* 00110 */ MgcSoftRenderer::DrawEdgePT,
    /* 00111 */ MgcSoftRenderer::DrawEdgePTC,
    /* 01000 */ MgcSoftRenderer::DrawEdgeNULL,
    /* 01001 */ MgcSoftRenderer::DrawEdgeZC,
    /* 01010 */ MgcSoftRenderer::DrawEdgeZT,
    /* 01011 */ MgcSoftRenderer::DrawEdgeZTC,
    /* 01100 */ MgcSoftRenderer::DrawEdgeNULL,
    /* 01101 */ MgcSoftRenderer::DrawEdgeNULL,
    /* 01110 */ MgcSoftRenderer::DrawEdgeZPT,
    /* 01111 */ MgcSoftRenderer::DrawEdgeZPTC,
    /* 10000 */ MgcSoftRenderer::DrawEdgeNULL,
    /* 10001 */ MgcSoftRenderer::DrawEdgeAC,
    /* 10010 */ MgcSoftRenderer::DrawEdgeAT,
    /* 10011 */ MgcSoftRenderer::DrawEdgeATC,
    /* 10100 */ MgcSoftRenderer::DrawEdgeNULL,
    /* 10101 */ MgcSoftRenderer::DrawEdgeNULL,
    /* 10110 */ MgcSoftRenderer::DrawEdgeAPT,
    /* 10111 */ MgcSoftRenderer::DrawEdgeAPTC,
    /* 11000 */ MgcSoftRenderer::DrawEdgeNULL,
    /* 11001 */ MgcSoftRenderer::DrawEdgeAZC,
    /* 11010 */ MgcSoftRenderer::DrawEdgeAZT,
    /* 11011 */ MgcSoftRenderer::DrawEdgeAZTC,
    /* 11100 */ MgcSoftRenderer::DrawEdgeNULL,
    /* 11101 */ MgcSoftRenderer::DrawEdgeNULL,
    /* 11110 */ MgcSoftRenderer::DrawEdgeAZPT,
    /* 11111 */ MgcSoftRenderer::DrawEdgeAZPTC
};

MgcSoftRenderer::TRasterizer MgcSoftRenderer::ms_aoTRasterizer[32] =
{
    /* 00000 */ MgcSoftRenderer::DrawTriNULL,
    /* 00001 */ MgcSoftRenderer::DrawTriC,
    /* 00010 */ MgcSoftRenderer::DrawTriT,
    /* 00011 */ MgcSoftRenderer::DrawTriTC,
    /* 00100 */ MgcSoftRenderer::DrawTriNULL,
    /* 00101 */ MgcSoftRenderer::DrawTriNULL,
    /* 00110 */ MgcSoftRenderer::DrawTriPT,
    /* 00111 */ MgcSoftRenderer::DrawTriPTC,
    /* 01000 */ MgcSoftRenderer::DrawTriNULL,
    /* 01001 */ MgcSoftRenderer::DrawTriZC,
    /* 01010 */ MgcSoftRenderer::DrawTriZT,
    /* 01011 */ MgcSoftRenderer::DrawTriZTC,
    /* 01100 */ MgcSoftRenderer::DrawTriNULL,
    /* 01101 */ MgcSoftRenderer::DrawTriNULL,
    /* 01110 */ MgcSoftRenderer::DrawTriZPT,
    /* 01111 */ MgcSoftRenderer::DrawTriZPTC,
    /* 10000 */ MgcSoftRenderer::DrawTriNULL,
    /* 10001 */ MgcSoftRenderer::DrawTriAC,
    /* 10010 */ MgcSoftRenderer::DrawTriAT,
    /* 10011 */ MgcSoftRenderer::DrawTriATC,
    /* 10100 */ MgcSoftRenderer::DrawTriNULL,
    /* 10101 */ MgcSoftRenderer::DrawTriNULL,
    /* 10110 */ MgcSoftRenderer::DrawTriAPT,
    /* 10111 */ MgcSoftRenderer::DrawTriAPTC,
    /* 11000 */ MgcSoftRenderer::DrawTriNULL,
    /* 11001 */ MgcSoftRenderer::DrawTriAZC,
    /* 11010 */ MgcSoftRenderer::DrawTriAZT,
    /* 11011 */ MgcSoftRenderer::DrawTriAZTC,
    /* 11100 */ MgcSoftRenderer::DrawTriNULL,
    /* 11101 */ MgcSoftRenderer::DrawTriNULL,
    /* 11110 */ MgcSoftRenderer::DrawTriAZPT,
    /* 11111 */ MgcSoftRenderer::DrawTriAZPTC
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -