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 noth placed here, need to investigate
19 #include "bmp_alpha.h"
22 #define for if(0);else for // C2374 VC6++ on Alpha bug
24 static GLuint texture_sky1;
27 void textures_skybox1()
30 texture_sky1 = LoadTexture(":textures:runway:sky1.bmp" , 256, 256);
32 texture_sky1 = LoadTexture("textures/runway/sky1.bmp" , 256, 256);
38 glDisable(GL_LIGHTING);
42 // glEnable(GL_BLEND);
44 // Enable culling. Remove one side of the polygons, back or front.
45 glEnable(GL_CULL_FACE);
49 glBindTexture( GL_TEXTURE_2D, texture_sky1 );
50 glEnable(GL_TEXTURE_2D);
51 // glDepthMask(GL_FALSE);
52 // glDisable(GL_DEPTH_TEST);
54 // left side of skybox relative to start of demo
56 glTexCoord2f(.005,.995);glVertex3f(-800, 700, -800);
57 glTexCoord2f(.995,.995);glVertex3f(-800, 700, 800);
58 glTexCoord2f(.995,.005);glVertex3f(-800, -5, 800);
59 glTexCoord2f(0,.005);glVertex3f(-800, -5, -800);
62 //front side of skybox realtive to start of demo
64 glTexCoord2f(0,.005);glVertex3f(-800, -5, -800);
65 glTexCoord2f(.995,.005);glVertex3f(800, -5, -800);
66 glTexCoord2f(.995,.995);glVertex3f(800, 700, -800);
67 glTexCoord2f(.005,.995);glVertex3f(-800, 700, -800);
70 // right side of skybox relative to start of demo
72 glTexCoord2f(0,.005);glVertex3f(800, -5, -800);
73 glTexCoord2f(.995,.005);glVertex3f(800, -5, 800);
74 glTexCoord2f(.995,.995);glVertex3f(800, 700, 800);
75 glTexCoord2f(.005,.995);glVertex3f(800, 700, -800);
78 //rear side of skybox realtive to start of demo
80 glTexCoord2f(.005,.995);glVertex3f(-800, 700, 800);
81 glTexCoord2f(.995,.995);glVertex3f(800, 700, 800);
82 glTexCoord2f(.995,.005);glVertex3f(800, -5, 800);
83 glTexCoord2f(0,.005);glVertex3f(-800, -5, 800);
86 // glDepthMask(GL_TRUE);
87 // glEnable(GL_DEPTH_TEST);
90 glDisable(GL_TEXTURE_2D);
93 glDisable(GL_CULL_FACE);
96 // glDisable (GL_BLEND);
98 glEnable(GL_LIGHTING);