Added an in-game key 'Alf-f' to dynamically switch between filtering

modes in the OpenGL SDL port.

Updated the documentation with the changes to the SDL commandline
arguments.  Rewrote the Linux requirements and installation
procedures.

Merged all todo stuff into the Todo.txt file, and removed the
redundant CyberstellaTodo.txt.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@221 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2003-11-30 03:36:51 +00:00
parent 4e8e332370
commit 8915cf50bf
6 changed files with 197 additions and 223 deletions

View File

@ -1,90 +0,0 @@
What needs to be done ASAP (will be done eventually):
- More Columns / Advanced sorting
- Make whole screen resizable
like this:
void CViewList::OnSize(UINT nType, int cx, int cy)
{
CFormView::OnSize(nType, cx, cy);
if ( m_listCtrl.m_hWnd ) m_listCtrl.MoveWindow (0, 0, cx, cy);
}
???????
- Add Fullscreen / Windowed mode - Alt-Enter
- Check Direct Draw implementation / upgrade to DX8
- Improve the DirectSound support
- Can you have two PC controllers connected?
- Make all dialog boxes resizable for any size text
Integrated into the core, but not necessarily active in Cyberstella:
- Check other versions command line params
- Check other versions keyboard mapping
- Add Screenshots - F12
- Add Pause - Pause
- Is the keyboard mapping correct (e.g., do both of the Joysticks
work via the keyboard)
- Provide custom keyboard / controller mapping (e.g., be able to
map joystick buttons to the 2600 Select/Reset as well as the
other 2600 functions...)
Future / never (depending on user enthusiasm and developer availability):
- Add a Sprite/Animation Editor
- Add a PF Editor
- Add a Sourcecode Editor
- Either Support DASM as frontend or integrate a 6507 Assembler
- Either Support Distella as frontend or integrate a 6507 Disassembler
- AVI/MPEG export
- WAV/MP3 export
- Client/Server networked play for up to 4 Computers via LAN/Internet
- Tracking Hiscores
- Record and Playback games - not as real movie, but by logging
Input/RAM/processor states in given intervals.
- Cheatcodes
- Improve frontend by adding snapshots, labels, manuals, etc.
Like KStella for Linux. (Suggestion from Brian Luttrull)
Suggestions from Glenn Saunders:
A couple things I'd like to see in a 2600 emulator that Brad was working on
in ActiveStella are scanline emulation and better controller mapping.
Scanline emulation is pretty easy. You just use a 256 color palette where
the scanline emulation lines are half the brightness as the regular palette
items the 2600 uses. I think with scanline emulation it looks a lot more
authentic and less sterile. That's what they did with Atari Arcade Hits.
Brad should have some of that code already. Maybe he'll give the code to
you.
As for controller mapping, are you using Direct Input at all? With Direct
Input you'd be able to support anything the OS does rather than, let's say,
directly polling the mouse port or the joystick port and expecting
something to be there. A lot of people (myself included) use USB
peripherals. Via a USB hub it might be possible to, for instance, connect
4 trackballs at once to use as paddles for Warlords. So Direct Input
automatically polls the system for controllers so you just ask Direct Input
what's available. You don't have to hardcode anything in there. You get
an inventory of what the system has, and from that you can present various
mapping choices.
P.S. The coolest part of ActiveStella, of course, was it being an ActiveX
control. So the GUI is not built into it. You could put it on a webpage
and drive it with Javascript or put it into a Director projector file or
write a skinnable UI container. It supported both a windowed and
fullscreen mode. Brad never got ActiveStella running stable. This was the
time when DirectX was in a lot of transition as well as operating systems
(98->2000). I think it's a little easier to write stable code that works
on XP/2000/Me these days.
He was also talking about a way to hook a scripting language into the
emulator that you could use almost like a software logic analyzer. You
could configure the script to trigger on certain events, like accesses to
various memory locations. This would have a lot of uses for debugging, of
course, but also provide the foundation for high score saving. If you knew
where the score was stored in each game, and where the level byte was, and
you knew the state of the machine when the game ends, then you could
trigger script that plucks the score out to save it into a global high
score table. At the time we were discussing it we were concerned that this
might slow the emulator down too much but today I think it wouldn't be an
issue. I'd really like to see this happen...

View File

@ -9,12 +9,14 @@
SSSS ttt eeeee llll llll aaaaa
===============================================================================
To Do List - October 2, 1998
To Do List - November 25, 2003
===============================================================================
If you would like to contribute to Stella's development then find something
on the list below and send email to Bradford Mott at bwmott@acm.org.
For all ports:
* Provide suggestions for improving Stella
* Provide suggestions for improving the Stella User's Manual
@ -22,18 +24,41 @@ on the list below and send email to Bradford Mott at bwmott@acm.org.
* Port Stella to other operating systems:
- Atari ST/TT/Falcon
- Mac (680x0)
- Mac (680x0, PowerPC)
- Others...
* Port the OSS stella-sound program, for Linux, to other versions of Unix
* Add a built-in game menu to the DOS version of Stella
* Find out if the Pro Audio Spectrum sound card is supported by the
DOS version of Stella (if not then add support for this card)
* Add support for real Atari controllers to the DOS version of Stella
(this will involve hardware as well as software)
* Add a debugger to Stella for game developers
For the Windows port of Stella (Cyberstella):
* More Columns / Advanced sorting for the GUI
* Make all dialog boxes resizable for any size text
* Improve the DirectSound support
* Add Fullscreen / Windowed mode - Alt-Enter
* Add a Direct3D version, so we have alpha-blending, hardware stretch, etc.
* Add commandline options that were in StellaX
* Add Screenshots in PNG format - F12
* The following features depend on developer availability
- Add a Sprite/Animation Editor
- Add a PF Editor
- Add a Sourcecode Editor
- Either Support DASM as frontend or integrate a 6507 Assembler
- Either Support Distella as frontend or integrate a 6507 Disassembler
- AVI/MPEG export
- WAV/MP3 export
- Client/Server networked play for up to 4 Computers via LAN/Internet
- Tracking Hiscores
- Record and Playback games - not as real movie, but by logging
Input/RAM/processor states in given intervals.
- Cheatcodes
- Improve frontend by adding snapshots, labels, manuals, etc.
Like KStella for Linux. (Suggestion from Brian Luttrull)

View File

@ -335,7 +335,7 @@
</ul>
<p>
<h2><b>Linux</b></h2>
<h2><b>Linux/UNIX</b></h2>
<p>The Linux version of Stella is designed to work on a Linux Workstation with
the following:</p>
@ -343,36 +343,18 @@
<ul>
<li>Linux Kernel 2.0.x
<li>X Window System
<li>GNU C++ compiler version 2.7.2 and the make utility are required for compiling the Stella source code; GNU C++ compiler version 2.8.1 or later is highly recommended
<li>GNU C++ compiler version 2.95 and the make utility are required for compiling the Stella source code; GNU C++ compiler version 3.2.x or later is highly recommended
<li>16 MB of RAM required; 32 MB highly recommended
<li>8 bit color graphics card required; 16 bit color graphics card highly recommended
<li>15 bit color minimum; 16 bit color graphics card highly recommended
<li>486/120 MHz required; 586/166 MHz highly recommended
<li>Open Sound System with a supported sound card required for sound
<li>SDL version 1.2.0 or greater
<li>ALSA or OSS drivers with a supported sound card required for sound; ALSA 0.9 highly recommended
<li>Joystick device driver version 1.2.x required for joystick support
<li>Joysticks or gamepads are highly recommended
<li>Mouse required for paddle emulation using the mouse
<li>Special adaptor required for using real Atari 2600 paddles
<li>SDL version requires SDL 1.2.0 or greater
<!-- <li>Special adaptor required for using real Atari 2600 paddles-->
</ul>
<p>
<h2><b>Unix</b></h2>
<p>The Unix version of Stella is designed to work on a Unix Workstation with
the following:</p>
<ul>
<li>Unix operating system
<li>X Window System
<li>GNU C++ compiler version 2.7.2 and the make utility are required; GNU C++ compiler version 2.8.1 is highly recommended
<li>32 MB of RAM; 64 MB highly recommended
<li>8 bit color display required; true color display highly recommended
<li>High performance CPU
<li>Open Sound System required for sound
<li>SDL version requires SDL 1.2.0 or greater
</ul>
<br><br>
<p><h1>
<a name="Installation">3. Installation</a></h1>
@ -421,65 +403,57 @@
<p>
<h2><b>Linux</b></h2>
<p>The Linux versions of Stella are distributed as a compressed tar file
containing the Linux executables as well as some other files. If these
pre-built executables do not seem to work on your system then download the
Unix source code distribution and build your own executables. You should
install the distribution as follows:</p>
<p>The Linux versions of Stella are distributed in both executable and source code
form, and in compressed tar files as well as (S)RPM's.
<ol>
<p>If you're using the executables from a compressed tar file, follow these instructions:
<ul>
<li>Extract files from the distribution:
<pre> tar -zxvf stella-<i>release</i>-linux-<i>arch</i>.tar.gz</pre></li>
<pre> tar -jxvf stella-<i>release</i>-linux-<i>arch</i>.tar.bz2</pre></li>
<li>Login as root and change directories to the distribution directory</li>
<li>Copy the executable to a directory that's in your path:
<pre> cp stella.<i>version</i> /usr/local/bin</pre></li>
<pre> cp stella.sdl /usr/local/bin</pre></li>
<li>Copy the supplied stella.pro properties file to the system-wide location:
<pre> cp stella.pro /etc</pre> or to your home directory:
<pre> mkdir ~/.stella<br> cp stella.pro ~/.stella</pre></li>
</ol>
</ul>
<p>If you have a joystick driver installed, such as <i>joystick-1.2.13.tar.gz</i>,
you can play games using joysticks. For additional information about the Linux
joystick driver see the following web site:
<a href="http://atrey.karlin.mff.cuni.cz/~vojtech/input">
Linux Input Drivers</a>.</p>
<p>
<h2><b>Unix</b></h2>
<p>The Unix version of Stella is distributed as a compressed tar file
containing the C++ source code as well as some other files. The source code
can be compiled under most Unix operating systems as well as DOS. The most recent
Unix code was developed with the GNU C++ compiler version 3.2, however, it should
compile with other C++ compilers. The DOS port was developed with DJGPP using
GNU C++ version 3.0.4. You should install the distribution as follows:</p>
<ol>
<p>If you're compiling the source from a compressed tar file, follow these instructions:
<ul>
<li>Extract files from the distribution:
<pre> tar -zxvf stella-release-src.tar.gz</pre></li>
<pre> tar -jxvf stella-release-src.tar.bz2</pre></li>
<li>Change directories to the stella-<i>release</i>/src/build directory</li>
<li>Edit the <b>makefile</b> to meet your needs</li>
<li>Type <b>make</b> and follow the on screen instructions to build the
preferred <b>stella.<i>version</i></b> executable</li>
<li>Build the executable with the following command:
<pre> make linux-sdl</pre></li>
<li>Copy the executable to a directory that's in your path:
<pre> cp stella.<i>version</i> /usr/local/bin</pre></li>
<pre> cp stella.sdl /usr/local/bin</pre></li>
<li>Copy the supplied stella.pro properties file to the system-wide location:
<pre> cp stella.pro /etc</pre> or to your home directory:
<pre> mkdir ~/.stella<br> cp stella.pro ~/.stella</pre></li>
</ol>
</ul>
<p>If you're using the binary RPM's or source SRPM's, consult your distribution on
how to proceed.</p>
<p>If you have a supported joystick and driver installed,
you can play games using joysticks. For additional information about the Linux
joystick driver see the following web site:
<a href="http://atrey.karlin.mff.cuni.cz/~vojtech/input">
Linux Input Drivers</a>.</p>
<p>Currently, sound is supported using the ALSA v0.9 API (-sound alsa), the Open Sound
System or OSS emulation under ALSA (-sound oss), or SDL (-sound sdl). As of this time,
the X11 version cannot use SDL sound. Sound has been tested and is known to work under
Linux and BSDI. For additional information on OSS or ALSA see the following web sites:</p>
System or OSS emulation under ALSA (-sound oss), or SDL (-sound sdl). Sound has been
tested and is known to work under Linux and BSDI. For additional information on
OSS or ALSA see the following web sites:</p>
<p><a href="http://www.4front-tech.com">4Front Technologies (OSS)</a><br>
<a href="http://www.alsa-project.org">Advanced Linux Sound Architecture (ALSA)</a>
@ -633,16 +607,15 @@
<p>
<h2><b>Linux and Unix</b></h2>
<p>The Unix version of Stella uses command line arguments to specify the game
<p>The Linux version of Stella uses command line arguments to specify the game
you'd like to play as well as other options. To see the list of available
arguments, simply run stella without any options or filename. To run Stella
use a command line of the following format:</p>
<pre> stella.<i>version</i> [options ...] filename.bin</pre>
<pre> stella.sdl [options ...] filename.bin</pre>
<p><b>Version</b> is either x11 or sdl, depending on which version you compiled/installed.</p>
<p><b>Options</b> (0 indicates false, 1 indicates true, others are self-explanatory)</p>
<p><b>Options</b> (0 indicates false, 1 indicates true, others are self-explanatory)
The words 'true' and 'false' can also be used.</p>
<table BORDER=2>
<tr>
@ -651,94 +624,108 @@
</tr>
<tr>
<td><pre>-display &lt;display&gt;</pre></td>
<td>Connect to the designated X display (<i>X11 version only</i>)</td>
<td><pre>-video &lt;soft|gl&gt;</pre></td>
<td>Use SDL software or OpenGL mode.</td>
</tr>
<tr>
<td><pre>-fps &lt;number&gt;</pre></td>
<td>Display the given number of frames per second</td>
<td><pre>-gl_filter &lt;nearest|linear&gt;</pre></td>
<td>Use GL_NEAREST or GL_LINEAR filtering. GL_NEAREST results in a scaled,
pixelated image, while GL_LINEAR introduces blurring.</td>
</tr>
<tr>
<td><pre>-owncmap &lt;0|1&gt;</pre></td>
<td>Install a private colormap</td>
<td><pre>-gl_aspect &lt;number&gt;</pre></td>
<td>Specify the aspect ratio of the window. Normal TV mode would be 4:3,
so you would specify 1.3333. But since many video modes do not use
square pixels, you may have to try different values. I find 1.6
gives the most authentic look.</td>
</tr>
<tr>
<td><pre>-sound &lt;0|alsa|oss|sdl&gt;</pre></td>
<td>Disable sound entirely, or use the given backend.</td>
</tr>
<tr>
<td><pre>-framerate &lt;number&gt;</pre></td>
<td>Display the given number of frames per second.</td>
</tr>
<tr>
<td><pre>-zoom &lt;size&gt;</pre></td>
<td>Makes window be 'size' times normal (1 - 4)</td>
<td>Makes window be 'size' times normal.</td>
</tr>
<tr>
<td><pre>-fullscreen &lt;0|1&gt;</pre></td>
<td>Play the game in fullscreen mode (<i>SDL version only</i>)</td>
<td>Play the game in fullscreen mode.</td>
</tr>
<tr>
<td><pre>-grabmouse &lt;0|1&gt;</pre></td>
<td>Keeps the mouse in the game window</td>
<td>Keeps the mouse in the game window.</td>
</tr>
<tr>
<td><pre>-hidecursor &lt;0|1&gt;</pre></td>
<td>Hides the mouse cursor in the game window</td>
</tr>
<tr>
<td><pre>-center &lt;0|1&gt;</pre></td>
<td>Centers the game window onscreen</td>
<td>Hides the mouse cursor in the game window.</td>
</tr>
<tr>
<td><pre>-volume &lt;number&gt;</pre></td>
<td>Set the volume (0 - 100). Use -1 to completely disable
changing the volume</td>
changing the volume.</td>
</tr>
<tr>
<td><pre>-paddle &lt;0|1|2|3|real&gt;</pre></td>
<td>Indicates which paddle the mouse should emulate or that real Atari
2600 paddles are being used (defaults to paddle 0)</td>
2600 paddles are being used (defaults to paddle 0).</td>
</tr>
<tr>
<td><pre>-joyleft &lt;number&gt;</pre></td>
<td>The joystick number representing the left controller.</td>
</tr>
<tr>
<td><pre>-joyright &lt;number&gt;</pre></td>
<td>The joystick number representing the right controller.</td>
</tr>
<tr>
<td><pre>-altpro &lt;props file&gt;</pre></td>
<td>Use the given properties file instead of stella.pro.</td>
</tr>
<tr>
<td><pre>-showinfo &lt;0|1&gt;</pre></td>
<td>Shows some game info while the emulator is running</td>
<td>Shows some game info.</td>
</tr>
<tr>
<td><pre>-accurate &lt;0|1&gt;</pre></td>
<td>Accurate game timing (uses more CPU).</td>
</tr>
<tr>
<td><pre>-ssdir &lt;path&gt;</pre></td>
<td>The directory to save snapshot files to (<i>If SNAPSHOT support is
included</i>)</td>
<td>The directory to save snapshot files to.</td>
</tr>
<tr>
<td><pre>-ssname &lt;name&gt;</pre></td>
<td>How to name the snapshot (romname or md5sum) (<i>If SNAPSHOT support is
included</i>)</td>
<td><pre>-ssname &lt;romname|md5sum&gt;</pre></td>
<td>How to name the snapshot. Option 'romname' will use the filename
provided in stella.pro, while 'md5sum' will use the calculated
MD5 sum of the rom.</td>
</tr>
<tr>
<td><pre>-sssingle &lt;0|1&gt;</pre></td>
<td>Generate single snapshot instead of many (<i>If SNAPSHOT support is
included</i>)</td>
<td>Generate single snapshot instead of many.</td>
</tr>
<tr>
<td><pre>-pro &lt;props file&gt;</pre></td>
<td>Use the given properties file instead of stella.pro</td>
</tr>
<tr>
<td><pre>-accurate &lt;0|1&gt;</pre></td>
<td>Use accurate game timing (and more CPU), or less accurate timing (and
less CPU).</td>
</tr>
<tr>
<td><pre>-sound &lt;0|alsa|oss|sdl&gt;</pre></td>
<td>Disable sound entirely, or use the given backend (<i>depending on
support included</i>).</td>
</tr>
<tr>
<td><pre>-Dwidth &lt;number&gt;</pre></td>
<td>Sets the "Display.Width" property. Its value must be in the range specified
@ -769,7 +756,7 @@
included</i>)</td>
</tr>
<tr>
<td><pre>-Dmerge &lt;0|1&gt;</pre></td>
<td><pre>-mergeprops &lt;0|1&gt;</pre></td>
<td>Save the current properties to a separate file in the users' home directory,
or merge them into the users' stella.pro file
(<i>If DEVELOPER support is included</i>)</td>
@ -816,8 +803,8 @@
</tr>
<tr>
<td>-display localhost</td>
<td>display = localhost</td>
<td>-video gl</td>
<td>video = gl</td>
</tr>
<tr>
@ -827,7 +814,7 @@
<tr>
<td>-showinfo 1</td>
<td>showinfo = 1</td>
<td>showinfo = 1 (or showinfo = true)</td>
</tr>
</table>
@ -842,7 +829,7 @@
keyboard as shown in the following tables.</p>
<p>As of Stella 1.4, most of these events can be remapped to other keys on your keyboard
or buttons on your joystick. The tables below are the default settings.</p>
or buttons on your joystick. The tables below show the default settings.</p>
<p><b>Console Controls</b></p>
@ -854,7 +841,7 @@
<tr>
<td>Exit emulator/submenu</td>
<td>Escape</td>
<td>Escape (Alt-F4 for Windows)</td>
</tr>
<tr>
@ -918,7 +905,7 @@
</tr>
<tr>
<td>Save snapshot (if supported)</td>
<td>Save PNG snapshot</td>
<td>F12</td>
</tr>
@ -1419,6 +1406,12 @@
<td>Alt + Enter</td>
<td>SDL</td>
</tr>
<tr>
<td>Toggle OpenGL filtering modes</td>
<td>Alt + f</td>
<td>SDL</td>
</tr>
</table>
<br><br><br>

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: FrameBufferGL.cxx,v 1.7 2003-11-23 20:54:59 stephena Exp $
// $Id: FrameBufferGL.cxx,v 1.8 2003-11-30 03:36:51 stephena Exp $
//============================================================================
#include <SDL.h>
@ -29,7 +29,8 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FrameBufferGL::FrameBufferGL()
: myTexture(0)
: myTexture(0),
myFilterParam(GL_NEAREST)
{
}
@ -365,16 +366,15 @@ bool FrameBufferGL::createTextures()
// Create an OpenGL texture from the SDL texture
bool showinfo = myConsole->settings().getBool("showinfo");
string filter = myConsole->settings().getString("gl_filter");
GLint param = GL_NEAREST;
if(filter == "linear")
{
param = GL_LINEAR;
myFilterParam = GL_LINEAR;
if(showinfo)
cout << "Using GL_LINEAR filtering.\n\n";
}
else if(filter == "nearest")
{
param = GL_NEAREST;
myFilterParam = GL_NEAREST;
if(showinfo)
cout << "Using GL_NEAREST filtering.\n\n";
}
@ -383,8 +383,8 @@ bool FrameBufferGL::createTextures()
glBindTexture(GL_TEXTURE_2D, myTextureID);
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_MAG_FILTER, param);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, param);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, myFilterParam);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, myFilterParam);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, w, h, 0, GL_RGB, GL_UNSIGNED_SHORT_5_6_5,
myTexture->pixels);
@ -430,8 +430,8 @@ bool FrameBufferGL::createTextures()
glBindTexture(GL_TEXTURE_2D, myFontTextureID[c]);
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_MAG_FILTER, param);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, param);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, myFilterParam);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, myFilterParam);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 8, 8, 0, GL_RGBA, GL_UNSIGNED_BYTE,
fontTexture->pixels);
}
@ -440,3 +440,36 @@ bool FrameBufferGL::createTextures()
return true;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void FrameBufferGL::toggleFilter()
{
if(myFilterParam == GL_NEAREST)
{
myFilterParam = GL_LINEAR;
myConsole->settings().setString("gl_filter", "linear");
}
else
{
myFilterParam = GL_NEAREST;
myConsole->settings().setString("gl_filter", "nearest");
}
glBindTexture(GL_TEXTURE_2D, myTextureID);
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_MAG_FILTER, myFilterParam);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, myFilterParam);
for(uInt32 i =0; i < 256; i++)
{
glBindTexture(GL_TEXTURE_2D, myFontTextureID[i]);
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_MAG_FILTER, myFilterParam);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, myFilterParam);
}
// The filtering has changed, so redraw the entire screen
theRedrawEntireFrameIndicator = true;
}

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: FrameBufferGL.hxx,v 1.5 2003-11-22 20:13:11 stephena Exp $
// $Id: FrameBufferGL.hxx,v 1.6 2003-11-30 03:36:51 stephena Exp $
//============================================================================
#ifndef FRAMEBUFFER_GL_HXX
@ -34,7 +34,7 @@ class MediaSource;
This class implements an SDL OpenGL framebuffer.
@author Stephen Anthony
@version $Id: FrameBufferGL.hxx,v 1.5 2003-11-22 20:13:11 stephena Exp $
@version $Id: FrameBufferGL.hxx,v 1.6 2003-11-30 03:36:51 stephena Exp $
*/
class FrameBufferGL : public FrameBufferSDL
{
@ -49,6 +49,12 @@ class FrameBufferGL : public FrameBufferSDL
*/
virtual ~FrameBufferGL();
/**
Switches between the two filtering options in OpenGL.
Currently, these are GL_NEAREST and GL_LINEAR.
*/
void toggleFilter();
//////////////////////////////////////////////////////////////////////
// The following methods are derived from FrameBufferSDL.hxx
//////////////////////////////////////////////////////////////////////
@ -149,6 +155,9 @@ class FrameBufferGL : public FrameBufferSDL
// The OpenGL font texture handles (one for each character)
GLuint myFontTextureID[256];
// The texture filtering to use
GLint myFilterParam;
};
#endif

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: mainSDL.cxx,v 1.61 2003-11-23 20:54:59 stephena Exp $
// $Id: mainSDL.cxx,v 1.62 2003-11-30 03:36:51 stephena Exp $
//============================================================================
#include <fstream>
@ -338,6 +338,10 @@ void handleEvents()
theDisplay->resize(-1);
else if(key == SDLK_RETURN)
theDisplay->toggleFullscreen();
#ifdef DISPLAY_OPENGL
else if(key == SDLK_f)
((FrameBufferGL*)theDisplay)->toggleFilter();
#endif
#ifdef DEVELOPER_SUPPORT
else if(key == SDLK_END) // Alt-End increases XStart
{