1 /* 2 * This file is part of libplacebo. 3 * 4 * libplacebo is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2.1 of the License, or (at your option) any later version. 8 * 9 * libplacebo is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with libplacebo. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #pragma once 19 20 #include "common.h" 21 22 struct gl_format { 23 GLint ifmt; // sized internal format (e.g. GL_RGBA16F) 24 GLenum fmt; // base internal format (e.g. GL_RGBA) 25 GLenum type; // host-visible type (e.g. GL_FLOAT) 26 struct pl_fmt tmpl; // pl_fmt template 27 }; 28 29 typedef void (gl_format_cb)(pl_gpu gpu, const struct gl_format *glfmt); 30 31 // Add all supported formats to the `pl_gpu` format list. 32 bool gl_setup_formats(struct pl_gpu *gpu); 33