mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 21:21:14 +00:00
Attributes seem appropriate as GLSL's qualifiers affect variables rather than types (since there's no typedef). Not much is done with the attributes yet other than some basic error checking (duplicates of non-layout attributes) and debug output, but most (if not all) declarations get to the declaration code with attributes intact.
51 lines
1.4 KiB
C
51 lines
1.4 KiB
C
/*
|
|
glsl-sub_frag.c
|
|
|
|
GLSL fragment shader sublanguage
|
|
|
|
Copyright (C) 2024 Bill Currie <bill@taniwha.org>
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU General Public License
|
|
as published by the Free Software Foundation; either version 2
|
|
of the License, or (at your option) any later version.
|
|
|
|
This program 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 this program; if not, write to:
|
|
|
|
Free Software Foundation, Inc.
|
|
59 Temple Place - Suite 330
|
|
Boston, MA 02111-1307, USA
|
|
|
|
*/
|
|
#ifdef HAVE_CONFIG_H
|
|
# include "config.h"
|
|
#endif
|
|
|
|
#include "QF/alloc.h"
|
|
#include "QF/hash.h"
|
|
#include "QF/va.h"
|
|
|
|
#include "tools/qfcc/include/def.h"
|
|
#include "tools/qfcc/include/diagnostic.h"
|
|
#include "tools/qfcc/include/glsl-lang.h"
|
|
#include "tools/qfcc/include/shared.h"
|
|
#include "tools/qfcc/include/strpool.h"
|
|
#include "tools/qfcc/include/symtab.h"
|
|
#include "tools/qfcc/include/type.h"
|
|
|
|
static const char *glsl_frag_interface_default_names[glsl_num_interfaces] = {
|
|
[glsl_uniform] = ".default",
|
|
[glsl_buffer] = ".default",
|
|
};
|
|
|
|
glsl_sublang_t glsl_frag_sublanguage = {
|
|
.name = "fragment",
|
|
.interface_default_names = glsl_frag_interface_default_names,
|
|
};
|