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

📄 draw.c

📁 [Game.Programming].Academic - Graphics Gems (6 books source code)
💻 C
字号:
/******************************************************************************	draw.c**	This is a skeleton polygon drawing program** 	Copyright (C) 1990-1991 Apple Computer, Inc.* 	All rights reserved.**	8/27/1991 S. Eric Chen	******************************************************************************/#include "rad.h"void BeginDraw(TView *view, unsigned long color){	/* first time this view is drawn */	if (view->wid==0)	{		/* open a new window if you want to display it on the screen */		/* assign the window id or pointer to view->wid */		/* the window id cannot be zero */		/* do all the necessary initialization here too */	}		/* make view->wid the current window */		/* set up view transformation from the parameters in view */		/* clear the frame buffer with color */}void DrawPolygon(int nPts, TPoint3f *pts, TVector3f* n, unsigned long color){	/* draw a polygon with the given color */	/* buffer the polygon if you are drawing in a display list mode */}void EndDraw(){	/* finish the drawing of all polygons */	/* display the contents of view->buffer to the current window if necessary */}

⌨️ 快捷键说明

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