MCPcopy Create free account
hub / github.com/DentonW/DevIL / DisplayFunc

Function DisplayFunc

DevIL/examples/volume_example/3dtest.c:110–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108
109
110void DisplayFunc()
111{
112 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
113
114 glLoadIdentity();
115 SetPerspective(50.0f);
116 glTranslatef(0.0f, 0.0f, TransFactor);
117 glRotatef(Angle, 0.0f, 1.0f, 0.0f);
118
119 glBindTexture(GL_TEXTURE_2D, TexID1);
120 glBegin(GL_QUADS);
121 glTexCoord2f(0.0f, 0.0f);
122 glVertex3i(-Width, -Height, Depth);
123 glTexCoord2f(1.0f, 0.0f);
124 glVertex3i(Width, -Height, Depth);
125 glTexCoord2f(1.0f, 1.0f);
126 glVertex3i(Width, Height, Depth);
127 glTexCoord2f(0.0f, 1.0f);
128 glVertex3i(-Width, Height, Depth);
129 glEnd();
130
131 glBindTexture(GL_TEXTURE_2D, TexID2);
132 glBegin(GL_QUADS);
133 glTexCoord2f(0.0f, 0.0f);
134 glVertex3i(-Width, -Height, Depth);
135 glTexCoord2f(1.0f, 0.0f);
136 glVertex3i(-Width, -Height, -Depth);
137 glTexCoord2f(1.0f, 1.0f);
138 glVertex3i(-Width, Height, -Depth);
139 glTexCoord2f(0.0f, 1.0f);
140 glVertex3i(-Width, Height, Depth);
141 glEnd();
142
143 glBindTexture(GL_TEXTURE_2D, TexID3);
144 glBegin(GL_QUADS);
145 glTexCoord2f(0.0f, 0.0f);
146 glVertex3i(Width, -Height, Depth);
147 glTexCoord2f(1.0f, 0.0f);
148 glVertex3i(Width, -Height, -Depth);
149 glTexCoord2f(1.0f, 1.0f);
150 glVertex3i(Width, Height, -Depth);
151 glTexCoord2f(0.0f, 1.0f);
152 glVertex3i(Width, Height, Depth);
153 glEnd();
154
155 glBindTexture(GL_TEXTURE_2D, TexID4);
156 glBegin(GL_QUADS);
157 glTexCoord2f(0.0f, 0.0f);
158 glVertex3i(-Width, -Height, -Depth);
159 glTexCoord2f(1.0f, 0.0f);
160 glVertex3i(Width, -Height, -Depth);
161 glTexCoord2f(1.0f, 1.0f);
162 glVertex3i(Width, Height, -Depth);
163 glTexCoord2f(0.0f, 1.0f);
164 glVertex3i(-Width, Height, -Depth);
165 glEnd();
166
167

Callers

nothing calls this directly

Calls 1

SetPerspectiveFunction · 0.85

Tested by

no test coverage detected