void Texture::draw (Pixmap& pixmap,int x,int y) { if (data->isManaged()) { gdx_cpp::Gdx::app->error(__FILE__ , "can't draw to a managed texture"); } Gdx::gl->glBindTexture(GL_TEXTURE_2D, glHandle); Gdx::gl->glTexSubImage2D(GL_TEXTURE_2D, 0, x, y, pixmap.getWidth(), pixmap.getHeight(), pixmap.getGLFormat(), pixmap.getGLType(), (const unsigned char*) pixmap.getPixels()); }