11 November 2011.The so-called "stable" version has been uploaded. It fixes a couple of bugs that might have caused intermittent crashes. It also is compiled with optimization and w/o debug (thus the size).
This is a direct replacement of any other renderer - it draws stuff identically or as close to as is sensible. It is also faster, easily beating 500 graphic FPS on pause (on my r4850), and not biting off much time out of game engine when in action - but make sure you cap G_FPS at something low and enable SINGLE_BUFFER.
23 October 2011.Creatures are drawn exactly as in other GL renderers. For now.
22 October 2011. Zoom works at last. On to getting creatures drawn the right way.
17 October 2011.Added some docs in form of an
README file.
Windows builder and testing are needed.
16 October 2011.Source code is now hosted at github:
hereAnother interim release.
Highlights:
support for non-square graphics and for stretch when zooming.
shader source code embedded into the library to simplify deployment
new configuration tokens:
[DUMP_SCREEN:0]
[TEXTURE_PARAM:NEAREST]
[VERTEX_SHADER:data/vertex.shader]
[FRAGMENT_SHADER:data/fragment.shader]
DUMP_SCREEN controls screen dumping for consumption by the testbed. 0 - disabled, >0 - dump screen every this frame.
TEXTURE_PARAM - now honored by the renderer
VERTEX_SHADER/FRAGMENT_SHADER - override embedded shaders with ones loaded from given files.
Python testbed non-functional at the moment, as the screen dump format changed.
http://dffd.wimbli.com/file.php?id=5044To introduce myself to glsl and also get rid of graphics-related slowdowns, I implemented PRINT_MODE:SHADER. Almost.
The goal is to offload entire render to the GPU. As such, my code does absolutely nothing with screen[] and screentexpos[] arrays apart from uploading them as vertex buffer objects. Everything gets done on the videocard.
This is very much a work in progress, so bugs are there and features are not. Resize window at your own risk.
Requirements are: GLSL 1.20, which implies OpenGL2.0+.
Code works for me at ubuntu maverick 32bit + radeon 4850
OpenGL renderer string: Mesa DRI R600 (RV770 9440) 20090101 x86/MMX+/3DNow!+/SSE2 TCL DRI2
Should work on any 2xxx/3xxx/4xxx radeon with open-source drivers. No idea re windows or nvidia.
Limitations: 16x16 graphics only, resize messes things up, creatures are not drawn correctly. Phoebus graphic/tile set is recommended.
Archive contents: eclipse project. Debug/libprint_shader.so - replace your libs/graphics.so to try it out.
vertex.shader and fragment.shader go into data/ directory.
t3.py - python testbed. works on screen and texture dumps (dump code disabled right now).
An example dump is included, launch like: python t3.py screendump 10