Changeset - r24963:38bc5b49d3a7
[Not reviewed]
master
0 2 0
Michael Lutz - 3 years ago 2021-02-28 09:58:56
michi@icosahedron.de
Fix #8763: [OpenGL] Cursor sprite origin can be negative.
2 files changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/video/opengl.cpp
Show inline comments
 
@@ -1214,13 +1214,13 @@ void OpenGLBackend::ReleaseAnimBuffer(co
 
 * Render a sprite to the back buffer.
 
 * @param gl_sprite Sprite to render.
 
 * @param x X position of the sprite.
 
 * @param y Y position of the sprite.
 
 * @param zoom Zoom level to use.
 
 */
 
void OpenGLBackend::RenderOglSprite(OpenGLSprite *gl_sprite, PaletteID pal, uint x, uint y, ZoomLevel zoom)
 
void OpenGLBackend::RenderOglSprite(OpenGLSprite *gl_sprite, PaletteID pal, int x, int y, ZoomLevel zoom)
 
{
 
	/* Set textures. */
 
	bool rgb = gl_sprite->BindTextures();
 
	_glActiveTexture(GL_TEXTURE0 + 1);
 
	_glBindTexture(GL_TEXTURE_1D, this->pal_texture);
 

	
src/video/opengl.h
Show inline comments
 
@@ -67,13 +67,13 @@ private:
 
	OpenGLBackend();
 
	~OpenGLBackend();
 

	
 
	const char *Init();
 
	bool InitShaders();
 

	
 
	void RenderOglSprite(OpenGLSprite *gl_sprite, PaletteID pal, uint x, uint y, ZoomLevel zoom);
 
	void RenderOglSprite(OpenGLSprite *gl_sprite, PaletteID pal, int x, int y, ZoomLevel zoom);
 

	
 
public:
 
	/** Get singleton instance of this class. */
 
	static inline OpenGLBackend *Get()
 
	{
 
		return OpenGLBackend::instance;
0 comments (0 inline, 0 general)