Esempio n. 1
0
GLboolean getBoolean(const GLenum pname, const GLuint index)
{
    GLboolean value;

    glGetBooleani_v(pname, index, &value);

    return value;
}
Esempio n. 2
0
File: get.c Progetto: stetre/moongl
static int GetBooleanIndex(lua_State *L, GLenum pname)
    {
    GLboolean data;
    GLuint index;
    index = luaL_checkinteger(L, 2);
    glGetBooleani_v(pname, index, &data);
    CheckError(L);
    lua_pushboolean(L, data);
    return 1;
    }
Esempio n. 3
0
File: get.c Progetto: stetre/moongl
static int GetBoolean4Index(lua_State *L, GLenum pname)
    {
    GLboolean data[4];
    GLuint index;
    index = luaL_checkinteger(L, 2);
    glGetBooleani_v(pname, index, data);
    CheckError(L);
    lua_pushboolean(L, data[0]);
    lua_pushboolean(L, data[1]);
    lua_pushboolean(L, data[2]);
    lua_pushboolean(L, data[3]);
    return 4;
    }
Esempio n. 4
0
File: get.c Progetto: stetre/moongl
static int GetBooleanOptIndex(lua_State *L, GLenum pname) /* index is optional */
    {
    GLboolean data;
    GLuint index;
    if(!lua_isnoneornil(L, 2))
        {
        index = luaL_checkinteger(L, 2);
        glGetBooleani_v(pname, index, &data);
        }
    else
        glGetBooleanv(pname, &data);
    CheckError(L);
    lua_pushboolean(L, data);
    return 1;
    }
Esempio n. 5
0
void StateSystem::MaskState::getGL()
{
  glGetBooleanv(GL_DEPTH_WRITEMASK,&depth);
  glGetIntegerv(GL_STENCIL_WRITEMASK, (GLint*)&stencil[FACE_FRONT]);
  glGetIntegerv(GL_STENCIL_BACK_WRITEMASK, (GLint*)&stencil[FACE_BACK]);

  int numEqual = 1;
  for (GLuint i = 0; i < MAX_DRAWBUFFERS; i++){
    glGetBooleani_v(GL_COLOR_WRITEMASK, i, colormask[i]);

    if ( i > 0 && memcmp(colormask[i],colormask[i-1],sizeof(colormask[i]))==0){
      numEqual++;
    }
  }

  colormaskUseSeparate = numEqual != MAX_DRAWBUFFERS;
}