125 for i:= 0 to pred(MaxAtlases) do |
125 for i:= 0 to pred(MaxAtlases) do |
126 begin |
126 begin |
127 if not Info[i].allocated then |
127 if not Info[i].allocated then |
128 continue; |
128 continue; |
129 glGetIntegerv(GL_VIEWPORT, @vp); |
129 glGetIntegerv(GL_VIEWPORT, @vp); |
|
130 {$IFDEF GL2} |
130 glGetIntegerv(GL_CURRENT_PROGRAM, @prog); |
131 glGetIntegerv(GL_CURRENT_PROGRAM, @prog); |
131 |
|
132 glUseProgram(0); |
132 glUseProgram(0); |
|
133 {$ENDIF} |
|
134 glPushMatrix; |
|
135 glLoadIdentity; |
|
136 glMatrixMode(GL_PROJECTION); |
133 glPushMatrix; |
137 glPushMatrix; |
134 glLoadIdentity; |
138 glLoadIdentity; |
135 glOrtho(0, vp[2], vp[3], 0, -1, 1); |
139 glOrtho(0, vp[2], vp[3], 0, -1, 1); |
136 |
140 |
|
141 glDisable(GL_CULL_FACE); |
137 |
142 |
138 glBindTexture(GL_TEXTURE_2D, Info[i].TextureInfo.id); |
143 glBindTexture(GL_TEXTURE_2D, Info[i].TextureInfo.id); |
139 glBegin(GL_QUADS); |
144 glBegin(GL_QUADS); |
140 glTexCoord2f(0.0, 0.0); |
145 glTexCoord2f(0.0, 0.0); |
141 glVertex2i(x * SZ, y * SZ); |
146 glVertex2i(x * SZ, y * SZ); |