MCPcopy Index your code
hub / github.com/MapServer/MapServer / renderTile

Method renderTile

mapoglrenderer.cpp:340–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338}
339
340void OglRenderer::renderTile(const OglCachePtr& tile, double x, double y, double angle)
341{
342 makeCurrent();
343 glEnable(GL_SAMPLE_ALPHA_TO_COVERAGE_ARB);
344 glBindTexture(GL_TEXTURE_2D, tile->texture);
345 glPushMatrix();
346 glTranslated(x, y, 0);
347 if (angle)
348 {
349 glRotated(angle, 0, 0, 1);
350 }
351 glTranslated(-x, -y, 0);
352 glBegin(GL_QUADS);
353 glTexCoord2d(0, 1); glVertex2d( x-(tile->width/2), y+(tile->height/2)); // Bottom Left Of The Texture and Quad
354 glTexCoord2d(1, 1); glVertex2d( x+(tile->width/2), y+(tile->height/2)); // Bottom Right Of The Texture and Quad
355 glTexCoord2d(1, 0); glVertex2d( x+(tile->width/2), y-(tile->height/2)); // Top Right Of The Texture and Quad
356 glTexCoord2d(0, 0); glVertex2d( x-(tile->width/2), y-(tile->height/2)); // Top Left Of The Texture and Quad
357 glEnd();
358
359 glPopMatrix();
360 glBindTexture(GL_TEXTURE_2D, 0);
361 glDisable(GL_SAMPLE_ALPHA_TO_COVERAGE_ARB);
362}
363
364void OglRenderer::renderPolylineTile(shapeObj *shape, const OglCachePtr& tile){
365 makeCurrent();

Callers 2

msDrawMarkerSymbolFunction · 0.80
msRenderTileOglFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected