当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: OpenGL最初是由Silicon图形公司开发的底层图形库规范。
 

 

 ·取得当前目录的上一级目录     »显示摘要«
    摘要:self.edit2.text := extractfilepath(self.edit1.text + \..); ......
 ·buildingactivexcontrolswithdelphi3     »显示摘要«
    摘要:introduction this course is about how to build an activex control using delphi 3. in addition to presenting a tutorial on how to use delphi 3s wizards to convert an existing vcl control into an activ......


Delphi下的OpenGL开发
上一页   ...如果你使用win32,你将需要设置像素格式以及建立显示上下文环境脱离windows设备上下文环境.如果windows系统级编程你并不很在行,你可以把如下的代码作为模版使用.formcreate中被调用函数的详细信息可以参考帮助文档.

【程序编程相关:db2relocatedb 工具

【推荐阅读:DB2 Performance Expe

file: tri.pas 【扩展信息:DB2 基础关于DB2 UDB监控的一些

unit tri;

interface

uses

opengl, windows, messages, sysutils, classes, graphics, controls, forms, dialogs,

stdctrls, extctrls, comctrls;

type

tform1 = class(tform)

procedure formcreate(sender: tobject);

procedure formpaint(sender: tobject);

private

procedure draw; //draws an opengl scene on request

public

end;

var

form1: tform1;

implementation

{$r *.dfm}

procedure setuppixelformat(dc:hdc);

const

pfd:tpixelformatdescriptor = (

nsize:sizeof(tpixelformatdescriptor); // size

nversion:1; // version

dwflags:pfd_support_opengl or pfd_draw_to_window or

pfd_doublebuffer; // support double-buffering

ipixeltype:pfd_type_rgba; // color type

ccolorbits:24; // preferred color depth

credbits:0; credshift:0; // color bits (ignored)

cgreenbits:0; cgreenshift:0;

cbluebits:0; cblueshift:0;

calphabits:0; calphashift:0; // no alpha buffer

caccumbits: 0;

caccumredbits: 0; // no accumulation buffer,

caccumgreenbits: 0; // accum bits (ignored)

caccumbluebits: 0;

caccumalphabits: 0;

cdepthbits:16; // depth buffer

cstencilbits:0; // no stencil buffer

cauxbuffers:0; // no auxiliary buffers


...   下一页
    摘要:利用setwindowshookex(wh_mouse?,mousehookhandler,hinstance,0)捕捉鼠标信息,其中mousehookhandler的格式如下: lresult callback mouseproc( ??? int ncode,?// hook code??? wparam wparam,?// message identifier??? lparam lp......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE