Changeset aea4f8b in git


Ignore:
Timestamp:
21/09/11 03:29:44 (8 years ago)
Author:
Olly Betts <olly@…>
Branches:
add-show-splays, line_contents, master, stereo, svn/github/master, svn/origin/master, svn/tags/1.2.1, svn/tags/1.2.2, svn/tags/1.2.3, svn/tags/1.2.4, svn/tags/1.2.5, svn/trunk, travis-osx
Children:
1b1aaf4
Parents:
d1870ef7
Message:

src/gfxcore.cc,src/gla-gl.cc,src/gla.h: Eliminate glReadPixels() call
from src/gfxcore.cc.

git-svn-id: file:///home/survex-svn/survex/trunk@3739 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    rd1870ef7 raea4f8b  
     1Wed Sep 21 02:29:21 GMT 2011  Olly Betts <olly@survex.com>
     2
     3        * src/gfxcore.cc,src/gla-gl.cc,src/gla.h: Eliminate glReadPixels() call
     4          from src/gfxcore.cc.
     5
    16Wed Sep 21 02:28:21 GMT 2011  Olly Betts <olly@survex.com>
    27
  • src/gfxcore.cc

    rd1870ef7 raea4f8b  
    12791279    double t;
    12801280    if (movie) {
    1281         // FIXME: this glReadPixels call should be in gla-gl.cc
    1282         glReadPixels(0, 0, movie->GetWidth(), movie->GetHeight(), GL_RGB,
    1283                      GL_UNSIGNED_BYTE, (GLvoid *)movie->GetBuffer());
     1281        ReadPixels(movie->GetWidth(), movie->GetHeight(), movie->GetBuffer());
    12841282        movie->AddFrame();
    12851283        t = 1.0 / 25.0; // 25 frames per second
  • src/gla-gl.cc

    rd1870ef7 raea4f8b  
    55//
    66//  Copyright (C) 2002-2003,2005 Mark R. Shinwell
    7 //  Copyright (C) 2003,2004,2005,2006,2007,2010 Olly Betts
     7//  Copyright (C) 2003,2004,2005,2006,2007,2010,2011 Olly Betts
    88//
    99//  This program is free software; you can redistribute it and/or modify
     
    15121512    return (memcmp(pixels, target, sizeof(pixels)) == 0);
    15131513}
     1514
     1515void GLACanvas::ReadPixels(int width, int height, unsigned char * buf) const
     1516{
     1517    glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, (GLvoid *)buf);
     1518}
  • src/gla.h

    rd1870ef7 raea4f8b  
    55//
    66//  Copyright (C) 2002 Mark R. Shinwell.
    7 //  Copyright (C) 2003,2004,2005,2006,2007 Olly Betts
     7//  Copyright (C) 2003,2004,2005,2006,2007,2011 Olly Betts
    88//
    99//  This program is free software; you can redistribute it and/or modify
     
    259259
    260260    bool SaveScreenshot(const wxString & fnm, int type) const;
    261 };
     261
     262    void ReadPixels(int width, int height, unsigned char * buf) const;
     263};
Note: See TracChangeset for help on using the changeset viewer.