Skip to content

Commit a33ebcf

Browse files
author
Tiffany Bennett
committed
IL: Remove ilG_context
1 parent 76ac9b9 commit a33ebcf

File tree

9 files changed

+15
-21
lines changed

9 files changed

+15
-21
lines changed

src/bouncing-lights/ball.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include "Demo.h"
44

55
extern "C" {
6-
#include "graphics/context.h"
76
#include "graphics/material.h"
87
#include "graphics/mesh.h"
98
#include "graphics/renderer.h"
@@ -45,8 +44,8 @@ bool BallRenderer::build(ilG_renderman *rm, char **error)
4544
ilG_material m;
4645
ilG_material_init(&m);
4746
ilG_material_name(&m, "Ball Material");
48-
ilG_material_fragData(&m, ILG_CONTEXT_NORMAL, "out_Normal");
49-
ilG_material_fragData(&m, ILG_CONTEXT_ALBEDO, "out_Albedo");
47+
ilG_material_fragData(&m, ILG_GBUFFER_NORMAL, "out_Normal");
48+
ilG_material_fragData(&m, ILG_GBUFFER_ALBEDO, "out_Albedo");
5049
ilG_material_arrayAttrib(&m, ILG_MESH_POS, "in_Position");
5150
if (!ilG_renderman_addMaterialFromFile(rm, m, "glow.vert", "glow.frag", &mat, error)) {
5251
return false;

src/bouncing-lights/bouncinglights.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ extern "C" {
2626
#include "asset/image.h"
2727
#include "graphics/transform.h"
2828
#include "math/matrix.h"
29-
#include "graphics/context-internal.h"
3029
#include "graphics/graphics.h"
3130
#include "graphics/renderer.h"
3231
#include "graphics/tex.h"

src/bouncing-lights/debugdraw.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "tgl/tgl.h"
66

77
extern "C" {
8-
#include "graphics/context.h"
8+
#include "graphics/renderer.h"
99
#include "graphics/material.h"
1010
}
1111

src/box/box.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include "Demo.h"
77

88
extern "C" {
9-
#include "graphics/context.h"
109
#include "graphics/floatspace.h"
1110
#include "graphics/material.h"
1211
#include "graphics/renderer.h"
@@ -81,7 +80,7 @@ int main(int argc, char **argv)
8180
ilG_material_init(&m);
8281
ilG_material_name(&m, "Box Shader");
8382
ilG_material_arrayAttrib(&m, 0, "in_Position");
84-
ilG_material_fragData(&m, ILG_CONTEXT_ALBEDO, "out_Color");
83+
ilG_material_fragData(&m, ILG_GBUFFER_ALBEDO, "out_Color");
8584
if (!ilG_renderman_addMaterialFromFile(rm, m, "box.vert", "box.frag", &mat, &error)) {
8685
il_error("Box Shader: %s", error);
8786
free(error);

src/lighting/comp.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include "comp.h"
22

33
extern "C" {
4-
#include "graphics/context.h"
54
#include "graphics/floatspace.h"
65
#include "graphics/material.h"
76
#include "graphics/renderer.h"
@@ -197,11 +196,11 @@ bool Computer::build(ilG_renderman *rm, char **error)
197196
ilG_material_arrayAttrib(&m, ATTRIB_POSITION, "in_Position");
198197
ilG_material_arrayAttrib(&m, ATTRIB_NORMAL, "in_Normal");
199198
ilG_material_arrayAttrib(&m, ATTRIB_TEXCOORD, "in_Texcoord");
200-
ilG_material_fragData(&m, ILG_CONTEXT_ALBEDO, "out_Albedo");
201-
ilG_material_fragData(&m, ILG_CONTEXT_NORMAL, "out_Normal");
202-
ilG_material_fragData(&m, ILG_CONTEXT_REFRACTION, "out_Refraction");
203-
ilG_material_fragData(&m, ILG_CONTEXT_GLOSS, "out_Gloss");
204-
ilG_material_fragData(&m, ILG_CONTEXT_EMISSION, "out_Emission");
199+
ilG_material_fragData(&m, ILG_GBUFFER_ALBEDO, "out_Albedo");
200+
ilG_material_fragData(&m, ILG_GBUFFER_NORMAL, "out_Normal");
201+
ilG_material_fragData(&m, ILG_GBUFFER_REFRACTION, "out_Refraction");
202+
ilG_material_fragData(&m, ILG_GBUFFER_GLOSS, "out_Gloss");
203+
ilG_material_fragData(&m, ILG_GBUFFER_EMISSION, "out_Emission");
205204
ilG_material_textureUnit(&m, TEX_ALBEDO, "tex_Albedo");
206205
ilG_material_textureUnit(&m, TEX_NORMAL, "tex_Normal");
207206
ilG_material_textureUnit(&m, TEX_REFRACTION, "tex_Reflect");

src/quad/quad.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
extern "C" {
99
#include "graphics/arrayattrib.h"
10-
#include "graphics/context.h"
1110
#include "graphics/floatspace.h"
1211
#include "graphics/material.h"
1312
#include "tgl/tgl.h"

src/shadertoy/shadertoy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#include <uv.h>
22
#include <SDL.h>
33
#include <assert.h>
4+
#include <sys/time.h>
45

56
#include "Demo.h"
67

78
extern "C" {
89
#include "tgl/tgl.h"
910
#include "asset/node.h"
10-
#include "graphics/context.h"
1111
#include "graphics/graphics.h"
1212
#include "graphics/material.h"
1313
#include "graphics/renderer.h"

src/teapots/teapots.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
extern "C" {
1010
#include "asset/node.h"
1111
#include "graphics/graphics.h"
12-
#include "graphics/context.h"
1312
#include "graphics/floatspace.h"
1413
#include "graphics/material.h"
1514
#include "graphics/mesh.h"
@@ -55,10 +54,10 @@ struct Teapot {
5554
ilG_material_arrayAttrib(&m, ILG_MESH_DIFFUSE, "in_Diffuse");
5655
ilG_material_arrayAttrib(&m, ILG_MESH_SPECULAR, "in_Specular");
5756
ilG_material_textureUnit(&m, 0, "tex");
58-
ilG_material_fragData(&m, ILG_CONTEXT_ALBEDO, "out_Albedo");
59-
ilG_material_fragData(&m, ILG_CONTEXT_NORMAL, "out_Normal");
60-
ilG_material_fragData(&m, ILG_CONTEXT_REFRACTION, "out_Refraction");
61-
ilG_material_fragData(&m, ILG_CONTEXT_GLOSS, "out_Gloss");
57+
ilG_material_fragData(&m, ILG_GBUFFER_ALBEDO, "out_Albedo");
58+
ilG_material_fragData(&m, ILG_GBUFFER_NORMAL, "out_Normal");
59+
ilG_material_fragData(&m, ILG_GBUFFER_REFRACTION, "out_Refraction");
60+
ilG_material_fragData(&m, ILG_GBUFFER_GLOSS, "out_Gloss");
6261
if (!ilG_renderman_addMaterialFromFile(rm, m, "teapot.vert", "teapot.frag", &mat, error)) {
6362
return false;
6463
}

0 commit comments

Comments
 (0)