47 lines
1.5 KiB
C
47 lines
1.5 KiB
C
/*
|
|
* This file is part of Shimatta OpenGL.
|
|
*
|
|
* Shimatta OpenGL is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* Shimatta OpenGL is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with GtkGraphView. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef _SHIMATTA_OPENGL_GRAPHICS_H_
|
|
#define _SHIMATTA_OPENGL_GRAPHICS_H_
|
|
|
|
#include <glib.h>
|
|
#include <glib-object.h>
|
|
#include <cglm/cglm.h>
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
#define SHIMATTA_TYPE_OPENGL_GRAPHICS (shimatta_opengl_graphics_get_type())
|
|
|
|
G_DECLARE_DERIVABLE_TYPE(ShimattaOpenglGraphics, shimatta_opengl_graphics, SHIMATTA, OPENGL_GRAPHICS, GObject);
|
|
|
|
struct _ShimattaOpenglGraphicsClass {
|
|
GObjectClass super_class;
|
|
|
|
int (*realize)(ShimattaOpenglGraphics *graphics);
|
|
void (*draw)(ShimattaOpenglGraphics *graphics);
|
|
void (*draw_with_model_matrix)(ShimattaOpenglGraphics *graphics, mat4 model_matrix, mat4 normal_matrix);
|
|
};
|
|
|
|
int shimatta_opengl_graphics_realize(ShimattaOpenglGraphics *graphics);
|
|
|
|
void shimatta_opengl_graphics_draw(ShimattaOpenglGraphics *graphics);
|
|
|
|
void shimatta_opengl_graphics_draw_with_model_matrix(ShimattaOpenglGraphics *graphics, mat4 model_matrix, mat4 normal_matrix);
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* _SHIMATTA_OPENGL_GRAPHICS_H_ */
|