rubber band in platform-specific code
[retroray] / src / app.c
index c538bb1..25baebb 100644 (file)
--- a/src/app.c
+++ b/src/app.c
@@ -23,6 +23,7 @@ along with this program.  If not, see <https://www.gnu.org/licenses/>.
 #include <time.h>
 #include "gaw/gaw.h"
 #include "app.h"
+#include "rend.h"
 #include "options.h"
 #include "font.h"
 #include "util.h"
@@ -36,7 +37,6 @@ static void gui_fill(rtk_rect *rect, uint32_t color);
 static void gui_blit(int x, int y, rtk_icon *icon);
 static void gui_drawtext(int x, int y, const char *str);
 static void gui_textrect(const char *str, rtk_rect *rect);
-static void txdraw(struct dtx_vertex *v, int vcount, struct dtx_pixmap *pixmap, void *cls);
 
 int mouse_x, mouse_y, mouse_state[3];
 unsigned int modkeys;
@@ -67,13 +67,14 @@ int app_init(void)
        static rtk_draw_ops guigfx = {gui_fill, gui_blit, gui_drawtext, gui_textrect};
 
 #if !defined(NDEBUG) && defined(DBG_FPEXCEPT)
-       printf("floating point exceptions enabled\n");
+       infomsg("floating point exceptions enabled\n");
        enable_fpexcept();
 #endif
 
 #ifdef GFX_SW
        gaw_sw_init();
 #endif
+       rend_init();
 
        load_options("retroray.cfg");
        app_resize(opt.xres, opt.yres);
@@ -163,7 +164,7 @@ void app_reshape(int x, int y)
        int numpix = x * y;
        int prev_numpix = win_width * win_height;
 
-       printf("reshape(%d, %d)\n", x, y);
+       dbgmsg("reshape(%d, %d)\n", x, y);
 
        if(!framebuf || numpix > prev_numpix) {
                void *tmp;
@@ -326,7 +327,3 @@ static void gui_textrect(const char *str, rtk_rect *rect)
        rect->width = 20;
        rect->height = 10;/* TODO */
 }
-
-static void txdraw(struct dtx_vertex *v, int vcount, struct dtx_pixmap *pixmap, void *cls)
-{
-}