minus inclusion, a bit of correctness in FBO_fallback

This commit is contained in:
Garux 2018-08-29 00:12:00 +03:00
parent e7fec22b52
commit cdd1676a59
3 changed files with 10 additions and 9 deletions

View File

@ -1378,8 +1378,6 @@ public:
}
void save(){
glBindTexture( GL_TEXTURE_2D, _tex );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
glCopyTexImage2D( GL_TEXTURE_2D, 0, GL_RGB, 0, 0, _width, _height, 0 );
//glCopyTexSubImage2D( GL_TEXTURE_2D, 0, 0, 0, 0, 0, m_nWidth, m_nHeight );
glBindTexture( GL_TEXTURE_2D, 0 );
@ -1406,13 +1404,9 @@ public:
glEnable( GL_TEXTURE_2D );
glDisable( GL_BLEND );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
glBindTexture( GL_TEXTURE_2D, _tex );
glColor4f( 1.f, 1.f, 1.f, 1.f );
glBegin( GL_QUADS );
@ -1430,6 +1424,13 @@ public:
protected:
void construct() {
glGenTextures( 1, &_tex );
glEnable( GL_TEXTURE_2D );
glBindTexture( GL_TEXTURE_2D, _tex );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
glBindTexture( GL_TEXTURE_2D, 0 );
_constructed = true;
}
private:

View File

@ -73,8 +73,6 @@
#include "render.h"
void LoadTextureRGBA( qtexture_t* q, unsigned char* pPixels, int nWidth, int nHeight );
bool g_bCamEntityMenu = false;
@ -1332,6 +1330,9 @@ void BackgroundImage::free_tex(){
}
}
#include "texturelib.h"
void LoadTextureRGBA( qtexture_t* q, unsigned char* pPixels, int nWidth, int nHeight );
void BackgroundImage::set( const VIEWTYPE viewtype ){
const AABB bounds = GlobalSelectionSystem().getBoundsSelected();
const int nDim1 = ( viewtype == YZ ) ? 1 : 0;

View File

@ -30,7 +30,6 @@
#include "gtkutil/xorrectangle.h"
#include "view.h"
#include "map.h"
#include "texturelib.h"
#include "qerplugin.h"