Changeset 216


Ignore:
Timestamp:
Jan 17, 2011, 1:39:28 PM (12 years ago)
Author:
sam
Message:

Fix compilation issue caused by WinDef.h defining "near" and "far" macros.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/video.cpp

    r211 r216  
    88#endif
    99
    10 #include <math.h>
     10#include <cmath>
    1111
    1212#ifdef WIN32
     
    4242void Video::SetFov(float theta)
    4343{
     44#undef near /* Fuck Microsoft */
     45#undef far /* Fuck Microsoft again */
    4446    glMatrixMode(GL_PROJECTION);
    4547    glLoadIdentity();
     
    114116    glPixelStorei(GL_PACK_ALIGNMENT, 1);
    115117
    116     glReadPixels(0, 0, width, height, GL_BGRA, GL_UNSIGNED_BYTE, buffer);
     118    glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
    117119
    118120    for (int j = 0; j < height / 2; j++)
Note: See TracChangeset for help on using the changeset viewer.