glsdk
GLS glsdk 

所属分类:OpenGL
开发工具:MultiPlatform
文件大小:136KB
下载次数:25
上传日期:2006-05-10 15:51:42
上 传 者管理员
说明:  OpenGL 开发库,适用于多种平台,可以简单的开发 OpenGL 程序
(OpenGL development libraries, applicable to a variety of platforms, we can develop a simple procedure OpenGL)

文件列表:
GLsdk (0, 2004-03-09)
GLsdk\GL (0, 2004-03-02)
GLsdk\glxdemo (0, 2004-03-02)
GLsdk\glxdemo\demo.c (10859, 2004-03-11)
GLsdk\glxdemo\Makefile (329, 2001-05-22)
GLsdk\GL\codegen (0, 2004-03-09)
GLsdk\GL\gl.h (82270, 2001-05-18)
GLsdk\GL\glext.h (303105, 2004-03-02)
GLsdk\GL\glprocs.c (367370, 2004-03-09)
GLsdk\GL\glprocs.h (182856, 2004-03-09)
GLsdk\GL\wglext.h (27095, 2004-03-02)
GLsdk\windemo (0, 2004-03-08)
GLsdk\windemo\demogl.c (7778, 2004-03-11)
GLsdk\windemo\demogl.h (2730, 2004-03-02)
GLsdk\windemo\Makefile (554, 2001-05-18)
GLsdk\windemo\multithread (0, 2004-03-11)
GLsdk\windemo\multithread\demo.c (11595, 2004-03-09)
GLsdk\windemo\multithread\Makefile (1016, 2001-05-18)
GLsdk\windemo\multiwin (0, 2004-03-11)
GLsdk\windemo\multiwin\demo.c (10508, 2001-06-08)
GLsdk\windemo\multiwin\Makefile (978, 2001-05-18)
GLsdk\windemo\singlewin (0, 2004-03-11)
GLsdk\windemo\singlewin\demo.c (7887, 2001-06-08)
GLsdk\windemo\singlewin\Makefile (702, 2004-03-02)

The currently shipping OpenGL32.DLL from Microsoft only has entry points for OpenGL 1.1. If an application wants to use OpenGL {1.2, 1.3, 1.4, 1.5} functions, it has to use wglGetProcAddress() in order to obtain the entry points from the driver. The files in this distribution enable the application pretend that there is full support for OpenGL {1.2/1.3/1.4/1.5} if the underlying implementation supports OpenGL {1.2/1.3/1.4/1.5}. A useful feature of the framework is that it provides a safety layer by initializing each function to a "default" initialization function with matching arguments and return type. On debug builds, the initialization function adds an ASSERT to catch unwitting usage of NULL function pointers by the application. The framework is also readily usable for multi-context and multi-threaded applications, including application code that demonstrates how to achieve this. Additionally, this distribution provides full support for all the extension entry points in glext.h and wglext.h. In order to use this scheme, the application needs to do the following: ===================================================================== For applications that do not create rendering contexts on different devices (e.g. multi-display with different vendors supporting the two displays): 1. Include "glprocs.h" in addition to including "gl.h" 2. Compile "glprocs.c" and ensure that glprocs.obj is linked with the application code. 3. Call OpenGL{1.2,1.3,1.4,1.5} and extension procs after verifying that the implementation has support for the underlying feature. Example: if (supports12) { glDrawRangeElements (.....) } NOTE: The application can call "glGetString(GL_VERSION)" to determine the version of OpenGL supported on a particular implementation. ===================================================================== For aplications that create rendering contexts on different devices, the application has to perform the following additional steps: 1. Allocate memory for _GLextensionProcs in the application data structures for each device. Example: typedef struct { appType appData; _GLextensionProcs extensionProcs; } ContextData; ContextData cdev1, cdev2; 2. Initialize the extension procs. _InitExtensionProcs (&cdev1.extensionProcs); _InitExtensionProcs (&cdev2.extensionProcs); 3. Provide a mechanism for accessing the current device. Example: ContextData *currentContextData; static _inline _GLextensionProcs *_GET_TLS_PROCTABLE(void) { return (¤tContxtData->extensionProcs); } Another Example (when the two different devices are being used on two different contexts): static _inline _GLextensionProcs *_GET_TLS_PROCTABLE(void) { ContextData *tla = GetThreadSpecificData(); return (&tla->extensionProcs); } (NOTE: Aplication has to replace this function in glprocs.h with its own customized function). ===================================================================== This distribution additionally contains the following: Windows Demo Source: -------------------- windemo: demogl.{c|h} - sample initialization, rendering functions and a sample data structure for tracking per-window data (useful for apps. with multiple windows). Makefile:Builds all the demos (singlewin, multiwin, and multithread) singlewin: demo.c: Shows how to use the SDK for an application with a single window. Makefile: Builds the singlewin sample (demo.exe). multiwin: demo.c: Shows how to use the SDK for an application with two windows Makefile: Builds the multiwin sample (demo.exe) multithread: demo.c: Shows how to use the SDK for a multi-threaded application. Makefile: Builds the multithread sample (demo.exe). GLX Demo Source: -------------------- glxdemo: GLX demo similar to the singlewin Windows demo.

近期下载者

相关文件


收藏者