Cube  Diff

Differences From Artifact [0379a81562]:

To Artifact [deb96ccb7b]:


235
236
237
238
239
240
241
242

243
244
245
246
247
248
249
250
251
252
253

254
255
256


257
258
259
260
261
262
263

264
265
266
267
268
269
270
271
272

273
274
275

276



277
278
279
280

281
282
283
284
285
286
287
288

void
renderstripssky()
{
	glBindTexture(GL_TEXTURE_2D, skyoglid);
	loopv(strips) if (strips[i].tex == skyoglid)
	    glDrawArrays(GL_TRIANGLE_STRIP, strips[i].start, strips[i].num);
};


void
renderstrips()
{
	int lasttex = -1;
	loopv(strips) if (strips[i].tex != skyoglid)
	{
		if (strips[i].tex != lasttex) {
			glBindTexture(GL_TEXTURE_2D, strips[i].tex);
			lasttex = strips[i].tex;
		};

		glDrawArrays(GL_TRIANGLE_STRIP, strips[i].start, strips[i].num);
	};
};



void
overbright(float amount)
{
	if (hasoverbright)
		glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, amount);
};


void
addstrip(int tex, int start, int n)
{
	strip &s = strips.add();
	s.tex = tex;
	s.start = start;
	s.num = n;
};


VARFP(gamma, 30, 100, 300, {
	float f = gamma / 100.0f;

	if (SDL_SetGamma(f, f, f) == -1) {



		conoutf(
		    @"Could not set gamma (card/driver doesn't support it?)");
		conoutf(@"sdl: %s", SDL_GetError());
	};

});

void
transplayer()
{
	glLoadIdentity();

	glRotated(player1->roll, 0.0, 0.0, 1.0);







<
>










<
>

<
<
>
>






<
>








<
>



>
|
>
>
>



<
>
|







235
236
237
238
239
240
241

242
243
244
245
246
247
248
249
250
251
252

253
254


255
256
257
258
259
260
261
262

263
264
265
266
267
268
269
270
271

272
273
274
275
276
277
278
279
280
281
282
283

284
285
286
287
288
289
290
291
292

void
renderstripssky()
{
	glBindTexture(GL_TEXTURE_2D, skyoglid);
	loopv(strips) if (strips[i].tex == skyoglid)
	    glDrawArrays(GL_TRIANGLE_STRIP, strips[i].start, strips[i].num);

}

void
renderstrips()
{
	int lasttex = -1;
	loopv(strips) if (strips[i].tex != skyoglid)
	{
		if (strips[i].tex != lasttex) {
			glBindTexture(GL_TEXTURE_2D, strips[i].tex);
			lasttex = strips[i].tex;

		}
		glDrawArrays(GL_TRIANGLE_STRIP, strips[i].start, strips[i].num);


	}
}

void
overbright(float amount)
{
	if (hasoverbright)
		glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, amount);

}

void
addstrip(int tex, int start, int n)
{
	strip &s = strips.add();
	s.tex = tex;
	s.start = start;
	s.num = n;

}

VARFP(gamma, 30, 100, 300, {
	float f = gamma / 100.0f;
	Uint16 ramp[256];

	SDL_CalculateGammaRamp(f, ramp);

	if (SDL_SetWindowGammaRamp(window, ramp, ramp, ramp) == -1) {
		conoutf(
		    @"Could not set gamma (card/driver doesn't support it?)");
		conoutf(@"sdl: %s", SDL_GetError());

	}
})

void
transplayer()
{
	glLoadIdentity();

	glRotated(player1->roll, 0.0, 0.0, 1.0);