libacfutils
A general purpose library of utility functions designed to make it easier to develop addons for the X-Plane flight simulator.
Loading...
Searching...
No Matches
lacf_gl_pic.h
Go to the documentation of this file.
1/*
2 * CDDL HEADER START
3 *
4 * This file and its contents are supplied under the terms of the
5 * Common Development and Distribution License ("CDDL"), version 1.0.
6 * You may only use this file in accordance with the terms of version
7 * 1.0 of the CDDL.
8 *
9 * A full copy of the text of the CDDL should have accompanied this
10 * source. A copy of the CDDL is also available via the Internet at
11 * http://www.illumos.org/license/CDDL.
12 *
13 * CDDL HEADER END
14*/
15/*
16 * Copyright 2023 Saso Kiselkov. All rights reserved.
17 */
30#ifndef _LIBACFUTILS_GL_PIC_H_
31#define _LIBACFUTILS_GL_PIC_H_
32
33#include "core.h"
34#include "geom.h"
35#include "glew.h"
36
37#include <cglm/cglm.h>
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43typedef struct lacf_gl_pic_s lacf_gl_pic_t;
44
45API_EXPORT lacf_gl_pic_t *lacf_gl_pic_new(const char *path);
46API_EXPORT lacf_gl_pic_t *lacf_gl_pic_new_from_dir(const char *dirpath,
47 const char *filename);
48API_EXPORT void lacf_gl_pic_destroy(lacf_gl_pic_t *pic);
49
50API_EXPORT bool_t lacf_gl_pic_load(lacf_gl_pic_t *pic);
51API_EXPORT void lacf_gl_pic_unload(lacf_gl_pic_t *pic);
52
53API_EXPORT int lacf_gl_pic_get_width(lacf_gl_pic_t *pic);
54API_EXPORT int lacf_gl_pic_get_height(lacf_gl_pic_t *pic);
55API_EXPORT GLuint lacf_gl_pic_get_tex(lacf_gl_pic_t *pic);
56
57API_EXPORT void lacf_gl_pic_draw(lacf_gl_pic_t *pic, vect2_t pos,
58 vect2_t size, float alpha);
59API_EXPORT void lacf_gl_pic_draw_custom(lacf_gl_pic_t *pic, vect2_t pos,
60 vect2_t size, GLuint prog);
61
62#ifdef __cplusplus
63}
64#endif
65
66#endif /* _LIBACFUTILS_GLPIC_H_ */
GLuint lacf_gl_pic_get_tex(lacf_gl_pic_t *pic)
void lacf_gl_pic_draw_custom(lacf_gl_pic_t *pic, vect2_t pos, vect2_t size, GLuint prog)
void lacf_gl_pic_unload(lacf_gl_pic_t *pic)
bool_t lacf_gl_pic_load(lacf_gl_pic_t *pic)
lacf_gl_pic_t * lacf_gl_pic_new_from_dir(const char *dirpath, const char *filename)
lacf_gl_pic_t * lacf_gl_pic_new(const char *path)
Definition lacf_gl_pic.c:99
int lacf_gl_pic_get_width(lacf_gl_pic_t *pic)
void lacf_gl_pic_destroy(lacf_gl_pic_t *pic)
void lacf_gl_pic_draw(lacf_gl_pic_t *pic, vect2_t pos, vect2_t size, float alpha)
int lacf_gl_pic_get_height(lacf_gl_pic_t *pic)