bool VoxelFile::load(const QString & filename) { QFile fp(filename); if (!fp.open(QIODevice::ReadOnly)) return false; load_fp(fp); fp.close(); return true; }
int glw_rsx_init_context(glw_root_t *gr) { glw_backend_root_t *be = &gr->gr_be; gr->gr_normalized_texture_coords = 1; gr->gr_render = rsx_render; be->be_vp_1 = load_vp("v1.vp"); be->be_fp_tex = load_fp(gr, "f_tex.fp"); be->be_fp_flat = load_fp(gr, "f_flat.fp"); be->be_fp_tex_blur = load_fp(gr, "f_tex_blur.fp"); be->be_vp_yuv2rgb = load_vp("yuv2rgb_v.vp"); be->be_fp_yuv2rgb_1f = load_fp(gr, "yuv2rgb_1f_norm.fp"); be->be_fp_yuv2rgb_2f = load_fp(gr, "yuv2rgb_2f_norm.fp"); return 0; }
int glw_rsx_init_context(glw_root_t *gr) { glw_backend_root_t *be = &gr->gr_be; gr->gr_be_render_unlocked = rsx_render_unlocked; be->be_vp_1 = load_vp("v1.vp"); be->be_fp_tex = load_fp(gr, "f_tex.fp"); be->be_fp_flat = load_fp(gr, "f_flat.fp"); be->be_fp_tex_blur = load_fp(gr, "f_tex_blur.fp"); be->be_fp_tex_stencil = load_fp(gr, "f_tex_stencil.fp"); be->be_fp_flat_stencil = load_fp(gr, "f_flat_stencil.fp"); be->be_fp_tex_stencil_blur = load_fp(gr, "f_tex_stencil_blur.fp"); be->be_yuv2rgb_1f.gp_vertex_program = be->be_yuv2rgb_2f.gp_vertex_program = load_vp("yuv2rgb_v.vp"); be->be_yuv2rgb_1f.gp_fragment_program = load_fp(gr, "yuv2rgb_1f_norm.fp"); be->be_yuv2rgb_2f.gp_fragment_program = load_fp(gr, "yuv2rgb_2f_norm.fp"); return 0; }
VoxelFile::VoxelFile(QFile & fp) : data(NULL), model(NULL), shape(NULL) { load_palette(); load_fp(fp); }