[osmose-emulator] 04/05: Updated file

Carlos Donizete Froes coringao-guest at moszumanska.debian.org
Sun Oct 22 05:22:55 UTC 2017


This is an automated email from the git hooks/post-receive script.

coringao-guest pushed a commit to branch master
in repository osmose-emulator.

commit 16a937f7ac55f5febf07744cbcef9cb374c12cfc
Author: Carlos Donizete Froes <coringao at riseup.net>
Date:   Sun Oct 22 03:21:24 2017 -0200

    Updated file
---
 src/QGLImage.cpp | 33 +++++++++++++++++++--------------
 1 file changed, 19 insertions(+), 14 deletions(-)

diff --git a/src/QGLImage.cpp b/src/QGLImage.cpp
index 5270031..52124c9 100644
--- a/src/QGLImage.cpp
+++ b/src/QGLImage.cpp
@@ -22,9 +22,14 @@
  *
  */
 
+#define GL_GLEXT_LEGACY
+#define GLX_GLXEXT_LEGACY
+
 #include "QGLImage.h"
 #include <iostream>
 #include <GL/gl.h>
+#include <GL/glu.h>
+#include <GL/glut.h>
 
 #define GL_UNSIGNED_INT_8_8_8_8_REV	0x8367
 #define GL_QUADS	0x0007
@@ -93,9 +98,8 @@ void QGLImage::resizeGL(int width, int height)
  */
 void QGLImage::paintGL()
 {
-	QMutexLocker locker(& textureBufferMutex);
-	
-	setupViewport(viewPortWidth, viewPortHeight);
+    QMutexLocker locker(& textureBufferMutex);
+    setupViewport(viewPortWidth, viewPortHeight);
     glLoadIdentity();
     glBindTexture(GL_TEXTURE_2D, textureName[0]);
 
@@ -124,7 +128,7 @@ void QGLImage::paintGL()
  */
 void QGLImage::initializeGL()
 {
-	glClearColor(0.0, 0.0, 0.0, 0.0);
+    glClearColor(0.0, 0.0, 0.0, 0.0);
     glEnable(GL_TEXTURE_2D);
     
     /* Delete previous texture if any. OGL ignores free on non alloc. textures */
@@ -133,17 +137,17 @@ void QGLImage::initializeGL()
     glBindTexture(GL_TEXTURE_2D, textureName[0]);
     if (bilinearFiltering == true)
     {
-		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-	}
+	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+    }
 	else
-	{
-		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+    {
+	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+    }
+	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
+	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);            
     }
-    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
-    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);            
-}
 
 
 /**
@@ -165,7 +169,8 @@ void QGLImage::setupViewport(int width, int height)
 	glLoadIdentity();
 	glOrtho(0.0f,width,height,0.0f,-1.0f,1.0f);				
 	glMatrixMode(GL_MODELVIEW);
-	glLoadIdentity();	
+	glLoadIdentity();
+	glEnd();
 }
 
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/osmose-emulator.git



More information about the Pkg-games-commits mailing list