1 // License information.
2 // The Software "SAF BENCH" was written by Patrik.A, also known as Nitton Attiofyra
3 // on YouTube. (https://www.youtube.com/@NittonAttiofyra)
5 // The software is released in to the Public Domain and comes with no warranty and is used
8 #include <stdlib.h> // VS 2005 wont compile it if its not placed here, need to investigate
19 #include "bmp_alpha.h"
22 static GLuint texture_bg, texture_grass, texture_ground;
25 void textures_runway()
28 texture_bg = LoadTexture(":textures:runway:runway.bmp" , 256, 256);
29 texture_grass = LoadTexture(":textures:runway:grass_runway.bmp" , 256, 256);
30 texture_ground = LoadTexture(":textures:runway:ground.bmp" , 256, 256);
32 texture_bg = LoadTexture("textures/runway/runway.bmp" , 256, 256);
33 texture_grass = LoadTexture("textures/runway/grass_runway.bmp" , 256, 256);
34 texture_ground = LoadTexture("textures/runway/ground.bmp" , 256, 256);
43 // Enable culling. Remove one side of the polygons, back or front.
44 glEnable(GL_CULL_FACE);
48 glBindTexture( GL_TEXTURE_2D, texture_ground );
49 glEnable(GL_TEXTURE_2D);
53 glTexCoord2f(.005,0);glVertex3f(-2100, -0.2, 2100);
54 glTexCoord2f(50,0);glVertex3f(2100, -0.2, 2100);
55 glTexCoord2f(50,50);glVertex3f(2100, -0.2, -2100);
56 glTexCoord2f(.005,50);glVertex3f(-2100, -0.2, -2100);
60 glBindTexture( GL_TEXTURE_2D, texture_grass );
64 glTexCoord2f(.005,0);glVertex3f(-1032, -0.04, 32);
65 glTexCoord2f(50,0);glVertex3f(1032, -0.04, 32);
66 glTexCoord2f(50,1);glVertex3f(1032, -0.04, -32);
67 glTexCoord2f(.005,1);glVertex3f(-1032, -0.04, -32);
71 glBindTexture( GL_TEXTURE_2D, texture_bg );
75 glTexCoord2f(.005,0);glVertex3f(-1000, 0, 8);
76 glTexCoord2f(50,0);glVertex3f(1000, 0, 8);
77 glTexCoord2f(50,1);glVertex3f(1000, 0, -8);
78 glTexCoord2f(.005,1);glVertex3f(-1000, 0, -8);
82 glDisable(GL_TEXTURE_2D);
85 glDisable(GL_CULL_FACE);