OSDN Git Service

[DRAW][Qt] Move more methods to GLDraw_Tmpl:: .
authorK.Ohta <whatisthis.sowhat@gmail.com>
Mon, 9 Nov 2020 14:44:50 +0000 (23:44 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Mon, 9 Nov 2020 14:44:50 +0000 (23:44 +0900)
source/src/qt/gui/CMakeLists.txt
source/src/qt/gui/gl/qt_glutil_gl_tmpl.h
source/src/qt/gui/gl3/qt_glutil_gl3_0.cpp
source/src/qt/gui/gl3/qt_glutil_gl3_0.h
source/src/qt/gui/gl4_5/qt_glutil_gl4_5.cpp
source/src/qt/gui/gl4_5/qt_glutil_gl4_5.h
source/src/qt/gui/gles2/qt_glutil_gles_2.cpp
source/src/qt/gui/gles2/qt_glutil_gles_2.h

index 92d05a5..8ff5be7 100644 (file)
@@ -1,6 +1,6 @@
 message("* qt/gui")
 
-set(THIS_LIB_VERSION 3.2.3)
+set(THIS_LIB_VERSION 3.2.4)
 #include(cotire)
 #include(PrecompiledHeader)
 
index bd4bc90..e03dd55 100644 (file)
@@ -180,12 +180,92 @@ class DLL_PREFIX GLDraw_Tmpl : public QObject
 {
        Q_OBJECT
 protected:
+       EMU_TEMPLATE* p_emu;
        GLDrawClass *p_wid;
        
        USING_FLAGS *using_flags;
        QImage *imgptr;
        CSP_Logger *csp_logger;
        config_t *p_config;
+
+       const float luma_filter[24 + 1] = {
+               -0.000012020,
+               -0.000022146,
+               -0.000013155,
+               -0.000012020,
+               -0.000049979,
+               -0.000113940,
+               -0.000122150,
+               -0.000005612,
+               0.000170516,
+               0.000237199,
+               0.000169640,
+               0.000285688,
+               0.000984574,
+               0.002018683,
+               0.002002275,
+               -0.000909882,
+               -0.007049081,
+               -0.013222860,
+               -0.012606931,
+               0.002460860,
+               0.035868225,
+               0.084016453,
+               0.135563500,
+               0.175261268,
+               0.190176552
+       };
+       const float chroma_filter[24 + 1] = {
+               -0.000118847,
+               -0.000271306,
+               -0.000502642,
+               -0.000930833,
+               -0.001451013,
+               -0.002064744,
+               -0.002700432,
+               -0.003241276,
+               -0.003524948,
+               -0.003350284,
+               -0.002491729,
+               -0.000721149,
+               0.002164659,
+               0.006313635,
+               0.011789103,
+               0.018545660,
+               0.026414396,
+               0.035100710,
+               0.044196567,
+               0.053207202,
+               0.061590275,
+               0.068803602,
+               0.074356193,
+               0.077856564,
+               0.079052396
+       };
+       const float rot0[4] =   {1, -0,  0, 1};
+       const float rot90[4] =  {0,  1, -1,  0};
+       const float rot180[4] = {-1, 0,  0, -1};
+       const float rot270[4] = {0, -1,  1, 0};
+       
+       int gl_major_version;
+       int gl_minor_version;
+
+       GLScreenPack *main_pass;
+       GLScreenPack *std_pass;
+       GLScreenPack *ntsc_pass1;
+       GLScreenPack *ntsc_pass2;
+       GLScreenPack *bitmap_block;
+       
+       QOpenGLShaderProgram *grids_shader;
+       QOpenGLBuffer *grids_horizonal_buffer;
+       QOpenGLVertexArrayObject *grids_horizonal_vertex;
+       QOpenGLBuffer *grids_vertical_buffer;
+       QOpenGLVertexArrayObject *grids_vertical_vertex;
+       
+       GLuint uTmpTextureID;
+       bool swap_byteorder;
+       bool main_texture_ready;
+       float ringing_phase;
        
        bool smoosing;
        bool gl_grid_horiz;
@@ -236,10 +316,6 @@ protected:
        QOpenGLVertexArrayObject *vertex_osd[32];
        QOpenGLBuffer *buffer_osd[32];
        QOpenGLShaderProgram *osd_shader;
-       const float rot0[4] =   {1, -0,  0, 1};
-       const float rot90[4] =  {0,  1, -1,  0};
-       const float rot180[4] = {-1, 0,  0, -1};
-       const float rot270[4] = {0, -1,  1, 0};
 
        QOpenGLTexture *uVramTextureID;
        QOpenGLTexture *uButtonTextureID[128];
@@ -305,133 +381,8 @@ protected:
        virtual void set_osd_vertex(int xbit) { }
 
 public:
-       GLDraw_Tmpl(GLDrawClass *parent, USING_FLAGS *p, CSP_Logger *logger, EMU_TEMPLATE *emu = 0) : QObject((QObject *)parent)
-       {
-               p_wid = parent;
-               using_flags = p;
-               p_config = p->get_config_ptr();
-               vert_lines = using_flags->get_real_screen_height();
-               horiz_pixels = using_flags->get_real_screen_width();
-               screen_texture_width = using_flags->get_screen_width();
-               screen_texture_width_old = using_flags->get_screen_width();
-               screen_texture_height = using_flags->get_screen_height();
-               screen_texture_height_old = using_flags->get_screen_height();
-               
-               osd_pass = NULL;
-               led_pass = NULL;
-               for(int i = 0; i < 32; i++) {
-                       led_pass_vao[i] = NULL;
-                       led_pass_vbuffer[i] = NULL;
-                       osd_pass_vao[i] = NULL;
-                       osd_pass_vbuffer[i] = NULL;
-               }
-
-#if 0          
-               if(using_flags->is_use_fd()) {
-                       osd_led_bit_width = 10;
-               }
-               if(using_flags->is_use_qd()) {
-                       osd_led_bit_width = 12;
-               }
-               if(using_flags->is_use_tape()) {
-                       osd_led_bit_width = 16;
-               }
-               if(using_flags->get_max_scsi() > 0) {
-                       osd_led_bit_width = 24;
-               }
-               if(using_flags->is_use_compact_disc()) {
-                       osd_led_bit_width = 26;
-               }
-               if(using_flags->is_use_laser_disc()) {
-                       osd_led_bit_width = 28;
-               }
-#else
-               osd_led_bit_width = 32;
-#endif         
-               int i;
-               // Will fix: Must fix setup of vm_buttons[].
-               button_desc_t *vm_buttons_d = using_flags->get_vm_buttons();
-               if(vm_buttons_d != NULL) {
-                       for(i = 0; i < using_flags->get_max_button(); i++) {
-                               uButtonTextureID[i] = new QOpenGLTexture(QOpenGLTexture::Target2D);;
-                               fButtonX[i] = -1.0 + (float)(vm_buttons_d[i].x * 2) / (float)using_flags->get_screen_width();
-                               fButtonY[i] = 1.0 - (float)(vm_buttons_d[i].y * 2) / (float)using_flags->get_screen_height();
-                               fButtonWidth[i] = (float)(vm_buttons_d[i].width * 2) / (float)using_flags->get_screen_width();
-                               fButtonHeight[i] = (float)(vm_buttons_d[i].height * 2) / (float)using_flags->get_screen_height();
-                       } // end of will fix.
-               }
-               
-               for(int i = 0; i < 10; i++) {
-                       for(int j = 0; j < 10; j++) {
-                               icon_texid[i][j] = NULL;
-                       }
-               }
-               
-               rec_width  = using_flags->get_screen_width();
-               rec_height = using_flags->get_screen_height();
-               ButtonImages.clear();
-               
-               csp_logger = logger;
-               
-               gl_grid_horiz = false;
-               gl_grid_vert = false;
-               glVertGrids = NULL;
-               glHorizGrids = NULL;
-               
-               set_brightness = false;
-               crt_flag = false;
-               smoosing = false;
-               uVramTextureID = NULL;
-               emu_launched = false;
-               
-               imgptr = NULL;
-               screen_multiply = 1.0f;
-               redraw_required = false;
-               
-               osd_led_status = 0x00000000;
-               osd_led_status_bak = 0x00000000;
-               osd_led_bit_width = 12;
-
-               osd_onoff = true;
-               
-               uBitmapTextureID = NULL;
-               bitmap_uploaded = false;
-               texture_max_size = 128;
-               low_resolution_screen = false;
-
-               button_updated = false;
-               button_drawn = false;
-               
-               fBrightR = 1.0; // 輝度の初期化
-               fBrightG = 1.0;
-               fBrightB = 1.0;
-               set_brightness = false;
-               crt_flag = false;
-               smoosing = false;
-               
-               screen_width = 1.0;
-               screen_height = 1.0;
-
-               buffer_screen_vertex = NULL;
-               vertex_screen = NULL;
-               
-               offscreen_frame_buffer = NULL;
-               offscreen_frame_buffer_format = NULL;
-               rec_count = 0;
-
-       }
-       ~GLDraw_Tmpl()
-       {
-               if(osd_pass   != NULL) delete osd_pass;
-               if(led_pass   != NULL) delete led_pass;
-               for(int i = 0; i < 32; i++) {
-                       if(led_pass_vao[i] != NULL) delete led_pass_vao[i];     
-                       if(led_pass_vbuffer[i] != NULL) delete led_pass_vbuffer[i];
-                       if(osd_pass_vao[i] != NULL) delete osd_pass_vao[i];     
-                       if(osd_pass_vbuffer[i] != NULL) delete osd_pass_vbuffer[i];
-               }
-       }
-
+       GLDraw_Tmpl(GLDrawClass *parent, USING_FLAGS *p, CSP_Logger *logger, EMU_TEMPLATE *emu = 0);
+       ~GLDraw_Tmpl();
        virtual void initGLObjects() {}
        virtual void initFBO(void) {}
        virtual void initLocalGLObjects(void) {}
@@ -464,60 +415,9 @@ public:
                                                  QVector4D color, bool f_smoosing,
                                                  bool do_chromakey = false,
                                                  QVector3D chromakey = QVector3D(0.0f, 0.0f, 0.0f)) {}
-       virtual void doSetGridsHorizonal(int lines, bool force)
-       {
-               int i;
-               GLfloat yf;
-               GLfloat delta;
-       
-               if((lines == vert_lines) && !force) return;
-               //printf("lines: %d\n", lines);
-               vert_lines = lines;
-               yf = -screen_height;
-               if(vert_lines <= 0) return;
-               if(vert_lines > using_flags->get_real_screen_height()) vert_lines = using_flags->get_real_screen_height();
-       
-               delta = (2.0f * screen_height) / (float)vert_lines;
-               yf = yf - delta * 1.0f;
-               if(glHorizGrids != NULL) {
-                       for(i = 0; i < (vert_lines + 1) ; i++) {
-                               glHorizGrids[i * 6]     = -screen_width; // XBegin
-                               glHorizGrids[i * 6 + 3] = +screen_width; // XEnd
-                               glHorizGrids[i * 6 + 1] = yf; // YBegin
-                               glHorizGrids[i * 6 + 4] = yf; // YEnd
-                               glHorizGrids[i * 6 + 2] = -0.95f; // ZBegin
-                               glHorizGrids[i * 6 + 5] = -0.95f; // ZEnd
-                               yf = yf + delta;
-                       }
-               }
-       }
-       virtual void doSetGridsVertical(int pixels, bool force) 
-       {
-               int i;
-               GLfloat xf;
-               GLfloat delta;
-       
-               if((pixels == horiz_pixels) && !force) return;
-               horiz_pixels = pixels;
-               if(horiz_pixels <= 0) return;
-               if(horiz_pixels > using_flags->get_real_screen_width()) horiz_pixels = using_flags->get_real_screen_width();
        
-               xf = -screen_width;
-               delta = (2.0f * screen_width) / (float)horiz_pixels;
-               xf = xf - delta * 0.75f;
-               if(glVertGrids != NULL) {
-                       if(horiz_pixels > using_flags->get_real_screen_width()) horiz_pixels = using_flags->get_real_screen_width();
-                       for(i = 0; i < (horiz_pixels + 1) ; i++) {
-                               glVertGrids[i * 6]     = xf; // XBegin
-                               glVertGrids[i * 6 + 3] = xf; // XEnd
-                               glVertGrids[i * 6 + 1] = -screen_height; // YBegin
-                               glVertGrids[i * 6 + 4] =  screen_height; // YEnd
-                               glVertGrids[i * 6 + 2] = -0.95f; // ZBegin
-                               glVertGrids[i * 6 + 5] = -0.95f; // ZEnd
-                               xf = xf + delta;
-                       }
-               }
-       }
+       virtual void doSetGridsHorizonal(int lines, bool force);
+       virtual void doSetGridsVertical(int pixels, bool force);
        virtual bool copy_screen_buffer(scrntype_t* target,int w, int h, int stride) { return false;};
        virtual scrntype_t *get_screen_buffer(int y) { return NULL; }
        virtual void get_screen_geometry(int *w, int *h) {
@@ -527,6 +427,7 @@ public:
        virtual bool is_ready_to_map_vram_texture(void) { return false; }
        virtual bool map_vram_texture(void) { return false; }
        virtual bool unmap_vram_texture(void) { return false; }
+
 public slots:
        virtual void paintGL(void) { }
        virtual void resizeGL(int width, int height) { }
index 980f760..dd70595 100644 (file)
 #include <QRect>
 #include <QOpenGLTexture>
 
-//extern USING_FLAGS *using_flags;
-#if 0
-       // OLD_THREE_PHASE
-const float luma_filter[24 + 1] = {
-               -0.000071070,
-               -0.000032816,
-               0.000128784,
-               0.000134711,
-               -0.000226705,
-               -0.000777988,
-               -0.000997809,
-               -0.000522802,
-               0.000344691,
-               0.000768930,
-               0.000275591,
-               -0.000373434,
-               0.000522796,
-               0.003813817,
-               0.007502825,
-               0.006786001,
-               -0.002636726,
-               -0.019461182,
-               -0.033792479,
-               -0.029921972,
-               0.005032552,
-               0.071226466,
-               0.151755921,
-               0.218166470,
-               0.243902439
-       };
-const float chroma_filter[24 + 1] = {
-               0.001845562,
-               0.002381606,
-               0.003040177,
-               0.003838976,
-               0.004795341,
-               0.005925312,
-               0.007242534,
-               0.008757043,
-               0.010473987,
-               0.012392365,
-               0.014503872,
-               0.016791957,
-               0.019231195,
-               0.021787070,
-               0.024416251,
-               0.027067414,
-               0.029682613,
-               0.032199202,
-               0.034552198,
-               0.036677005,
-               0.038512317,
-               0.040003044,
-               0.041103048,
-               0.041777517,
-               0.042004791
-       };
-#else
-#if 1
-       // THREE_PHASE
-const float luma_filter[24 + 1] = {
-               -0.000012020,
-               -0.000022146,
-               -0.000013155,
-               -0.000012020,
-               -0.000049979,
-               -0.000113940,
-               -0.000122150,
-               -0.000005612,
-               0.000170516,
-               0.000237199,
-               0.000169640,
-               0.000285688,
-               0.000984574,
-               0.002018683,
-               0.002002275,
-               -0.000909882,
-               -0.007049081,
-               -0.013222860,
-               -0.012606931,
-               0.002460860,
-               0.035868225,
-               0.084016453,
-               0.135563500,
-               0.175261268,
-               0.190176552
-       };
-const float chroma_filter[24 + 1] = {
-               -0.000118847,
-               -0.000271306,
-               -0.000502642,
-               -0.000930833,
-               -0.001451013,
-               -0.002064744,
-               -0.002700432,
-               -0.003241276,
-               -0.003524948,
-               -0.003350284,
-               -0.002491729,
-               -0.000721149,
-               0.002164659,
-               0.006313635,
-               0.011789103,
-               0.018545660,
-               0.026414396,
-               0.035100710,
-               0.044196567,
-               0.053207202,
-               0.061590275,
-               0.068803602,
-               0.074356193,
-               0.077856564,
-               0.079052396
-       };
-// END "ntsc-decode-filter-3phase.inc" //
-#else
-                               // TWO_PHASE
-const float luma_filter[24 + 1] = {
-               -0.000012020,
-               -0.000022146,
-               -0.000013155,
-               -0.000012020,
-               -0.000049979,
-               -0.000113940,
-               -0.000122150,
-               -0.000005612,
-               0.000170516,
-               0.000237199,
-               0.000169640,
-               0.000285688,
-               0.000984574,
-               0.002018683,
-               0.002002275,
-               -0.000909882,
-               -0.007049081,
-               -0.013222860,
-               -0.012606931,
-               0.002460860,
-               0.035868225,
-               0.084016453,
-               0.135563500,
-               0.175261268,
-               0.190176552
-       };
-       
-const float chroma_filter[24 + 1] = {
-               -0.000118847,
-               -0.000271306,
-               -0.000502642,
-               -0.000930833,
-               -0.001451013,
-               -0.002064744,
-               -0.002700432,
-               -0.003241276,
-               -0.003524948,
-               -0.003350284,
-               -0.002491729,
-               -0.000721149,
-               0.002164659,
-               0.006313635,
-               0.011789103,
-               0.018545660,
-               0.026414396,
-               0.035100710,
-               0.044196567,
-               0.053207202,
-               0.061590275,
-               0.068803602,
-               0.074356193,
-               0.077856564,
-               0.079052396
-       };
-// END "ntsc-decode-filter-3phase.inc" //
-#endif
-#endif
-
 GLDraw_3_0::GLDraw_3_0(GLDrawClass *parent, USING_FLAGS *p, CSP_Logger *logger, EMU_TEMPLATE *emu) : GLDraw_Tmpl(parent, p, logger, emu)
 {
-       uTmpTextureID = 0;
-       
-       grids_shader = NULL;
-       
-       main_pass = NULL;
-       std_pass = NULL;
-       ntsc_pass1 = NULL;
-       ntsc_pass2 = NULL;
-       grids_horizonal_buffer = NULL;
-       grids_horizonal_vertex = NULL;
-       
-       grids_vertical_buffer = NULL;
-       grids_vertical_vertex = NULL;
-       ringing_phase = 0.0f;
-
 }
 
 GLDraw_3_0::~GLDraw_3_0()
 {
-
-       if(main_pass  != NULL) delete main_pass;
-       if(std_pass   != NULL) delete std_pass;
-       if(ntsc_pass1 != NULL) delete ntsc_pass1;
-       if(ntsc_pass2 != NULL) delete ntsc_pass2;
-       
-       if(grids_horizonal_buffer != NULL) {
-               if(grids_horizonal_buffer->isCreated()) grids_horizonal_buffer->destroy();
-       }
-       if(grids_horizonal_vertex != NULL) {
-               if(grids_horizonal_vertex->isCreated()) grids_horizonal_vertex->destroy();
-       }
-       if(grids_vertical_buffer != NULL) {
-               if(grids_vertical_buffer->isCreated()) grids_vertical_buffer->destroy();
-       }
-       if(grids_horizonal_vertex != NULL) {
-               if(grids_vertical_vertex->isCreated()) grids_vertical_vertex->destroy();
-       }
-
 }
 
 void GLDraw_3_0::epilogueBlending()
index d3a3076..2ffde24 100644 (file)
@@ -23,26 +23,8 @@ class DLL_PREFIX GLDraw_3_0 : public GLDraw_Tmpl
        Q_OBJECT
 private:
        QOpenGLFunctions_3_0 *extfunc;
-       float ringing_phase;
 protected:
-       GLScreenPack *main_pass;
-       GLScreenPack *std_pass;
-       GLScreenPack *ntsc_pass1;
-       GLScreenPack *ntsc_pass2;
-       GLScreenPack *bitmap_block;
-       
-       QOpenGLShaderProgram *grids_shader;
-       QOpenGLBuffer *grids_horizonal_buffer;
-       QOpenGLVertexArrayObject *grids_horizonal_vertex;
-       QOpenGLBuffer *grids_vertical_buffer;
-       QOpenGLVertexArrayObject *grids_vertical_vertex;
 
-       GLuint uTmpTextureID;
-       const float rot0[4] =   {1, -0,  0, 1};
-       const float rot90[4] =  {0,  1, -1,  0};
-       const float rot180[4] = {-1, 0,  0, -1};
-       const float rot270[4] = {0, -1,  1, 0};
-       
        virtual void setNormalVAO(QOpenGLShaderProgram *prg, QOpenGLVertexArrayObject *vp,
                                                          QOpenGLBuffer *bp, VertexTexCoord_t *tp, int size = 4);
        virtual bool initGridShaders(const QString vertex_fixed, const QString vertex_rotate, const QString fragment);
index 17233d8..1ed0d55 100644 (file)
 
 GLDraw_4_5::GLDraw_4_5(GLDrawClass *parent, USING_FLAGS *p, CSP_Logger *logger, EMU_TEMPLATE *emu) : GLDraw_Tmpl(parent, p, logger, emu)
 {
-       uTmpTextureID = 0;
-       
-       grids_shader = NULL;
-       
-       main_pass = NULL;
-       std_pass = NULL;
-       ntsc_pass1 = NULL;
-       ntsc_pass2 = NULL;
-       grids_horizonal_buffer = NULL;
-       grids_horizonal_vertex = NULL;
-       
-       grids_vertical_buffer = NULL;
-       grids_vertical_vertex = NULL;
        ringing_phase = 0.0f;
+       pixel_width = 0;
+       pixel_height = 0;
 #if defined(__LITTLE_ENDIAN__)
        swap_byteorder = true;
 #else
        swap_byteorder = false;
 #endif
-       pixel_width = 0;
-       pixel_height = 0;
        main_texture_buffer = 0;
        main_read_texture_buffer = 0;
        map_base_address = NULL;
@@ -75,34 +62,14 @@ GLDraw_4_5::GLDraw_4_5(GLDrawClass *parent, USING_FLAGS *p, CSP_Logger *logger,
        // ToDo
        screen_texture_width = -1 ;
        screen_texture_height = -1;
-
 }
 
 GLDraw_4_5::~GLDraw_4_5()
 {
-
        // 20200812 K.O: MUST WAIT when changing texture feature.
        extfunc->glClientWaitSync(sync_fence, GL_SYNC_FLUSH_COMMANDS_BIT, 0);
        extfunc->glDeleteSync(sync_fence);
        sync_fence = extfunc->glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE,  0);
-       
-       if(main_pass  != NULL) delete main_pass;
-       if(std_pass   != NULL) delete std_pass;
-       if(ntsc_pass1 != NULL) delete ntsc_pass1;
-       if(ntsc_pass2 != NULL) delete ntsc_pass2;
-       
-       if(grids_horizonal_buffer != NULL) {
-               if(grids_horizonal_buffer->isCreated()) grids_horizonal_buffer->destroy();
-       }
-       if(grids_horizonal_vertex != NULL) {
-               if(grids_horizonal_vertex->isCreated()) grids_horizonal_vertex->destroy();
-       }
-       if(grids_vertical_buffer != NULL) {
-               if(grids_vertical_buffer->isCreated()) grids_vertical_buffer->destroy();
-       }
-       if(grids_horizonal_vertex != NULL) {
-               if(grids_vertical_vertex->isCreated()) grids_vertical_vertex->destroy();
-       }
 }
 
 void GLDraw_4_5::epilogueBlending()
index 73eefb0..8181ecc 100644 (file)
@@ -28,70 +28,8 @@ class DLL_PREFIX GLDraw_4_5 : public GLDraw_Tmpl
        Q_OBJECT
 private:
        QOpenGLFunctions_4_5_Core *extfunc;
-       float ringing_phase;
-protected:
-       const float luma_filter[24 + 1] = {
-               -0.000012020,
-               -0.000022146,
-               -0.000013155,
-               -0.000012020,
-               -0.000049979,
-               -0.000113940,
-               -0.000122150,
-               -0.000005612,
-               0.000170516,
-               0.000237199,
-               0.000169640,
-               0.000285688,
-               0.000984574,
-               0.002018683,
-               0.002002275,
-               -0.000909882,
-               -0.007049081,
-               -0.013222860,
-               -0.012606931,
-               0.002460860,
-               0.035868225,
-               0.084016453,
-               0.135563500,
-               0.175261268,
-               0.190176552
-       };
-       const float chroma_filter[24 + 1] = {
-               -0.000118847,
-               -0.000271306,
-               -0.000502642,
-               -0.000930833,
-               -0.001451013,
-               -0.002064744,
-               -0.002700432,
-               -0.003241276,
-               -0.003524948,
-               -0.003350284,
-               -0.002491729,
-               -0.000721149,
-               0.002164659,
-               0.006313635,
-               0.011789103,
-               0.018545660,
-               0.026414396,
-               0.035100710,
-               0.044196567,
-               0.053207202,
-               0.061590275,
-               0.068803602,
-               0.074356193,
-               0.077856564,
-               0.079052396
-       };
-       const float rot0[4] =   {1, -0,  0, 1};
-       const float rot90[4] =  {0,  1, -1,  0};
-       const float rot180[4] = {-1, 0,  0, -1};
-       const float rot270[4] = {0, -1,  1, 0};
-
-       int gl_major_version;
-       int gl_minor_version;
 
+protected:
        int pixel_width;
        int pixel_height;
        GLuint main_texture_buffer;
@@ -99,23 +37,7 @@ protected:
        GLsync sync_fence;
        QMutex *main_mutex;
        scrntype_t *map_base_address;
-       
-       GLScreenPack *main_pass;
-       GLScreenPack *std_pass;
-       GLScreenPack *ntsc_pass1;
-       GLScreenPack *ntsc_pass2;
-       GLScreenPack *bitmap_block;
-       
-       QOpenGLShaderProgram *grids_shader;
-       QOpenGLBuffer *grids_horizonal_buffer;
-       QOpenGLVertexArrayObject *grids_horizonal_vertex;
-       QOpenGLBuffer *grids_vertical_buffer;
-       QOpenGLVertexArrayObject *grids_vertical_vertex;
 
-       GLuint uTmpTextureID;
-       bool swap_byteorder;
-       bool main_texture_ready;
-       
        virtual void setNormalVAO(QOpenGLShaderProgram *prg, QOpenGLVertexArrayObject *vp,
                                                          QOpenGLBuffer *bp, VertexTexCoord_t *tp, int size = 4);
        virtual bool initGridShaders(const QString vertex_fixed, const QString vertex_rotate, const QString fragment);
index 38bfefc..9060e01 100644 (file)
 
 GLDraw_ES_2::GLDraw_ES_2(GLDrawClass *parent, USING_FLAGS *p, CSP_Logger *logger, EMU_TEMPLATE *emu) : GLDraw_Tmpl(parent, p, logger, emu)
 {
-       uTmpTextureID = 0;
-       
-       grids_shader = NULL;
-       
-       main_pass = NULL;
-       std_pass = NULL;
-       ntsc_pass1 = NULL;
-       ntsc_pass2 = NULL;
-       grids_horizonal_buffer = NULL;
-       grids_horizonal_vertex = NULL;
-       
-       grids_vertical_buffer = NULL;
-       grids_vertical_vertex = NULL;
        ringing_phase = 0.0f;
 #if defined(__LITTLE_ENDIAN__)
        swap_byteorder = true;
index 1c5e661..03969da 100644 (file)
@@ -29,82 +29,7 @@ class DLL_PREFIX GLDraw_ES_2 : public GLDraw_Tmpl
        Q_OBJECT
 private:
        QOpenGLFunctions *extfunc;
-       float ringing_phase;
 protected:
-       const float luma_filter[24 + 1] = {
-               -0.000012020,
-               -0.000022146,
-               -0.000013155,
-               -0.000012020,
-               -0.000049979,
-               -0.000113940,
-               -0.000122150,
-               -0.000005612,
-               0.000170516,
-               0.000237199,
-               0.000169640,
-               0.000285688,
-               0.000984574,
-               0.002018683,
-               0.002002275,
-               -0.000909882,
-               -0.007049081,
-               -0.013222860,
-               -0.012606931,
-               0.002460860,
-               0.035868225,
-               0.084016453,
-               0.135563500,
-               0.175261268,
-               0.190176552
-       };
-       const float chroma_filter[24 + 1] = {
-               -0.000118847,
-               -0.000271306,
-               -0.000502642,
-               -0.000930833,
-               -0.001451013,
-               -0.002064744,
-               -0.002700432,
-               -0.003241276,
-               -0.003524948,
-               -0.003350284,
-               -0.002491729,
-               -0.000721149,
-               0.002164659,
-               0.006313635,
-               0.011789103,
-               0.018545660,
-               0.026414396,
-               0.035100710,
-               0.044196567,
-               0.053207202,
-               0.061590275,
-               0.068803602,
-               0.074356193,
-               0.077856564,
-               0.079052396
-       };
-       const float rot0[4] =   {1, -0,  0, 1};
-       const float rot90[4] =  {0,  1, -1,  0};
-       const float rot180[4] = {-1, 0,  0, -1};
-       const float rot270[4] = {0, -1,  1, 0};
-
-       int gl_major_version;
-       int gl_minor_version;
-       GLScreenPack *main_pass;
-       GLScreenPack *std_pass;
-       GLScreenPack *ntsc_pass1;
-       GLScreenPack *ntsc_pass2;
-       GLScreenPack *bitmap_block;
-       
-       QOpenGLShaderProgram *grids_shader;
-       QOpenGLBuffer *grids_horizonal_buffer;
-       QOpenGLVertexArrayObject *grids_horizonal_vertex;
-       QOpenGLBuffer *grids_vertical_buffer;
-       QOpenGLVertexArrayObject *grids_vertical_vertex;
-
-       GLuint uTmpTextureID;
        bool swap_byteorder;
        QOpenGLPixelTransferOptions *TextureTransferParam;