Giter Club home page Giter Club logo

sdl's Introduction

                         Simple DirectMedia Layer

                                  (SDL)

                                Version 2.0

---
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 Windows, Windows CE, Mac OS X, Linux, FreeBSD,
NetBSD, OpenBSD, BSD/OS, Solaris, iOS, and Android. The code contains
support for other operating systems but those 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,
Go, Guile, Haskell, Java, Lisp, Lua, ML, Objective C, Pascal, Perl, PHP,
Pike, Pliant, Python, Ruby, and Smalltalk.

This library is distributed under the zlib license, which can be found
in the file "COPYING".

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 and FAQs are available online at:
	http://wiki.libsdl.org/

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				([email protected])

sdl's People

Contributors

3v1n0 avatar airlanggacahya avatar antifinidictor avatar bieh avatar bobbens avatar davidludwig avatar ferzkopp avatar gabomdq avatar icculus avatar jimtla avatar jjgod avatar jorgenpt avatar k0zmo avatar keestux avatar kenrogoway avatar llmike avatar mkauppila avatar nemo157 avatar pendletonrc avatar pmandin avatar slouken avatar stopiccot avatar sunnyps avatar timangus avatar urkle avatar zenios avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sdl's Issues

Implement mouse cursor support

Some applications, like xbmc depend on the video backend to handle mouse cursors (namely, hiding them and setting custom ones). Without it they crash. It should be possible to support this in the wayland backend.

LGPL headers on some files...

Hey, Scott, we're looking to merge this into mainline SDL now. The guy that's merging it pointed out that there are LGPL headers on several files...they look like copy/pastes of headers that were on SDL 1.2, so it might not be a big deal, but we can't put this into SDL2 with those license headers. Would you mind if we removed them, so they fall under the zlib license with the rest of SDL2?

Mouse is not usable in xonotic

I was able to build darkplaces engine r11979 and run xonotic with it using this patch:

diff --git a/makefile.inc b/makefile.inc
index 72d1856..68f4bfa 100644
--- a/makefile.inc
+++ b/makefile.inc
@@ -25,13 +25,13 @@ CC?=gcc
 CPUOPTIMIZATIONS?=-fno-math-errno -ffinite-math-only -fno-rounding-math -fno-signaling-nans -fno-trapping-math
 # NOTE: *never* *ever* use the -ffast-math or -funsafe-math-optimizations flag

-SDL_CONFIG?=sdl-config
+SDL_CONFIG?=sdl2-config
 SDLCONFIG_UNIXCFLAGS?=`$(SDL_CONFIG) --cflags`
 SDLCONFIG_UNIXCFLAGS_X11?=
 SDLCONFIG_UNIXLIBS?=`$(SDL_CONFIG) --libs`
-SDLCONFIG_UNIXLIBS_X11?=-lX11
+SDLCONFIG_UNIXLIBS_X11?=-lGLESv2
 SDLCONFIG_UNIXSTATICLIBS?=`$(SDL_CONFIG) --static-libs`
-SDLCONFIG_UNIXSTATICLIBS_X11?=-lX11
+SDLCONFIG_UNIXSTATICLIBS_X11?=-lGLESv2
 SDLCONFIG_MACOSXCFLAGS=-I/Library/Frameworks/SDL.framework/Headers -I$(HOME)/Library/Frameworks/SDL.framework/Headers
 SDLCONFIG_MACOSXLIBS=-F$(HOME)/Library/Frameworks/ -framework SDL -framework Cocoa $(SDLCONFIG_MACOSXCFLAGS)
 SDLCONFIG_MACOSXSTATICLIBS=-F$(HOME)/Library/Frameworks/ -framework SDL -framework Cocoa $(SDLCONFIG_MACOSXCFLAGS)
@@ -171,7 +171,7 @@ OBJ_SDL= builddate.c sys_sdl.o vid_sdl.o thread_sdl.o $(OBJ_SND_COMMON) snd_sdl.


 # Compilation
-CFLAGS_COMMON=$(CFLAGS_MAKEDEP) $(CFLAGS_PRELOAD) $(CFLAGS_FS) $(CFLAGS_WARNINGS) $(CFLAGS_LIBZ) $(CFLAGS_LIBJPEG) $(CFLAGS_D3D) -D_FILE_OFFSET_BITS=64 -D__KERNEL_STRICT_NAMES
+CFLAGS_COMMON=$(CFLAGS_MAKEDEP) $(CFLAGS_PRELOAD) $(CFLAGS_FS) $(CFLAGS_WARNINGS) $(CFLAGS_LIBZ) $(CFLAGS_LIBJPEG) $(CFLAGS_D3D) -D_FILE_OFFSET_BITS=64 -D__KERNEL_STRICT_NAMES -DUSE_GLES2 -I/usr/include/SDL2 -D_REENTRANT
 CFLAGS_DEBUG=-ggdb
 CFLAGS_PROFILE=-g -pg -ggdb -fprofile-arcs
 CFLAGS_RELEASE=

Used kernel-3.9.9+mesa-9.1.4(r600g)+wayland-1.2.0+weston-1.2.0, xonotic works, but mouse is almost not usable and when i tried making screenshots, switching screens and windows i got black screen and was forced to reboot.
Not sure if it is libsdl2, mesa, wayland, kernel or darkplaces bug, but please try building and testing it.

P.S. screenshots:
http://i.imgur.com/cXphkzX.jpg
http://i.imgur.com/1Lw5dpM.jpg
wayland-screenshot

Implement GetSysWMInfo hook

SDL video backends have a GetSysWMInfo hook to expose window system specific structures to clients that might want to use them. We should expose the following in case clients want to use functionality which SDL does not provide a suitable abstraction for, eg:

  • wl_display
  • wl_shell_surface

Dispatch pending and flush events before polling.

Currently PumpEvents polls the fd to see if there is any more data to be read without blocking. If there is it calls _dispatch (), if not, it calls _dispatch_pending ().

However, there is a possible condition where new events in the output buffer might need to be sent to the compositor in order to get back the events that we need to continue. In that case, we really need to dispatch pending events, cause any new requests to be buffered up, flush the buffer and then poll, so that we'll know if we need to read any more events in. Otherwise they might come a little bit late.

update cmake

Current cmake build system does not know about wayland, please update it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.