atomes 1.3.1
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
m_quality.c
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-2026 by CNRS and University of Strasbourg */
15
21
22/*
23* This file: 'm_quality.c'
24*
25* Contains:
26*
27
28 - The functions to create the 'OengGL -> Quality' submenu
29
30*
31* List of functions:
32
33 void set_quality (int q, glwin * view);
34
35 G_MODULE_EXPORT void set_quality_spin (GtkSpinButton * res, gpointer data);
36
37*/
38
39#include "global.h"
40#include "interface.h"
41#include "preferences.h"
42#include "project.h"
43#include "glwindow.h"
44#include "glview.h"
45
54void set_quality (int q, glwin * view)
55{
56 if (! preferences)
57 {
58 view -> anim -> last -> img -> quality = q;
60 view -> create_shaders[MDBOX] = TRUE;
61 view -> create_shaders[MAXIS] = TRUE;
62 update (view);
63 }
64 else
65 {
66 tmp_opengl[3] = q;
67 }
68}
69
78G_MODULE_EXPORT void set_quality_spin (GtkSpinButton * res, gpointer data)
79{
80 glwin * view = (glwin *)data;
81 set_quality (gtk_spin_button_get_value_as_int(res), view);
82 update_entry_int (GTK_ENTRY(res), view -> anim -> last -> img -> quality);
83}
void init_default_shaders(glwin *view)
re-initialize the default OpenGL shaders
Global variable declarations Global convenience function declarations Global data structure defin...
void update_entry_int(GtkEntry *entry, int intval)
update the content of a GtkEntry as int
Definition gtk-misc.c:669
void update(glwin *view)
update the rendering of the OpenGL window
Definition glview.c:461
Variable declarations related to the OpenGL window Function declarations related to the OpenGL wind...
@ MAXIS
Definition glwin.h:94
@ MDBOX
Definition glwin.h:93
Function declarations for the creation of the OpenGL window.
Messaging function declarations.
void set_quality(int q, glwin *view)
set OpenGL quality
Definition m_quality.c:54
G_MODULE_EXPORT void set_quality_spin(GtkSpinButton *res, gpointer data)
set quality spin button callback
Definition m_quality.c:78
int * tmp_opengl
gboolean preferences
Preference variable declarations.
Function declarations for reading atomes project file Function declarations for saving atomes proje...
Definition glwin.h:967
GtkWidget * res[2]
Definition w_encode.c:342
GtkWidget * img
Definition workspace.c:70