Exemplo n.º 1
0
static int SetBoolean(lua_State *L, GLFWwindow* window, int attrib)
    {
    int value = checkboolean(L, 3);
    CheckPfn(L, SetWindowAttrib, 3, 3, 0);
    glfw.SetWindowAttrib(window, attrib, value);
    return 0;
    }
Exemplo n.º 2
0
static int SampleCoverage(lua_State *L)
    {
    GLfloat value = luaL_checknumber(L, 1);
    GLboolean invert = checkboolean(L, 2);
    glSampleCoverage(value, invert);
    CheckError(L);
    return 0;
    }
Exemplo n.º 3
0
static int StrokeFontDrawJoinDots(lua_State *L) 
    {
    int b;
    if(!lua_isnoneornil(L, 1)) /* set */
        {
        b = checkboolean(L, 1);
        glutSetOption(GLUT_STROKE_FONT_DRAW_JOIN_DOTS, b);
        }
    lua_pushboolean(L, (glutGet(GLUT_STROKE_FONT_DRAW_JOIN_DOTS) == GL_TRUE));
    return 1;
    }
Exemplo n.º 4
0
static int SkipStaleMotionEvents(lua_State *L) 
    {
    int b;
    if(!lua_isnoneornil(L, 1)) /* set */
        {
        b = checkboolean(L, 1);
        glutSetOption(GLUT_SKIP_STALE_MOTION_EVENTS, b);
        }
    lua_pushboolean(L, (glutGet(GLUT_SKIP_STALE_MOTION_EVENTS) == GL_TRUE));
    return 1;
    }
Exemplo n.º 5
0
static int Boolean(lua_State *L, int target)
    {
    int hint = checkboolean(L, 2);
    glfw.WindowHint(target, hint);
    return 0;
    }
Exemplo n.º 6
0
static int p4_connection_newindex_tagged(lua_State *L) {
	P4ClientAPI* p4 = p4_checkconnection(L, 1);
	p4->SetTagged(checkboolean(L, 3));
	return 0;
}
Exemplo n.º 7
0
static int p4_connection_newindex_track(lua_State *L) {
	P4ClientAPI* p4 = p4_checkconnection(L, 1);
	p4->SetTrack(checkboolean(L, 3) != 0);
	return 0;
}
Exemplo n.º 8
0
static int TraceObjects(lua_State *L)
    {
    trace_objects = checkboolean(L, 1);
    return 0;
    }