Changeset 3364 in orxonox.OLD for orxonox/branches/parenting
- Timestamp:
- Jan 7, 2005, 12:58:44 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/parenting/src/glmenu_imagescreen.cc
r3363 r3364 72 72 // Select Our VU Meter Background Texture 73 73 this->backTex = new Texture(); 74 this->backTex->loadImage(" orx_tex.bmp");74 this->backTex->loadImage("load_screen.jpg"); 75 75 76 76 // End of Background image code. … … 127 127 128 128 // Screen Size. 129 int screen _width = 640;130 int screen _height = 480;129 int screenWidth = 640; 130 int screenHeight = 480; 131 131 132 132 // Set Image Size. 133 int hud_width = 400;134 int hud_height = 400;133 int imageWidth = 640; 134 int imageHeight = 480; 135 135 136 136 // Start pos of image. 137 int hud_x = 120;138 int hud_y = 40;137 int offsetX = (screenWidth - imageWidth)/2; 138 int offsetY = (screenHeight - imageHeight)/2; 139 139 140 140 glEnable(GL_BLEND); … … 147 147 glPushMatrix(); 148 148 glLoadIdentity(); 149 glOrtho(0,screen_width,0,screen_height,-1,1); // Set Up An Ortho Screen 149 /* set up an ortho screen */ 150 glOrtho(0, screenWidth, 0, screenHeight, -1, 1); 150 151 glMatrixMode(GL_MODELVIEW); 151 152 glLoadIdentity(); … … 154 155 155 156 glBegin(GL_QUADS); 156 glTexCoord2i(0, 0); glVertex2i( hud_x, hud_y);157 glTexCoord2i(1, 0 ); glVertex2i( hud_x+hud_width, hud_y);158 glTexCoord2i( 1, 1 ); glVertex2i( hud_x+hud_width, hud_y+hud_height);159 glTexCoord2i( 0, 1 ); glVertex2i( hud_x, hud_y+hud_height);157 glTexCoord2i(0, 0); glVertex2i(offsetX, offsetY); 158 glTexCoord2i(1, 0 ); glVertex2i(offsetX + imageWidth, offsetY); 159 glTexCoord2i( 1, 1 ); glVertex2i(offsetX + imageWidth, offsetY + imageHeight); 160 glTexCoord2i( 0, 1 ); glVertex2i(offsetX, offsetY + imageHeight); 160 161 glEnd(); 162 163 glDisable(GL_TEXTURE_2D); 164 165 glBegin(GL_QUADS); 166 glColor3f(1.0, 0.0, 0.0); 167 glVertex2i(100, 100); 168 glVertex2i(200, 100); 169 glVertex2i(200, 150); 170 glVertex2i(100, 150); 171 glEnd(); 172 161 173 162 174 glDisable(GL_BLEND); … … 165 177 glPopMatrix(); 166 178 glPopAttrib(); 167 glDisable(GL_TEXTURE_2D);168 169 179 170 180 SDL_GL_SwapBuffers();
Note: See TracChangeset
for help on using the changeset viewer.