- Matrix was not being set
- Avoid querying current program
- Using GL_ALPHA rather than GL_RED
{
int mindex;
float norminv;
{
int mindex;
float norminv;
+ if(!flags.prehistoricOpenGL && !prevProgram)
glGetIntegerv(GL_CURRENT_PROGRAM, (GLint *)&prevProgram);
// while(glGetError());
glGetIntegerv(GL_CURRENT_PROGRAM, (GLint *)&prevProgram);
// while(glGetError());
orderBarrierMask = 0;
updateCount++;
orderBarrierMask = 0;
updateCount++;
+
+ if(flags.prehistoricOpenGL)
+ {
+ glMatrixMode(GL_PROJECTION);
+ glLoadMatrixf(matrix);
+
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+ glScalef(4,4,4);
+ }
}
void drawImage( DMImage image, int offsetx, int offsety, int sizex, int sizey, uint32 color )
}
void drawImage( DMImage image, int offsetx, int offsety, int sizex, int sizey, uint32 color )
+#else
+ int glformat = GL_ALPHA;
+#endif
int w = rect[2] - rect[0];
int h = rect[3] - rect[1];
int w = rect[2] - rect[0];
int h = rect[3] - rect[1];
- if( channelcount == 1 )
- glformat = GL_RED;
+ if( channelcount == 1 );
else if( channelcount == 2 )
glformat = GL_RG;
else if( channelcount == 3 )
else if( channelcount == 2 )
glformat = GL_RG;
else if( channelcount == 3 )
int glformat;
if( image.format.bytesPerPixel == 1 )
int glformat;
if( image.format.bytesPerPixel == 1 )
+#else
+ glformat = GL_ALPHA;
+#endif
+ }
else if( image.format.bytesPerPixel == 2 )
glformat = GL_RG;
else if( image.format.bytesPerPixel == 3 )
else if( image.format.bytesPerPixel == 2 )
glformat = GL_RG;
else if( image.format.bytesPerPixel == 3 )