No description
Find a file
Sam Lantinga ba096ad053 Date: Sun, 22 Mar 2009 12:52:29 +0000
From: Luke Benstead
Subject: OpenGL 3.0 Context Creation

I've attached a patch which implements OpenGL 3.x context creation on
the latest SVN. I've added two options to SDL_GL_SetAttribute, these
are SDL_GL_CONTEXT_MAJOR_VERSION and SDL_GL_CONTEXT_MINOR_VERSION.
These default to 2 and 1 respectively. If the major version is less
than 3 then the current context creation method is used, otherwise the
appropriate new context creation function is called (depending on the
platform).

Sample code:

    if (SDL_Init(SDL_INIT_VIDEO) != 0) {
        printf("Unable to initialize SDL: %s\n", SDL_GetError());
        return 1;
    }

    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); //Without these 2 lines, SDL will create a GL 2.x context
    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);

    SDL_Surface* screen = SDL_SetVideoMode( 640, 480, 16, SDL_OPENGL | SDL_FULLSCREEN );


I've implemented context creation on both Win32 and X and run basic
tests on both. This patch doesn't provide access to all the options
allowed by the new context creation (e.g. shared contexts, forward
compatible contexts) but they can be added pretty easily.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403567
2009-03-24 10:43:53 +00:00
build-scripts Updated config.guess and config.sub 2009-03-04 09:35:32 +00:00
docs Merged revision 3472 from SDL 1.2, fixing bug #493 2007-12-29 03:25:11 +00:00
include Date: Sun, 22 Mar 2009 12:52:29 +0000 2009-03-24 10:43:53 +00:00
src Date: Sun, 22 Mar 2009 12:52:29 +0000 2009-03-24 10:43:53 +00:00
test Date: Mon, 23 Mar 2009 09:17:24 +0200 2009-03-24 10:33:12 +00:00
VisualC Added missing files 2009-02-19 04:03:05 +00:00
VisualCE Unpacked project archives to get individual file history in subversion 2007-07-21 17:09:01 +00:00
Xcode Updated project with new source files 2008-12-25 04:56:44 +00:00
XCodeiPhoneOS Fixed iPhone demos 2009-03-17 03:56:21 +00:00
.indent.pro SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
acinclude.m4 Updated libtool from version 1.5.22 to 2.2.6a, so it works on current QNX 2009-03-04 08:57:30 +00:00
autogen.sh Added yet another variant of autoconf to the list 2006-05-15 06:30:38 +00:00
Borland.html
Borland.zip
BUGS Merged r2977:2978 from branches/SDL-1.2: BUGS file cutdown. 2007-02-14 10:41:55 +00:00
configure.in Date: Mon, 23 Mar 2009 09:17:24 +0200 2009-03-24 10:33:12 +00:00
COPYING This library is now available under the LGPL 2.1, the major change of which 2006-01-30 14:27:56 +00:00
CREDITS Fixed OpenGL state issue reported by Dmytro Bogovych 2009-01-14 06:53:03 +00:00
docs.html SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
INSTALL
Makefile.dc SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
Makefile.ds NDS compiles again, but may not yet work. Sprite support has been removed for the time being while it is re-worked. 2009-02-18 00:33:31 +00:00
Makefile.in Reverted dangerous change that could remove /bin/sh :) 2009-03-06 05:48:52 +00:00
Makefile.minimal Final merge of Google Summer of Code 2008 work... 2008-08-25 09:55:03 +00:00
NOTES Added notes on the next steps for SDL 1.3 2007-08-16 21:43:19 +00:00
README Removed AmigaOS code for 1.3 branch. 2006-10-29 04:09:17 +00:00
README-SDL.txt
README.BeOS Added a reminder on where to put libSDL.so 2006-02-18 07:21:42 +00:00
README.CVS Info on Subversion repository access. 2006-04-26 23:17:39 +00:00
README.DC *** empty log message *** 2006-03-02 13:26:24 +00:00
README.DirectFB DirectFB cleanups & simple window manager 2009-01-11 23:49:23 +00:00
README.iphoneos Final merge of Google Summer of Code 2008 work... 2008-10-04 06:46:59 +00:00
README.MacOSX Added information about gcc-fat.sh to README.MacOSX 2006-05-16 07:26:48 +00:00
README.MiNT Add teamtap support 2006-09-16 17:13:41 +00:00
README.NanoX
README.OS2 SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
README.Porting Added the dummy audio driver to instructions 2006-07-26 03:57:45 +00:00
README.QNX Date: Mon, 23 Mar 2009 09:17:24 +0200 2009-03-24 10:33:12 +00:00
README.RISCOS Update from Alan Buckley 2006-02-06 08:47:44 +00:00
README.SVN Testing Subversion commit RSS feed. 2008-07-05 18:25:28 +00:00
README.Watcom ------- Comment #5 From Marc Peter 2006-06-25 18:03 [reply] ------- 2006-06-26 01:33:53 +00:00
README.WinCE Updated Windows CE/PocketPC support...adds GAPI driver, landscape mode, 2006-01-19 08:43:00 +00:00
README.wscons
sdl-config.in Merged r3002:3003 from branches/SDL-1.2: libdir fix in sdl-config and SDL.spec 2007-04-01 03:28:36 +00:00
sdl.m4 Merged fix for bug #542 from SDL 1.2 2008-01-24 15:51:52 +00:00
sdl.pc.in Merged fix for bug #531 from SDL 1.2 revision 3511 2008-01-01 15:26:11 +00:00
SDL.spec.in Merged r3002:3003 from branches/SDL-1.2: libdir fix in sdl-config and SDL.spec 2007-04-01 03:28:36 +00:00
TODO Missing API function 2009-02-27 09:39:39 +00:00
UNDER_CONSTRUCTION.txt SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
VisualC.html Removed newline, to make sure revision control post-commit hook is working. 2008-12-01 09:45:01 +00:00
Watcom-OS2.zip SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
Watcom-Win32.zip ------- Comment #5 From Marc Peter 2006-06-25 18:03 [reply] ------- 2006-06-26 01:33:53 +00:00
WhatsNew SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00

                         Simple DirectMedia Layer

                                  (SDL)

                                Version 1.2

---
http://www.libsdl.org/

This is the Simple DirectMedia Layer, a general API that provides low
level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL,
and 2D framebuffer across multiple platforms.

The current version supports Linux, Windows, Windows CE, BeOS, MacOS,
Mac OS X, FreeBSD, NetBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX.
The code contains support for Dreamcast, Atari, AIX, OSF/Tru64,
RISC OS, SymbianOS, and OS/2, but these are not officially supported.

SDL is written in C, but works with C++ natively, and has bindings to
several other languages, including Ada, C#, Eiffel, Erlang, Euphoria,
Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP,
Pike, Pliant, Python, Ruby, and Smalltalk.

This library is distributed under GNU LGPL version 2, which can be
found in the file  "COPYING".  This license allows you to use SDL
freely in commercial programs as long as you link with the dynamic
library.

The best way to learn how to use SDL is to check out the header files in
the "include" subdirectory and the programs in the "test" subdirectory.
The header files and test programs are well commented and always up to date.
More documentation is available in HTML format in "docs/index.html", and
a documentation wiki is available online at:
	http://www.libsdl.org/cgi/docwiki.cgi

The test programs in the "test" subdirectory are in the public domain.

Frequently asked questions are answered online:
	http://www.libsdl.org/faq.php

If you need help with the library, or just want to discuss SDL related
issues, you can join the developers mailing list:
	http://www.libsdl.org/mailing-list.php

Enjoy!
	Sam Lantinga				(slouken@libsdl.org)