File: material.c

package info (click to toggle)
libg3d 0.0.8-20
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 5,656 kB
  • ctags: 2,803
  • sloc: ansic: 27,295; sh: 9,288; xml: 4,123; makefile: 864; cpp: 13
file content (41 lines) | stat: -rw-r--r-- 1,142 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* $Id$ */

/*
    libg3d - 3D object loading library

    Copyright (C) 2005-2009  Markus Dahms <mad@automagically.de>

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library 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
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

#include <g3d/types.h>

G3DMaterial *g3d_material_new(void)
{
	G3DMaterial *new;

	new = g_new0(G3DMaterial, 1);

	new->r = new->g = new->b = 0.7;
	new->a = 1.0;

	return new;
}

void g3d_material_free(G3DMaterial *material)
{
	g_free(material->name);
	g_free(material);
}