#include <windows.h>#include <gl/gl.h>#include "DCommon.h"#include "OglMisc.h"Go to the source code of this file.
Functions | |
| void | InitMatrices (int width, int height) |
| geBoolean | ExtensionExists (const char *extension) |
| void | CkBlit24_32 (GLubyte *dstPtr, GLint dstWidth, GLint dstHeight, GLubyte *srcPtr, GLint srcWidth, GLint srcHeight) |
| void | Blit32 (GLubyte *dstPtr, GLint dstPitch, GLubyte *srcPtr, GLint srcWidth, GLint srcHeight, GLint srcPitch) |
|
||||||||||||||||||||||||||||
|
Definition at line 122 of file OglMisc.c. References count.
|
|
||||||||||||||||||||||||||||
|
Definition at line 90 of file OglMisc.c. Referenced by THandle_Update().
00092 {
00093 GLint width, height;
00094 GLubyte *nextLine;
00095
00096 memset(dstPtr, 0x00, dstWidth * dstHeight * 4);
00097
00098
00099 for(height = 0; height < srcHeight; height++)
00100 {
00101 nextLine = (dstPtr + (dstWidth * 4));
00102
00103 for(width = 0; width < srcWidth; width++)
00104 {
00105 if(!(*srcPtr == 0x00 && *(srcPtr + 1) == 0x00 && *(srcPtr + 2) == 0x01))
00106 {
00107 *dstPtr = *srcPtr;
00108 *(dstPtr + 1) = *(srcPtr + 1);
00109 *(dstPtr + 2) = *(srcPtr + 2);
00110 *(dstPtr + 3) = 0xFF;
00111 }
00112
00113 srcPtr += 3;
00114 dstPtr += 4;
00115 }
00116
00117 dstPtr = nextLine;
00118 }
00119 }
|
|
|
Definition at line 45 of file OglMisc.c. References GE_FALSE, GE_TRUE, geBoolean, and NULL. Referenced by DrvInit().
00046 {
00047 const GLubyte *extensions = NULL;
00048 const GLubyte *begin;
00049 GLubyte *cursor, *end;
00050
00051 cursor = (GLubyte *) strchr(extension, ' ');
00052
00053 if(cursor || *extension == '\0')
00054 {
00055 return GE_FALSE;
00056 }
00057
00058 extensions = glGetString(GL_EXTENSIONS);
00059
00060 begin = extensions;
00061
00062 while(GE_TRUE)
00063 {
00064 cursor = (GLubyte *) strstr((const char *) begin, extension);
00065
00066 if(!cursor)
00067 {
00068 break;
00069 }
00070
00071 end = cursor + strlen(extension);
00072
00073 if(cursor == begin || *(cursor - 1) == ' ')
00074 {
00075 if (*end == ' ' || *end == '\0')
00076 {
00077 return GE_TRUE;
00078 }
00079 }
00080
00081 begin = end;
00082 }
00083
00084 return GE_FALSE;
00085 }
|
|
||||||||||||
|
Definition at line 29 of file OglMisc.c. Referenced by DrvInit().
00030 {
00031 glMatrixMode(GL_PROJECTION);
00032 glLoadIdentity();
00033 glOrtho(0.0f, (GLfloat)width, 0.0f, (GLfloat)height, 0.0f, 1.0f);
00034 glMatrixMode(GL_MODELVIEW);
00035 glLoadIdentity();
00036 glViewport(0, 0, width, height);
00037
00038 glScalef(1.0f, -1.0f, 1.0f);
00039 glTranslatef(0, 0 - (GLfloat)height, 0.0);
00040 }
|
1.3.2