this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Migrating wiki contents from Google Code

+159
+10
Downloads.md
··· 1 + # Downloads # 2 + 3 + The latest release of SDL\_gpu is version 0.10.0 (2/11/2015). You can get it here: 4 + > SDL 2.0: 5 + * [SDL2\_gpu 0.10.0, Windows - Visual Studio](https://sdl-gpu.googlecode.com/svn/builds/SDL2_gpu-0.10.0-msvc.zip) 6 + * [SDL2\_gpu 0.10.0, Windows - MinGW32](https://sdl-gpu.googlecode.com/svn/builds/SDL2_gpu-0.10.0-mingw32.zip) 7 + > SDL 1.2: 8 + * [SDL\_gpu 0.10.0, Windows - MinGW32](https://sdl-gpu.googlecode.com/svn/builds/SDL_gpu-0.10.0-mingw32.zip) 9 + 10 + For other builds, check the ['builds' directory](https://code.google.com/p/sdl-gpu/source/browse/#svn%2Fbuilds) in the repository.
+72
ImplementationNotes.md
··· 1 + # Introduction # 2 + 3 + This page contains notes that explain or argue the implementation details of the library. If you have anything to say about them, let us know! 4 + 5 + 6 + # Notes # 7 + 8 + Couldn't there be GPU\_BLEND\_NONE instead of GPU\_Image::use\_blending? 9 + > Yeah, that is what SDL2 does. However, I feel that the separation is a useful and intuitive convention. It separates "how" blending is done (blend mode) from "whether" it is done (use\_blending). To combine them would be to change the abstraction to "pixel transfer mode". 10 + 11 + Clearing new blank textures. 12 + > glClearTexImage() extension is very new, so not well supported. 13 + > Clearing via upload works but is a little slower. 14 + > > Allocate a zeroed array and grow it when more is needed. 15 + 16 + Rendering to intermediate buffer that has an odd dimension size will blur the result a little. I think the rule should be: If you want pixel-perfect, don't use odd sizes! 17 + 18 + GPU\_Init() sets an empty window caption. It's not a big deal to change after init by using target->context->window\_id, so adding stuff to SDL\_gpu to do it would just be unnecessary. Maybe GPU\_GetWindowID(). 19 + 20 + Making every shape able to be textured would mean either a lot of assumptions about the texture coordinates or else a few extra function arguments to specify the texture coordinates and number of vertices to use (which would also lead to ambiguity). The current functions are only untextured and their number of vertices is not specified (which makes shader attributes not work reliably with them). The best way to texture shapes is to write your own textured shape functions using GPU\_TriangleBatch(). 21 + 22 + Attributes 23 + 24 + > Don't try to use expanded (per-sprite) attributes for positions or texcoords... You would have 4 vertices on top of each other for each sprite. 25 + 26 + Shader blocks 27 + > Used to pass default shader variables (attributes and a uniform) to the shader. 28 + > Has 3 default attributes: position, color, texcoords. Has 1 default uniform: gpu\_ModelViewProjectionMatrix. These are handled by the blit buffer and flush. 29 + 30 + State contained in images: 31 + > Pixel descriptors 32 + > > width, height 33 + > > channels 34 + 35 + > Modulation color (GPU\_SetRGBA()) 36 + > Blending on/off (GPU\_SetBlending()) 37 + > Blend mode (GPU\_SetBlendMode()) 38 + 39 + State contained in render targets: 40 + > Camera transform (via matrix stack for GL 3+) 41 + > Virtual width and height 42 + > Framebuffer width and height (duplicated from image or window) 43 + > Clipping rect 44 + > Modulation color (GPU\_SetTargetRGBA()) 45 + 46 + State contained in context targets: 47 + > Current shader 48 + > Default shaders 49 + > Blit buffer 50 + > Window ID 51 + > Shape blending 52 + > Shape blend mode 53 + > Line thickness (GPU\_SetThickness()) 54 + > GL Context (SDL\_GLContext is just a void`*`) 55 + > Matrix stack 56 + 57 + State contained in renderer: 58 + > Renderer ID 59 + > Renderer tier 60 + > Renderer features 61 + > Current context target 62 + 63 + Windowless OpenGL context would be useful for triggering renderer init failure, but it gets messy and platform-specific. 64 + 65 + FlushBlitBuffer() uses GL\_TRIANGLES instead of a fan or strip because a single glDrawArrays/glDrawElements call can't draw separate strips. Thankfully, I can use an index buffer to reduce the vertex count back to 4, instead of the 6 that two triangles would normally use. 66 + 67 + GLES does not support GL\_UNPACK\_ROW\_LENGTH, which is a shame. It means that if image data is not tightly-packed, it has to be re-copied into a tightly-packed array first. This makes the GL and GLES renderers do loading/updating images in slightly different ways. I think there's a GLES2 extension for it though, so that might be worth looking into. 68 + 69 + Multiple windows can be done in two ways: 70 + 1. GPU\_CreateTargetFromWindow() creates a separate context for rendering, shaders, and textures. 71 + > 2) GPU\_MakeCurrent() can be used to switch the window of a GPU\_Target in order to share a context between windows. 72 + > What about SDL\_GL\_SHARE\_WITH\_CURRENT\_CONTEXT?
+34
MainPage.md
··· 1 + # What is it? # 2 + 3 + SDL\_gpu is a rendering system for SDL 1.2 and SDL 2.0 (http://libsdl.org/) that presents a powerful hardware-accelerated API for 2D applications and games. The source code is portable to a variety of platforms which have SDL and OpenGL support, including Windows, Mac OS X, Linux, iOS, and Android. The library and demos can be built for most platforms by using CMake (http://www.cmake.org/). 4 + 5 + 6 + # Where do I get it? # 7 + 8 + Binary builds are available in the 'builds' directory of the repository: 9 + https://code.google.com/p/sdl-gpu/source/browse/#svn%2Fbuilds 10 + 11 + If you want to build the source yourself, just grab a copy of the repository via SVN. See the [README](https://sdl-gpu.googlecode.com/svn/trunk/README.txt) for details. 12 + 13 + 14 + # How do I use it? # 15 + 16 + ## Tutorials ## 17 + 18 + DinoMage Games has produced a simple tutorial for getting a sprite on the screen with SDL\_gpu: 19 + http://www.dinomage.com/2015/01/sdl_gpu-simple-tutorial/ 20 + 21 + ## Demos ## 22 + 23 + The demos directory contains a suite of test programs for the various available features. Perusing these demos is the best way to get a feel for what SDL\_gpu can do. The "init" demo is the base project for many of the other demos, so it is a good place to start. 24 + 25 + 26 + ## Documentation ## 27 + 28 + SDL\_gpu is currently in feature development. As such, features are liable to be added or changed in the future. This means that the documentation is also changing. The header comments are kept up-to-date, so the best documentation can be generated directly via Doxygen. However, you can find pregenerated documentation in the source repository or online at: 29 + http://dinomage.com/reference/SDL_gpu/ 30 + 31 + 32 + # How am I allowed to use it? # 33 + 34 + Pretty much any way you want! The source code is distributed under the very permissive MIT license. You are free to do much with the source code including study and reuse. See the [LICENSE](https://sdl-gpu.googlecode.com/svn/trunk/LICENSE.txt) for details.
+18
ProjectHome.md
··· 1 + SDL\_gpu is a C library based on SDL that makes hardware-accelerated 2D graphics easy. It is intended as an alternative to SDL\_Renderer with modern features which may not belong in the SDL core. 2 + 3 + Features: 4 + * Cross-platform (tested on Windows, Mac, Linux, iOS, and Android) 5 + * Works with SDL 1.2 and SDL 2.0 - Great for transitioning to SDL2 6 + * Simple initialization 7 + * Virtual resolution control to separate drawing logic from display resolution 8 + * Image loading of popular image formats and from SDL\_Surfaces 9 + * Render-to-texture 10 + * Clear abstraction for textures (GPU\_Image) and render targets (GPU\_Target) 11 + * Rotation and scaling 12 + * Primitive shape rendering (points, lines, circles, polygons, etc.) 13 + * Integration with native API (e.g. OpenGL) calls 14 + * 2D camera control 15 + * Custom renderer support 16 + 17 + You can get it at the [Downloads](https://code.google.com/p/sdl-gpu/wiki/Downloads) page. 18 + Want to see more? Check out the [Wiki](https://code.google.com/p/sdl-gpu/wiki/MainPage)!
+25
RoadMap.md
··· 1 + # Versions # 2 + 3 + 1.0.0 (future) 4 + > Needs your help! Feedback on the current version is great! Patches welcome! 5 + 6 + 0.10.0 (2/5/14) 7 + > Better native API call integration. Custom renderer support. 8 + 9 + 0.9.0 (10/22/14) 10 + > Pixel snapping. Header cleanup and build system improvements. 11 + 12 + 0.8.0 (3/6/14) 13 + > First binary release. Renderers for OpenGL 1/2/3 and GL ES 1/2. 14 + 15 + 0.0.0 (1/4/12) 16 + > Public project created. Basic fixed-function OpenGL renderer to render to screen with rotation and scaling. 17 + 18 + # Wishlist # 19 + 20 + * Direct3D renderer(s) 21 + * Wrapping modes for image atlases and power-of-two based textures 22 + * Bezier shape rendering 23 + * Support 1-channel and 2-channel textures (for shader access) 24 + * Support video texture formats (YUV of some sort) 25 + * Multi-target rendering