// init sets the system to its initial state void init(int *w, int *h) { bcm_host_init(); memset(state, 0, sizeof(*state)); oglinit(state); SansTypeface = loadfont(DejaVuSans_glyphPoints, DejaVuSans_glyphPointIndices, DejaVuSans_glyphInstructions, DejaVuSans_glyphInstructionIndices, DejaVuSans_glyphInstructionCounts, DejaVuSans_glyphAdvances, DejaVuSans_characterMap, DejaVuSans_glyphCount); SerifTypeface = loadfont(DejaVuSerif_glyphPoints, DejaVuSerif_glyphPointIndices, DejaVuSerif_glyphInstructions, DejaVuSerif_glyphInstructionIndices, DejaVuSerif_glyphInstructionCounts, DejaVuSerif_glyphAdvances, DejaVuSerif_characterMap, DejaVuSerif_glyphCount); MonoTypeface = loadfont(DejaVuSansMono_glyphPoints, DejaVuSansMono_glyphPointIndices, DejaVuSansMono_glyphInstructions, DejaVuSansMono_glyphInstructionIndices, DejaVuSansMono_glyphInstructionCounts, DejaVuSansMono_glyphAdvances, DejaVuSansMono_characterMap, DejaVuSansMono_glyphCount); *w = state->screen_width; *h = state->screen_height; }
// init sets the system to its initial state void init(int *w, int *h) { bcm_host_init(); memset(state, 0, sizeof(*state)); oglinit(state, 8); *w = state->screen_width; *h = state->screen_height; }
// init sets the system to its initial state void init(int *w, int *h) { bcm_host_init(); memset(state, 0, sizeof(*state)); state->window_x = init_x; state->window_y = init_y; state->window_width = init_w; state->window_height = init_h; oglinit(state); SansTypeface = loadfont(DejaVuSans_glyphPoints, DejaVuSans_glyphPointIndices, DejaVuSans_glyphInstructions, DejaVuSans_glyphInstructionIndices, DejaVuSans_glyphInstructionCounts, DejaVuSans_glyphAdvances, DejaVuSans_characterMap, DejaVuSans_glyphCount); SansTypeface.descender_height = DejaVuSans_descender_height; SansTypeface.font_height = DejaVuSans_font_height; SerifTypeface = loadfont(DejaVuSerif_glyphPoints, DejaVuSerif_glyphPointIndices, DejaVuSerif_glyphInstructions, DejaVuSerif_glyphInstructionIndices, DejaVuSerif_glyphInstructionCounts, DejaVuSerif_glyphAdvances, DejaVuSerif_characterMap, DejaVuSerif_glyphCount); SerifTypeface.descender_height = DejaVuSerif_descender_height; SerifTypeface.font_height = DejaVuSerif_font_height; MonoTypeface = loadfont(DejaVuSansMono_glyphPoints, DejaVuSansMono_glyphPointIndices, DejaVuSansMono_glyphInstructions, DejaVuSansMono_glyphInstructionIndices, DejaVuSansMono_glyphInstructionCounts, DejaVuSansMono_glyphAdvances, DejaVuSansMono_characterMap, DejaVuSansMono_glyphCount); MonoTypeface.descender_height = DejaVuSansMono_descender_height; MonoTypeface.font_height = DejaVuSansMono_font_height; *w = state->window_width; *h = state->window_height; }