FreeWRL / FreeX3D 4.3.0
Component_Texturing.c
1/*
2
3
4X3D Texturing Component
5
6*/
7
8
9/****************************************************************************
10 This file is part of the FreeWRL/FreeX3D Distribution.
11
12 Copyright 2009 CRC Canada. (http://www.crc.gc.ca)
13
14 FreeWRL/FreeX3D is free software: you can redistribute it and/or modify
15 it under the terms of the GNU Lesser Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 FreeWRL/FreeX3D is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 GNU General Public License for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with FreeWRL/FreeX3D. If not, see <http://www.gnu.org/licenses/>.
26****************************************************************************/
27
28
29
30#include <config.h>
31#include <system.h>
32#include <display.h>
33#include <internal.h>
34
35#include <libFreeWRL.h>
36
37#include "../vrml_parser/Structs.h"
38#include "../main/headers.h"
39#include "../opengl/OpenGL_Utils.h"
40#include "../opengl/Textures.h"
41#include "../scenegraph/Component_Shape.h"
42#include "../scenegraph/RenderFuncs.h"
43#include "LinearAlgebra.h"
44
45
46void render_PixelTexture (struct X3D_PixelTexture *node) {
47 loadTextureNode(X3D_NODE(node),NULL);
48 gglobal()->RenderFuncs.textureStackTop=1; /* not multitexture - should have saved to boundTextureStack[0] */
49}
50
51
52void render_ImageTexture (struct X3D_ImageTexture *node) {
53 loadTextureNode(X3D_NODE(node),NULL); //À̹ÌÁö ÅØ½ºÃ³
54
55 gglobal()->RenderFuncs.textureStackTop=1; /* not multitexture - should have saved to boundTextureStack[0] */
56}
57
58void render_MultiTexture (struct X3D_MultiTexture *node) {
59
60 loadMultiTexture(node);
61}
62
63void render_AudioClip(struct X3D_AudioClip * node);
64void render_MovieTexture (struct X3D_MovieTexture *node) {
65 //july 2016 movietexture fields put in same order as audioclip, so can up-caste and delegate
66 struct X3D_AudioClip *anode = (struct X3D_AudioClip*)node;
67 render_AudioClip(anode); //just checks if loaded, schedules if not
68 loadTextureNode(X3D_NODE(node),NULL);
69 gglobal()->RenderFuncs.textureStackTop=1; /* not multitexture - should have saved to boundTextureStack[0] */
70
71}
72