sdl

ffmpeg中关于ffplay部分的概要分析-2

亡梦爱人 提交于 2019-11-27 06:53:17
全局变量options[] 包含了所支持的所有的命令行选项,可以用来确认所输入的变 量是否能对应到options[]中,若解析正确则将得到的值赋予给options[]中所提前指定的变量中,比如video_disable和audio_disable的值就来自于命令行。 函数parse_options()会对命令行中输入的参数进行解析,解析的依据就是全局变量 options[]。 函数SDL_Init(flags),其中flags=SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER,猜测是初始化SDL中对应的模块,比如Video,Audio等。 函数: SDL_EventState(SDL_ACTIVEEVENT, SDL_IGNORE);     SDL_EventState(SDL_SYSWMEVENT, SDL_IGNORE);    SDL_EventState(SDL_USEREVENT, SDL_IGNORE);     该函数的作用 意思 是当对应的事件发生时,忽略该事件。   4. 函数SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL)设定按下按键的时长以及连续按下键的间隔。   5. 全局变量VideoState{

unresolved external

不羁岁月 提交于 2019-11-27 06:52:08
问题 I have an unresolved external symbol error that's driving me nuts. In short, I have a wrapper class for SDL_Surfaces ('DgSurface') and a class to load and store DgSurfaces ('DgSurfaceList'). The link issue arises when trying to include the DgSurfaceList files in my project. Here are my classes: The header file "DgSurface.h" contains the DgSurface class declaration: #ifndef DGSURFACE_H #define DGSURFACE_H #include "SDL.h" #include <string> class DgSurface { public: //Constructor/destructor

Simply including SDL header causes linker error

被刻印的时光 ゝ 提交于 2019-11-27 06:44:59
问题 I was going to migrate my game from glut to sdl. It's working perfectly in glut but I wanted to use some sdl features. So I go into my project properties, under the targets header I click the program that will be compiled, build phases, link binary with libraries, add SDL.framework The exact same as I have done for OpenGL.framework and GLUT.framework However when I add: #include <SDL/SDL.h> it comes up with a linker error when I try to build: Undefined symbols for architecture x86_64: "_main"

SDL2.0 Alternative for SDL_Overlay

人盡茶涼 提交于 2019-11-27 05:37:58
问题 So I've been trying to go through the following tutorial on ffmpeg: http://dranger.com/ffmpeg/tutorial02.html However, when I try to compile using gcc, I get the following output: root:/Users/mbrodeur/Downloads/HACKATHON CONTENT/Tutorials-> gcc -o tutorial02 tutorial02.c -lavutil -lavformat -lavcodec -lz -lavutil -lm -lswscale -D_THREAD_SAFE -lSDL2 tutorial02.c: In function ‘main’: tutorial02.c:41: error: ‘SDL_Overlay’ undeclared (first use in this function) tutorial02.c:41: error: (Each

Haskell library for 2D drawing [closed]

爱⌒轻易说出口 提交于 2019-11-27 05:00:21
问题 I basically want to create a full screen window and draw text on it in different colors and sizes (and also update the screen). I've used pygame for this in python and I'm looking for a similar library (should be fairly easy to use). +1 if it handles input too... 回答1: If you're looking for a specialized game library, you have a number of options that you can find here. FunGEn is probably your best option out of those libraries. However, your question seems to suggest a game library would be a

Android原生(Native)C开发

谁说胖子不能爱 提交于 2019-11-27 04:43:42
转载: Android原生(Native)C开发之一 环境搭建篇 转载: Android原生(Native)C开发之二 framebuffer篇 转载: Android原生(Native)C开发之三 鼠标事件篇(捕鼠记) 转载: Android原生(Native)C开发之四 SDL移植笔记 转载: Android原生(Native)C开发之五 zlib移植笔记 转载: Android原生(Native)C开发之六 libpng移植笔记 转载: Android原生(Native)C开发之一 环境搭建篇 2009年02月25日,星期三 Android是基于Linux的操作系统,处理器是ARM的,所以要在Linux或Windows等x86系统上编译Android能运行的程序,你需要一个交叉编译器。 在Linux下面,你可以自已编译一个交叉编译环境,但Windows下面,就比较复杂(也可以在cygwin中编译一个),但你可以选择下载一个现成的交叉编译环境: http://www.codesourcery.com/gnu_toolchains/arm/download.html Windows: http://www.codesourcery.com/gnu_toolchains/arm/portal/package3400/public/arm-none-linux-gnueabi/arm

How to use SDL2 and SDL_image with cmake

廉价感情. 提交于 2019-11-27 03:58:33
I'm looking for the simplest way to compile a c++ program using SDL2 and SDL_image with cmake. Here is my best attempt, after hours of searching: CMakeLists.txt project(shooter-cmake2) cmake_minimum_required(VERSION 2.8) set(SOURCES shooter.cpp classes.cpp utils.cpp ) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") add_executable(${PROJECT_NAME} ${SOURCES}) INCLUDE(FindPkgConfig) PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2) PKG_SEARCH_MODULE(SDL2_image REQUIRED sdl2_image) INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS} ${SDL2IMAGE_INCLUDE_DIR}) TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${SDL2_LIBRARIES} $

SDL window does not show

限于喜欢 提交于 2019-11-27 02:54:29
问题 This is my code: #include <iostream> #include <SDL2/SDL.h> int main(int argc, const char * argv[]) { SDL_Init(SDL_INIT_VIDEO); SDL_Window *_window; _window = SDL_CreateWindow("Game Engine", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 700, 500, SDL_WINDOW_RESIZABLE); SDL_Delay(20000); SDL_DestroyWindow(_window); SDL_Quit(); return 0; } Im working in Xcode. I've downloaded SDL2 and imported the library to the projects build phases. I've tested that the SDL2 works correctly. The problem is

How to statically compile an SDL game on Windows

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 00:23:58
问题 I have been trying to produce a statically linked "single binary" version of my game for windows. I want to link with sdl, sdl_image and sdl_mixer which in turn pull in a few support libraries. Unfortunately I haven't found a way to get them all to compile and link using cygwin/mingw/gcc. As far as I can tell all existing public versions are only shared libraries / dlls. Please note that I'm not talking about licencing here. The source will be open thus the GPL/LGPLness of sdl is not relevant

Xcode 5 crashes when running an app with SDL 2

大城市里の小女人 提交于 2019-11-27 00:22:07
问题 I tried to follow these two tutorials (or the applicable parts of them, due to version differences) to install SDL 2.0.2 to work with Xcode 5.1: Tutorial 1 Tutorial 2 Running any program with the SDL 2 framework linked causes Xcode to crash with the following problem details: Process: Xcode [1787] Path: /Applications/Xcode.app/Contents/MacOS/Xcode Identifier: com.apple.dt.Xcode Version: 5.1 (5084) Build Info: IDEFrameworks-5084000000000000~21 App Item ID: 497799835 App External ID: 444172641