atomes 1.1.16
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
ogl_shading.h
Go to the documentation of this file.
1/* This file is part of the 'atomes' software
2
3'atomes' is free software: you can redistribute it and/or modify it under the terms
4of the GNU Affero General Public License as published by the Free Software Foundation,
5either version 3 of the License, or (at your option) any later version.
6
7'atomes' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
8without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9See the GNU General Public License for more details.
10
11You should have received a copy of the GNU Affero General Public License along with 'atomes'.
12If not, see <https://www.gnu.org/licenses/>
13
14Copyright (C) 2022-2024 by CNRS and University of Strasbourg */
15
23/*
24* This header file: 'ogl_shading.h'
25*
26* Contains:
27
28 - Variable declarations related to GLSL programs
29 - Data structure declarations related to GLSL programs
30
31*/
32
33#ifndef OGL_SHADING_H_
34#define OGL_SHADING_H_
35
47
48#define POLY_BUFF_SIZE 10 // p(x,y,z), n(x,y,z), color (r,g,b,a)
49#define LINE_BUFF_SIZE 7 // p(x,y,z), color (r,g,b,a)
50#define CYLI_BUFF_SIZE 13 // p(x,y,z), length, rad, quat(w,x,y,z), color (r,g,b,a)
51#define CAPS_BUFF_SIZE 12 // p(x,y,z), rad, quat(w,x,y,z), color (r,g,b,a)
52#define ATOM_BUFF_SIZE 8 // p(x,y,z), rad, color (r,g,b,a)
53#define CHAR_BUFF_SIZE 4 // p(x,y), t(x,y)
54
55// Points
56extern const GLchar * point_vertex;
57extern const GLchar * point_color;
58
59// Basic lines
60extern const GLchar * line_vertex;
61extern const GLchar * line_color;
62extern const GLchar * line_stipple;
63extern const GLchar * line_stipple_color;
64extern const GLchar * angle_vertex;
65extern const GLchar * angle_stipple;
66extern const GLchar * angle_color;
67
68extern const GLchar * angstrom_vertex;
69extern const GLchar * degree_vertex;
70
71// Triangles: Multiple lights + Materials + Transparency shaders
72extern const GLchar * full_vertex;
73extern const GLchar * full_color;
74
75// Sphere
76extern const GLchar * sphere_vertex;
77
78// Cylinder and caps
79extern const GLchar * cylinder_vertex;
80extern const GLchar * cone_vertex;
81extern const GLchar * cap_vertex;
82
83extern const GLchar * axis_sphere_vertex;
84extern const GLchar * axis_cylinder_geom;
85extern const GLchar * axis_line_vertex;
86
87// Cylinder in geometry shader
88extern const GLchar * gs_cylinder_vertex;
89extern const GLchar * gs_cylinder_geom;
90
91extern const GLchar * polyedron_vertex;
92extern const GLchar * polyedron_geom;
93extern const GLchar * polyedron_color;
94
95extern const GLchar * axis_cylinder_geom;
96
97extern const GLchar * pick_color;
98
99extern const GLchar * string_vertex;
100extern const GLchar * string_color;
101extern const GLchar * string_color_2d;
102
104typedef struct object_3d object_3d;
122
144
145#endif
const GLchar * full_color
const GLchar * gs_cylinder_vertex
const GLchar * string_color_2d
const GLchar * string_vertex
const GLchar * line_stipple_color
const GLchar * axis_cylinder_geom
Definition ogl_shading.h:95
const GLchar * axis_sphere_vertex
const GLchar * angle_stipple
const GLchar * angle_vertex
const GLchar * polyedron_vertex
const GLchar * gs_cylinder_geom
const GLchar * pick_color
const GLchar * polyedron_geom
const GLchar * polyedron_color
const GLchar * cylinder_vertex
const GLchar * string_color
const GLchar * full_vertex
const GLchar * line_color
const GLchar * line_stipple
const GLchar * cap_vertex
const GLchar * angle_color
const GLchar * line_vertex
Definition ogl_shaders.c:80
const GLchar * sphere_vertex
const GLchar * point_vertex
Definition ogl_shaders.c:43
const GLchar * axis_line_vertex
Definition ogl_shaders.c:93
const GLchar * cone_vertex
const GLchar * degree_vertex
const GLchar * point_color
Definition ogl_shaders.c:59
const GLchar * angstrom_vertex
glsl_styles
Definition ogl_shading.h:37
@ GLSL_LIGHT
Definition ogl_shading.h:45
@ GLSL_CAPS
Definition ogl_shading.h:42
@ GLSL_POINTS
Definition ogl_shading.h:38
@ GLSL_STRING
Definition ogl_shading.h:44
@ GLSL_LINES
Definition ogl_shading.h:40
@ GLSL_POLYEDRA
Definition ogl_shading.h:43
@ GLSL_SPHERES
Definition ogl_shading.h:39
@ GLSL_CYLINDERS
Definition ogl_shading.h:41
GLuint vertex_shader
GLuint geometry_shader
GLuint * light_uniform
GLenum vert_type
GLuint * array_pointer
GLuint * vbo
object_3d * obj
GLuint fragment_shader
GLuint * uniform_loc
gboolean draw_instanced
ColRGBA * col
GLuint texture
int ind_buffer_size
int num_instances
int * indices
float * vertices
float shift[4]
int num_vertices
int inst_buffer_size
float * instances
int vert_buffer_size
int num_indices