Changeset 3916 for neercs


Ignore:
Timestamp:
Nov 17, 2009, 5:09:21 PM (11 years ago)
Author:
Sam Hocevar
Message:

Temporary check for triangle texturing (SVN libcaca). If not available,
cube transitions will not work.

Location:
neercs/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/configure.ac

    r3496 r3916  
    4646 [AC_DEFINE(HAVE_CACA_DIRTY_RECTANGLES, 1, [libcaca has dirty rectangles])])
    4747
     48AC_CHECK_LIB(caca, caca_fill_triangle_textured,
     49 [AC_DEFINE(HAVE_CACA_TRIANGLE_TEXTURING, 1, [libcaca has trifiller])])
     50
    4851AC_CHECK_LIB(util, forkpty, UTIL_LIBS="${UTIL_LIBS} -lutil")
    4952AC_SUBST(UTIL_LIBS)
  • neercs/trunk/src/wm.c

    r3914 r3916  
    470470}
    471471
    472 float get_direction(float p1x, float p1y, float p2x, float p2y, float p3x, float p3y) {
     472#if defined HAVE_CACA_TRIANGLE_TEXTURING
     473static float get_direction(float p1x, float p1y, float p2x, float p2y, float p3x, float p3y)
     474{
    473475    float d1x, d1y, d2x, d2y;
    474476   
     
    479481    return (d1x * d2y) - (d1y * d2x);
    480482}
     483#endif
    481484
    482485/* 3D Cube. Yeah I know, it's a mess. Just look anywhere else. */
     
    582585            caca_clear_canvas(screen_list->cv);
    583586           
     587#if defined HAVE_CACA_TRIANGLE_TEXTURING
    584588            caca_canvas_t *first =  screen_list->screen[screen_list->prevpty]->cv;
    585589            caca_canvas_t *second = screen_list->screen[screen_list->pty]->cv;
    586            
     590
    587591            if(get_direction(cube_projected[0][0], cube_projected[0][1],
    588592                             cube_projected[1][0], cube_projected[1][1],
     
    697701                }
    698702            }
     703#endif
    699704           
    700705            screen_list->changed =1 ;     
Note: See TracChangeset for help on using the changeset viewer.