From: Norman K. <no...@sl...> - 2000-05-06 20:24:45
|
Date: Saturday May 6, 2000 @ 13:24 Author: norman Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory slayer.i.sourceforge.net:/tmp/cvs-serv3132/canvas/ggi Modified Files: ggi2d.cpp ggi2d.h ggi2d.mak Log Message: changed all (hopefully) refrences to the old directories cs2d and cs3d |
From: Eric S. <sun...@sl...> - 2000-05-08 07:27:10
|
Date: Monday May 8, 2000 @ 0:26 Author: sunshine Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory slayer.i.sourceforge.net:/tmp/cvs-serv25184/plugins/video/canvas/ggi Modified Files: ggi2d.cpp ggi2d.h Log Message: -*- All Crystal Space application and plug-in configuration files are now loaded from virtual filesystems via VFS rather than the physical filesystem, with the exception of scf.cfg and vfs.cfg which can not be loaded from VFS for (hopefully) obvious reasons. (scf.cfg is needed to initialize SCF which is used to load the VFS plug-in, and vfs.cfg is used to actually define the VFS volumes.) -*- Moved all configuration files onto the VFS volume /config which happens to be mounted at physical location CS/data/config. Note that using the /config volume is a convenience, rather than a requirement. Programs written using Crystal Space can choose to locate their own configuration files anywhere they like; even on a physical filesystem, if desired (though this is frowned upon). -*- Script files which are executed by 'walktest' are now loaded from VFS rather than from a physical filesystem. -*- Fixed a lot more 'const' problems throughout the project. Most of these involved changing (char*) to (const char*). |
From: Jorrit T. <jo...@sl...> - 2000-05-12 13:44:39
|
Date: Friday May 12, 2000 @ 6:43 Author: jorrit Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory slayer.i.sourceforge.net:/tmp/cvs-serv24401/plugins/video/canvas/ggi Modified Files: ggi2d.cpp Log Message: Removed CHK and CHKB. |
From: Eric S. <sun...@sl...> - 2000-05-15 14:11:59
|
Date: Monday May 15, 2000 @ 7:11 Author: sunshine Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory slayer.i.sourceforge.net:/tmp/cvs-serv2341/plugins/video/canvas/ggi Modified Files: ggi2d.cpp Log Message: Renamed the following files and fixed references to them throughout the project: def.h --> csdef.h sysdef.h --> cssysdef.h types.h --> cstypes.h frustrum.h --> frustum.h frustrum.cpp --> frustum.cpp |
From: Eric S. <sun...@us...> - 2000-06-20 14:34:13
|
Date: Tuesday June 20, 2000 @ 7:30 Author: sunshine Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory slayer.i.sourceforge.net:/tmp/cvs-serv15975/plugins/video/canvas/ggi Modified Files: ggi2d.mak Log Message: Fixed the 'clean' target. |
From: Andrew Z. <an...@us...> - 2000-07-28 11:29:45
|
Date: Friday July 28, 2000 @ 4:29 Author: andyz Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory slayer.i.sourceforge.net:/tmp/cvs-serv13713/plugins/video/canvas/ggi Modified Files: ggi2d.cpp ggi2d.h Log Message: -*- Added detection of XFree86/OS2. Now softx driver compiles and works well on OS/2 with shm and vidmode extensions! :-) -*- Added a command-line option: "-canvas=xxx" will tell the renderer which canvas plugin to use. If "xxx" does not contain dots (e.g. something like "x2d", "dive" and so on) "crystalspace.graphics2d." is prepended. -*- Fixed a bug in softx driver related to fullscreen extensions. Close() calls LeaveFullScreen() but if we close the driver due to a failed initialization dpy and window variables were not initialized. -*- Removed GetVFS method from iSystem. Use QUERY_PLUGIN_ID instead. I have fixed all drivers to use QUERY_PLUGIN_ID. -*- Removed iUnixSystem interface. Moved the functionality needed to decide whenever to use shm, simdepth etc to the respective X11 drivers (moved to a new file video/canvas/common/x11comm.cpp which is included in all X11 drivers that really needs it). In general, system-dependent part of csSystemDriver becomes thinner and thinner. This is good :-) Due to extensive changes through many canvas plugins some may encounter syntax errors during compilation. Use the softx driver for reference, which compiles and works fine. -*- Fixed the linex2d driver (it wasn't working properly after the last fullscreen change). |
From: Andrew Z. <an...@us...> - 2000-08-04 13:05:45
|
Date: Friday August 4, 2000 @ 6:05 Author: andyz Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory slayer.i.sourceforge.net:/tmp/cvs-serv24554/video/canvas/ggi Modified Files: ggi2d.cpp ggi2d.h ggi2d.mak Log Message: -*- Implemented a new low-level event system architecture. Most programs won't notice any difference in top-level interface, only low-level interaction has been changed a little. Events are generated by iEventPlug objects. Any event plug plugs into an iEventOutlet which is the "front door" into the system driver event queue for the respective event source. When you register an iEventPlug object with the system driver, you get a pointer to the respective iEventOutlet. The QueueXXXEvent() methods are gone from iSystem. Instead, use the respective methods from iEventOutlet interface. Also there is an default system outlet (the 'back door' :-) which may be queried through GetSystemEventOutlet, use it if you don't consider that your plugin is worth to have a full-fledged connection with the system driver event queue. Note that the new event system allows to write a new generic "record/play" plugin which will, in record mode, record all events that pass through the system queue, and on other hand, emit all recorded events back into the system event queue. Writing one is left as homework for the reader :-) -*- New file: include/ievent.h. It defines the interface for any plugin which desires to generate events into the system event queue. Also it defines the interface for iEventOutlet objects, which are provided by system driver. -*- No more SetSystemDefaults routine in system-dependent drivers. Any settings must be queried from the respective plugins. For example if some canvas needs the "-shm/-noshm" option it should query it itself rather than relying on iUnixSystem driver to do it. Also most system-dependent interfaces (such as iDosSystem, iUnixSystem, iOS2System) are gone. I believe there is no need anymore in a private interface, and if you need just one-two additional system-dependent functions, you can always implement them through the new SystemExtension method of iSystem. -*- Cleaned up the iSystem interface. Lots of methods are gone, several new have been added. -*- The canvas-dependent command-line options have been moved to respective canvas drivers. The respective command-line help have been moved there as well. From now on: if you want to display any plugin-specific help, you should implement HandleEvent and handle the cscmdCommandLineHelp broadcast event. Upon reception of such an event you should display something like: Options for X-Windows 2D graphics driver: -sdepth=<depth> set simulated depth (8, 15, 16, or 32) (default=none) -shm/noshm SHM extension (default 'shm') -[no]sysmouse use/don't use system mouse cursor (default=use) -*- Note that because all QueueXXXEvent methods are gone from iSystem interface, some canvas drivers may not build. Here is the list of canvas drivers that I have fixed, use any of the drivers below for reference when fixing other canvas plugins. Fixed and tested: - CSDIVE canvas. - X-Windows 2D canvas - X-Windows Line2D canvas - OS/2 OpenGL canvas - MGL 2D canvas - AsciiArt canvas Fixed but not tested: - csalleg (cross-platform Allegro) canvas - unixglide canvas - svgalib canvas - gl/x canvas - ggi driver Not fixed at all: - BeOS drivers - Mac drivers Sorry, couldn't understand how they work :-) Some system drivers also can generate events. The following drivers were converted and tested to use new event architecture: - DOS/DJGPP Converted but not tested: - MacOS - Win32 - BeOS Not converted (Objective C :-(): - NeXT -*- Implemented National Keyboard Support. Every event plug has to provide two key codes - one is the "raw" keycode (Event.Key.Code) and one is the "cooked" code (Event.Code.Char). Old programs that use Event.Key.Code will still work but they will get just low-case characters (e.g. even Shift and/or Ctrl will be ignored). This also means that hotkeys like "shift+!" won't work anymore (instead use shift+1). I have fixed autoexec.cfg for this. National Keyboard Support should already work with most canvas drivers. I have tested it with X-Windows driver, OS/2 DIVE driver, MGL driver. If some driver cannot provide the "cooked" keycode (such as the DOS driver) it should provide "-1" as the character code, and the system driver will "cook" it itself. -*- Fixed X-Windows drivers so that they handle correctly the MappingNotify event. This enables support for languages that need more than one keymap (e.g. Cyrillic and others, maybe Japanese). -*- Removed elapsed_time and current_time arguments from NextFrame. Instead, I have added a new method called GetElapsedTime (time_t&, time_t&) into the iSystem interface. Call it if you really need the elapsed time. You can call it any times per frame you need. The time is updated only at the start of every frame. The NextFrame() method has no arguments now. -*- Redesigned the main application loop. The Loop method in system driver is still there, but it is basically just an: while (!Shutdown) NextFrame(); If your application does not need the loop, feel free to call NextFrame without arguments at appropiate times. Fixed all applications in CVS to use the new NextFrame prototype. However, for applications not in the repository you will have to fix this yourself. -*- Added the new -I or --info switch to gfxtest tool. Using this switch you can easily see the cause of translucent cubes in blocks: the respective png files (cubef3 and cubef4) have an alpha channel. -*- Added -a or --strip-alpha switch to same tool. Note that the blocks data file in repository has NOT been fixed; somebody still have to do it. -*- Fixed dependency generation with makedep - instead of $(OUT) prefix it used the expanded value of $(OUT) - thus when switching compilation mode, it was needed to rebuild dependencies. Not it is not the case anymore. -*- Added Z-none counterparts to ALL DrawPFX modes. In this mode the Z-buffer is ignored at all, thus it is the fastest mode. It can be used to display non-3D graphics with DrawPFX, for example user interface elements and so on (and even 3D graphics in depth sorted order). -*- Added Z-none, Z-fill and Z-use modes to per-pixel alpha routines. Now you can do: G3D->SetRenderState (G3DRENDERSTATE_ZBUFFERMODE, CS_ZBUF_ZUSE); G3D->DrawPolygonFX (...) The CS_ZBUF_NONE routine has the lesser overhead, of course. -*- Implemented Z-use and Z-fill modes for alpha-mapped walls (DrawPolygon). -*- Redesigned the iConsole interface. Basically I have tried to simplify it as much as possible; having very sophisticated interfaces does not make easy to write new plugins. Removed the dumb iCursor interface. The cursor should be provided by the console; if you don't like the cursor, write your own console. Redesigned the iConsoleInput interface. -*- Reimplemented cstools/simpcons as a new plugin. cstools library is now empty; don't know if it is really needed. -*- Fixed walktest to use the new console plugin. It is not tied anymore to csSimpleConsole private interface, thus can use any console plugins you will write in future :-) Also walktest will run now without a console at all. -*- Fixed a very seldom happening bug in software 3D driver that leads to crashes due to division overflow. -*- When the palette changes in 256-color modes, the texture manager will emmit an broadcast event so that all interested plugins (including consoles) can intercept it and query the appropiate drivers for new information. -*- Fixed the cscon plugin. The "xstdin" plugin has been removed (use the one in simpcon instead, it has absolutely same functionality), the "console.output.standard" and "console.output.funky" consoles works. You can even enable them in walktest application by uncommenting the respective lines from cryst.cfg. -*- Fixed an strange bug in software texture manager - in 8-bit modes the Scan.GlobalCMap was deleted at the end of PrepareTextures() although it is extensively used while the program is running ... -*- Fixed an very old bug in DrawPolygonFX() for software 8-bit modes. DST was incorrectly missed the screen palette table, thus all modes that involved DST (fixed-value alpha transparency and blending) did not worked. -*- Due to above event system redesign, Crystal Space Windowing System has been redesigned a little as well. The csApp class is now a plugin from system driver's point of view and receives events absolutely same way like any other plugin. Thus the look of the simplest CSWS application has been changed a little. See cswstest for details. -*- Crystal Space Windowing System does not implement its own system driver anymore. Instead, the csApp class is an "almost-normal" plugin now, except that it is created not via SCF (but rather with `new'). Also CSWS works with the system driver completely through the iSystem interface; this means CSWS and system driver don't have to be in the same module anymore. -*- Fixed MazeD so that it works with the new CSWS architecture. No other enhancements though :-( -*- The list of applications that were fixed after my changes: blocks cswstest demonets (at least compiles) dnapp (same) dtsimple makedep (:-) map2cs mazed mdl2spr (I hope) metademo ndrvdemo (compiles) nstp (not tested, but I believe) perftest (same) phyztest (same) pysimp (hell knows) scfreg simple squawk walktest (hah) Still broken: cctest shooter and libs/csgame wscs3d |
From: W.C.A. W. <wo...@us...> - 2000-08-05 18:02:20
|
Date: Saturday August 5, 2000 @ 11:02 Author: wouter Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory slayer.i.sourceforge.net:/tmp/cvs-serv12910/plugins/video/canvas/ggi Modified Files: ggi2d.mak Log Message: beginnings of a make install option. Xfree86 (fullscreen extension) is detected now for unix |
From: Andrew Z. <an...@us...> - 2000-08-21 10:45:31
|
Date: Monday August 21, 2000 @ 3:23 Author: andyz Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory slayer.i.sourceforge.net:/tmp/cvs-serv20296/plugins/video/canvas/ggi Modified Files: ggi2d.cpp ggi2d.h Log Message: -*- Changed perfstat plugin to compute fps once per 1/2 second rather than once per 10 frames. This will compute more accurate values in high-fps environments and also makes fps numbers more steady. Also iPerfStat::SetResolution sets the interval in msecs rather than in frames. -*- Changed FPS display in walktest to display just two numbers after dot. I don't think you really care whenever you have 20.111 or 20.112 fps :) -*- Created the iEvent interface. It is really a very special interface since its the first time (as far as I know) an SCF interface with member variables is used. However, this is supposed to work on all platforms. Be warned though. -*- csEvent is now just a particular implementation of iEvent. You can create your own objects implementing iEvent interface. PLEASE always use QueryInterface (or rather QUERY_INTERFACE macro) to get access to extended fields; NEVER do direct typecasts. -*- Added a new halo generation routine - csutil/halogen2.cpp. It is not used anywhere yet though. The algorithm has been borrowed from GIMP (`SuperNova' plugin). -*- Started to work on MazeD material support. Not finished though (even not compilable). -*- Improved material support. The MATERIALS() statement in world file now looks like this: MATERIALS ( MATERIAL 'material name' ( TEXTURE ('texture name') COLOR (float, float, float) ; R,G,B = 0..1 DIFFUSE (float) ; 0..1 AMBIENT (float) ; 0..1 REFLECTION (float) ; 0..1 ) ... ) I have added the GetFlatColor() method to iMaterial and iMaterialHandle. For now the flat_color_X members in iGraphics3D polygon structures are still present; however I hope one day they will be gone and a material handle will be always present, since materials also support flat color. For now only software renderer supports materials with flat colors; I hope with time other renderers will be also updated for this. -*- Renamed RGBcolor -> csRGBcolor and RGBpixel -> csRGBpixel. In general, we should think where to put all library-independent header files such as rgbpixel.h and cspixmap.h. I would say they could live in main include directory since those classes are absolutely independent and completely inline. -*- Changed the way engine defines and uses texturing. There are four polygon texturing types now: POLYTXT_NONE (no texturing, useful when using materials without textures -- it defines no texturing parameters at all thus saves memory), POLYTXT_FLAT (flat-shading, only the angle between light and polygon normal is considered if CS_POLY_LIGHTING flag is set, and entire polygon is painted with one lighting value; every vertex has an U/V pair associated), POLYTXT_GOURAUD (every polygon vertex has a color and those colors are interpolated across scanlines) and finally POLYTXT_LIGHTMAP (a polygon which has an associated lightmap and a texture plane). Now it is possible to define and use objects which have flat-color but still receive light with Gouraud as well as without Gouraud interpolation; in general this open a whole new area for experimenting. -*- New keyword in world file inside the POLYGON () context: TEXTURING (NONE | FLAT | GOURAUD | LIGHTMAP) This defines one of the texturing modes above. -*- MIXMODE() keyword is applicable to all texturing types except LIGHTMAP. Alpha transparency for such polygons can be defined in two ways: POLYGON (... ALPHA (50) MIXMODE (MULTIPLY2)) or POLYGON (... MIXMODE (MULTIPLY2 ALPHA (0.5))) To be honest, I don't like having two different ways to specify alpha. I don't like the different scale either (0..1 and 0..100). Polygon always keeps alpha as a value 0..255 (and iGraphics3D always receives alpha in this range, the old 0..100 scale is gone). In general, I would say that giving colors and alpha as floating-point value looks like a bad idea. I would store both them as 0..255 value, or as a floating-point 0..1 value. Maybe it makes sense to change this in the new loader? -*- DECLARE_GROWING_ARRAY does not have a reference counter anymore. If you need a reference counter, use DECLARE_GROWING_ARRAY_REF. This gives slight less memory usage in some places. I have changed thing and polygon template objects to use growing arrays for vertices. This does not change memory footprint and gives better readable code (and maybe a little less binary size). -*- Simplified polygon template class a lot by moving most state variable into a csFlags variable. Added support for COLORS() keyword in polygon templates. GOURAUD keyword is now obsolete in both normal polygons and polygon templates; use TEXTURING (GOURAUD) instead. Overall results for flarge.zip: Was: World geometry is using 1526938 bytes. Now: World geometry is using 1465962 bytes. ---- Gain: 60976 bytes (flarge contains just 5 thing templates) -*- In addition to TEXNR() everywhere it appears MATTERIAL is accepted as a synonym; one day TEXNR should die. |
From: Andrew Z. <an...@us...> - 2000-09-05 08:16:02
|
Date: Tuesday September 5, 2000 @ 1:15 Author: andyz Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory slayer.i.sourceforge.net:/tmp/cvs-serv20077/plugins/video/canvas/ggi Modified Files: ggi2d.cpp Log Message: -*- Added to win32conf.bat display a note about which packages you should have installed. This depends upon which compiler you use (e.g. it displays slightly different help depending on whenever you use msvc or mingw32). -*- Enhanced the configure help for DJGPP. -*- Fixed both dosconf.bat and win32conf.bat (very old bug) to detect correctly whenever makedep is installed. Earlier it considered makedep to be always installed. -*- Added `walkall' target to compile just the plugins that are needed for walktest. Currently `make walkall' is equivalent to: make walk soft csfont simpcon perfstat rapid -*- Fixed DOS/DJGPP build in debug mode with shared libraries. Added functions that are usually inlined (e.g. strcmp, memcmp, strcpy) to the list of exported functions in djgpp/loadlib.cpp. Fixed a bug in dosraw driver related to the fact that transfer buffer is overwritten by printf() (which is used in debug mode to print some videocard information). So, in overall, DOS port now works in both static/dynamic and optimize/debug modes. -*- Added perfstat plugin to static.cpp if SCL_PERFSTAT macro is defined. Effectively this adds FPS display for static mode build. -*- Enhanced (fixed) linex2d driver: now it uses "helvetica" font and GetTextWidth/Height are implemented properly. Also DrawText() works properly now (previously it painted text shifted up by some amount). -*- Added DrawBox() method to linex2d driver. Also I have fixed Clear() which were not clearing one pixel horizontally and vertically. -*- Added AllowContextResize(bool) method to iGraphics2D. By default context resizing is *disallowed*. This is because most applications won't handle the cscmdContextResize broadcast correctly, and will misbehave. Applications which handles this broadcast correctly should issue AllowContextResize (true). Note that engine already does this (since engine handles context resizes) thus you should do this only for applications that don't use the engine. -*- Fixed x2d driver to allow width and height only in steps of 2. The reason is to not allow odd window width, because in some cases XFree86 (?) does not like that (every scanline is shifted by one pixel). I don't think this is a limitation, but if somebody don't like this, it should limit at least width to be even. -*- Moved glMatrixMode(), glOrtho(), glViewport() to 2D common OpenGL driver. This was done to allow 2D driver to function standalone (without 3D). -*- Added (not replaced) a new gl2d_font2.cpp, another OpenGL font "server". I have used glBitmap() to draw font, which will help on platforms with buggy OpenGL support for alpha-mapped textures (such as OS/2 and MacOS). We still have to see how compatible this approach is; but it at least works with OS/2 software OpenGL 1.0 (previous font rendering did not). Maybe we should make this a runtime option in opengl.cfg, I'm not sure. Also I have implemented text clipping. Vertical clipping seems to work, horizontal clipping should also work but I cannot fully test it due to non-implemented "xorig" parameter in glBitmap() in OS/2 OpenGL. -*- Implemented runtime context resizing for the OS/2 OpenGL canvas. Also it respects AllowContextResize(bool). -*- Added a new test application: G2DTEST. As you may conclude from his name, this small application is meant to test most aspects of 2D graphics canvas plugins. Also it is a curious example of a application which uses just the graphics canvas plugin (without 3D renderer). -*- Fixed line drawing in graph2d.cpp (this affects most canvas plug-ins). Now line drawing is absolutely perfect, floating-point coordinates are correctly used. Even OS/2 OpenGL shows little errors with line drawing, compared to graph2d.cpp (and OS/2 OpenGL is known to be accurate). This effectively broke CSWS which was designed for the "incorrect" line drawing behaviour :) -*- Fixed a bug in csOpenGLCommon2D::SaveArea which caused a shift to the area which is going to be saved. -*- Fixed CSWS after last changes to line draw routines. Now CSWS works with OpenGL, at least on OS/2. -*- Added PerformExtension ("flush") to OpenGL common graphics canvas. This can be used to do performance measurements. -*- Improved software line drawing performance from ~5.5 MegaPixels/sec to approximatively ~15.8 MP/sec on Celeron/433. I think the assembly line drawing routine (which is used only in Win32/MSVC) should be removed since first of all I think it is slower, and secondly I doubt it is accurate (e.g. I'm sure it fails most of the accuracy tests in g2dtest). (for comparison: OS/2 OpenGL canvas gives just 3MP/sec, XFree86 linex2d driver gives 7.3MP/sec :-). Hurray, we have the fastest-and-most-accurate line drawing routine in the world! :-) -*- Removed the WriteChar() routine from iGraphics2D interface. -*- Slightly improved software text drawing speed fom ~300000 characters/sec to ~330000 characters/sec. For comparison: OS/2 software OpenGL gives ~26000 characters/sec and linex2d driver gives about ~241000 characters/sec. -*- Moved some OpenGL initialization stuff (realted to OpenGL start-up settings) from 3D driver to the 2D (canvas) driver (to the common part), to make possible to use OpenGL 2D driver without the 3D driver. -*- Added a note about C_INCLUDE_PATH needed to be set up correctly before you do "make depend" to the win32gcc.txi file. |
From: Andrew Z. <an...@us...> - 2000-10-30 09:03:04
|
Date: Monday October 30, 2000 @ 1:03 Author: andyz Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory slayer.i.sourceforge.net:/tmp/cvs-serv32030/plugins/video/canvas/ggi Modified Files: ggi2d.cpp Log Message: -*- Fixed a bug in default window theme that caused background texture to not be drawn if the window is not semi-transparent. -*- Fixed (I hope this is the last fix) clipping so that in very complex window configurations CheckDirtyTD and CheckDirtyBU are called as much times as required (until nothing changes). -*- Added gradient backgrounds! In general background for all skins is now one csBackground object which accepts one of the following modes: textured, gradient, flat-color, none (default flat color from CSWS). Gradients can be horizontal (two rgb values), vertical (two rgb values) and four-corner (four rgb values). -*- Fixed DrawPolygonFX in software renderer which works incorrectly for more than three-vertex polygons (it did not take into account neither z,u,v,r,g,b values for the fourth, fifth, ... vertices of the polygon). It is a bit more costly now (one division per scanline) but that's the price we have to pay for correct drawing... -*- Modified cswstest to be able to change skins at runtime. You can either set the [CSWS] Skin.Variant = ... option in main config file, or use the "-skin=..." command line option. The skin variants themself are defined in csws.zip file; for example use -skin=Colorful for a demonstration of gradient background textures; -skin=Marble for a marble-texture-background skin variant. -*- Fixed back the awful behaviour introduced by someone: when a drop-down submenu is visible, and the parent menu hides, the submenu stays visible. -*- Re-formatted and commented (doc++ style) the csGrid class. -*- Re-implemented font server interface from scratch. Added the iFont interface. Any font is an iFont object now. You pass the iFont object to iGraphics2D for drawing characters. The font server is not anymore a class private to the canvas driver; it is a public plugin like most others. You can avoid using a font server at all, if you aren't going to type text through iGraphics2D::Write(). This implies some need for rewriting code outside CVS that deals with fonts. The basic rules are: (*) Instead of using csFontCourier, csFontTiny etc you should `load' the font first. You can do it this way: iFontServer *fs = G2D->GetFontServer (); iFont *courier = fs->LoadFont (CSFONT_COURIER); iFont *police = fs->LoadFont (CSFONT_LARGE); iFont *italic = fs->LoadFont (CSFONT_ITALIC); iFont *tiny = fs->LoadFont (CSFONT_SMALL); Note the new names for the fonts (you can find them in ifontsrv.h). (*) Then you use the iFont object to query text width, height etc: int fw, fh; font->GetDimensions ("Hello world", fw, fh); font->GetMaxSize (fw, fh); ... (*) The only method in G2D that accepts an iFont object is Write(): G2D->Write (font, x, y, fg, bg, "Hello world!"); All other font-related methods (e.g. SetFontID, GetFontID, GetTextWidth and so on) are gone (mostly moved to iFont). -*- Changes in CSWS due to above font server change: (*) TextWidth() and TextHeight() are gone. Instead there is a new method called int GetTextSize(char *, int *) which returns the width of given text and possibly height (if second argument is not NULL). (*) Added a new csComponent method - int GetTextChars(char *,int) which will return how much characters if written with current font will fit in given width. -*- Added "floating hints" capability to CSWS. These hints can be attached to absolutely any csComponent's; if the mouse stays unmoved over such an component for more than three seconds (adjustable) a new csHint object is created. As soon as you touch mouse or keyboard (or joystick :-) the hint will vanish. These hints helped to find a lot of errors in clipping algorithm related to clipping of foreign "clip childs"; this was not tested very good because of limited use of "clip childs". csHint objects are direct childs of the objects the hint is attached to, but they are "clip childs" of the csApp to avoid being clipped by parent object. Not complete yet (the size for hints is arbitrary right now :-) -*- Added some debug capabilities to SCF. You can add #define SCF_DEBUG at the top of certain SCF module and you will see (via printf()) all the IncRef's, DecRef's, class initializations and so on. On GCC > 2.8.0 it also types the address the methods were called from, use GDB's "l *address" command to find out what file/line/function corresponds to given address. -*- Added to VFS the ability to translate VFS paths into real filesystem paths. This works only for non-archive files. This is means as a last-resort for libraries that can't handle VFS directly (e.g. freetype can load fonts only from real-world files). If the VFS path refers to multiple paths, all of them will be searched for the existence of given path or filename. If the file is non-existent, the first one will be returned. -*- Ooops. Fixed a "bug", or rather an unimplemented yet feature. For some reason I was under impression that VFS understands expressions like: $(VAR:text), e.g. "get the value of VAR, if it is not defined, use the "text". It did not, now it does. It even should understand very complex things like: $(VAR1:VAR2:VAR3:sometext$(VAR4:plaintext)othertext) -*- Removed the last traces of the old memory debugger from makefiles and support/debug/memory,(h|cpp) -*- Added correct window resize support to GLX canvas. Re-implemented font support in GLX driver; now it will work even if you load fonts at runtime (old "glfontserver" code was able to display only fonts that are available at program startup, e.g. built-in fonts from font server). Now there is a "font cache" object which loads and frees fonts on demand. -*- Added runtime full-screen switching via Alt+Enter for the following X11 drivers: x2d, linex2d, glx. -*- Fixed "double-backbuffer" support in OpenGL canvases. All OpenGL canvases do NOT support double backbuffer mode. Note that "double backbuffer" is NOT the same as "double buffer", these are completely different things. All CS canvases should support double-buffering for smooth animation, while they may or may not support double-backbuffer mode, mainly for performance reasons. |
From: Eric S. <sun...@us...> - 2000-11-06 22:32:55
|
Date: Monday November 6, 2000 @ 13:44 Author: sunshine Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory slayer.i.sourceforge.net:/tmp/cvs-serv26995/plugins/video/canvas/ggi Modified Files: ggi2d.mak Log Message: Eric Sunshine made the following changes to the project: -*- Visual-C++ DSW and DSP project files are now automatically generated and updated. Information gleaned from GNU makefiles, project-wide, is used to synthesize DSW and DSP files on-the-fly. The project file synthesis procedure attempts to enforce the invariant that if a module builds correctly via the GNU makefile, then the same module should build correctly via the Visual-C++ project file which was built from information gleaned from the makefile. Thus, the headache associated with manual maintenance of the Visual-C++ project files should be a thing of the past. -*- Added a new directory, CS/mk/msvcgen, in which all resources related to automatic generation of Visual-C++ project files reside. -*- Added msvcgen.pl, which is a Perl script capable of generating Visual-C++ DSW and DSP files based upon input arguments and a set of template files. The script accepts a useful array of options for controlling several aspects of the synthesis process, and is also independent of Crystal Space, thus it may be useful in other arenas as well. A copious amount of documentation related to the generation of DSW and DSP files, including a description of the special variables which may appear in template files, may be viewed by invoking msvcgen.pl with the --help option. -*- Added the directory CS/mk/msvcgen/template, which contains template files used by msvcgen.pl during the synthesis of Visual-C++ DSW and DSP project files. The master level templates are appgui.tpl, appcon.tpl, group.tpl, library.tpl, and plugin.tpl, which represent the five different types of DSP files which can be generated. These templates are supplemented by the template-include files dspgroup.tpi and dspfile.tpi, which combine to form resource groups within each DSP. The master level template dsw.tpl is used for synthesizing DSW files and is supplemented by dswgroup.tpi and dswdep.tpi, which combine to form dependency groups within the DSW. Refer to the --help output of msvcgen.pl for a description of the special variables which may appear in each of the template files. -*- Added msvcgen.mak, which is the Crystal Space-specific makefile responsible for generating, and optionally installing, Visual-C++ DSW and DSP project files. It performs this task by gleaning information from GNU makefiles throughout the project and then invoking msvcgen.pl with the appropriate arguments to synthesize each DSP file represented by a makefile, as well as the master DSW file, csall.dsw. Also added the supplemental makefiles win32.mak and required.mak. The first, win32.mak, contains additional Windows-specific DSP targets (such as grpall, grpplugins, libcswin32dll, etc.) which are not otherwise represented by makefiles. The second, required.mak, supplements the normal PLUGINS makefile variable with a list of modules for which DSP files must be generated regardless of the platform which is performing the project file generation procedure. This allows any platform (such as Unix) to generate the complete set of Visual-C++ project files. -*- Added two makefile targets which are specific to Visual-C++ project file generation and installation. o 'msvcgen' builds the entire set of DSW and DSP files represented by the GNU makefiles, project-wide. The generated files are placed in CS/out/mk/visualc. o 'msvcinst' copies the DSW and DSP files from CS/out/mk/visualc to their official location at CS/mk/visualc. Furthermore, this target instructs the user as to exactly which CVS commands must be invoked in order to properly commit the newly generated files to the CVS repository. For instance, if a new plugin named "foo" is added and an old library named "bar" is dropped, the 'msvcinst' target will instruct the user to invoke the commands "cvs add -kb plgfoo.dsp", "cvs remove libbar.dsp", and "cvs commit" in order to make the changes permanent. The 'msvcinst' target automatically invokes the 'msvcgen' target, so the synthesis and installation procedures can be performed as one operation. -*- Added support for automated Visual-C++ DSW and DSP project file generation to all of the GNU makefiles, project-wide. Project file synthesis is performed by gleaning the values from some existing makefile variables as well as some newly added ones. In the following discussion, assume that "PROJECT" is the core name of the module represented by a particular makefile. In addition to the existing makefile variable SRC.PROJECT, the following new general-purpose variables were added to support Visual-C++ project file creation: o INC.PROJECT -- Complements SRC.PROJECT, but lists header files related to this project. o DEP.PROJECT -- Although this variable already existed in some makefiles, its meaning has been altered slightly. The value of this variable is the list of projects (typically library projects) upon which this module depends. Each item in this list is the core name of some other module, such as "CSGEOM", "CSUTIL", or "CSSYS". o LIB.PROJECT -- This variable now assumes the roll which DEP.PROJECT used to play in some makefiles. It lists the libraries upon which this module depends. The value of this variable is normally derived automatically from DEP.PROJECT, but may be specified manually in very special cases if necessary (though doing so is frowned upon). If specified manually, each entry should be of the form "$(PROJECT.LIB)". o CFG.PROJECT -- List of configuration files related to this module. Furthermore, the following new variables specifically control DSW and DSP project file creation. These variables should only appear in makefiles for which a corresponding DSP file should be generated. o MSVC.DSP -- This is the master list of modules for which project files should be generated. Entries must be *appended* to this list with the "+=" operator. Each entry is the core name of a module as used within its makefile. For example, soft3d.mak, ensures that a project file is created for the 3D software renderer by invoking "MSVC.DSP += SOFT3D". o DSP.PROJECT.NAME -- Base name (such as "soft3d") for the generated project and target. This name is used to compose the DSP file name, the end target (such as "soft3d.dll"), and the displayed project name in the Visual-C++ IDE. In general, it should be identical to the base name of the target which is generated for non-Windows platforms. o DSP.PROJECT.TYPE -- The module's type. It should be one of "appgui", "appcon", "library", "plugin", or "group", which stand for GUI application, console application, static library, plug-in module, and pseudo-dependency group, respectively. o DSP.PROJECT.RESOURCES -- Lists any extra human-readable resources related to this module which are not covered by CFG.PROJECT. These resources may be browsed in the Visual-C++ IDE as a convenience to the user. Some good candidates, among others, for this variable are files having the suffixes .inc, .y (yacc), .l (lex), and .txt. o DSP.PROJECT.DEPEND -- Lists extra dependencies for this module. Entries in this list have the same format as those in the DEP.PROJECT list. This variable is generally only used for pseudo-dependency group projects (see win32.mak). -*- Renamed docproc.pl to jobber.pl and modified it to also rebuild and commit Visual-C++ DSW and DSP project files in addition to its normal duties of rebuilding and publishing project documentation. The script is automatically invoked twice daily. As always, the script is smart enough to add new project files, and remove obsolete project files from the CVS repository in addition to committing those which were only modified. It also takes special are to use the "-kb" option when adding Visual-C++ project files to the repository in order to preserve the CRLF line terminators (which Microsoft requires). Also, when scanning directories to determine which files to add and remove from the repository, ".cvsignore" files are now ignored (along with all other CVS administrative files which have always been ignored). -*- Performed significant unification and clean-up of makefiles throughout the project. Simplified several makefiles which had unnecessarily complicated innards. Also added missing makefiles: snda3d.mak, sndds3d.mak. -*- Changed suffix of OpenGL extension-detection files from .cpp to .inc since they are use as include-files rather than stand-alone sources. Also performed much clean-up of these files. -*- The standard system-dependent makefiles now define the additional utility command definitions CD, PWD, and PERL (in addition to other existing definitions such as RM, MV, CC, etc.). The default definitions are specified in unix.mak and dos.mak. -*- The makefile fragment common.mak now specially defines $" and $| if they are not already defined. This allows recursive 'make' invocations to use these variables with "echo" commands within targets in exactly the same way as top-level makefile targets can do so. -*- Fixed the makefile 'clean' targets of all library modules so that they also remove the generated dependency (.dep) file. (Other makefiles around the project had already been repaired in this manner.) -*- Removed obsolete memory-debugger support from cssys.mak. Andrew had removed the remainder of this cruft from the rest of the project on 2000/10/30 but missed cssys.mak. -*- Added better documentation and more correct protection to ddg.h's inclusion of cssysdef.h. -*- Removed references to obsolete "null" sound driver from makefiles and documentation. |
From: Eric S. <sun...@us...> - 2000-11-13 07:02:44
|
Date: Sunday November 12, 2000 @ 23:02 Author: sunshine Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory slayer.i.sourceforge.net:/tmp/cvs-serv10750/plugins/video/canvas/ggi Modified Files: ggi2d.mak Log Message: Corrected the long standing misnomer where USE_PLUGINS was incorrectly specified as USE_SHARED_PLUGINS. Updated all makefiles, scripts, and documentation to reflect this change. |
From: Eric S. <sun...@us...> - 2001-02-21 11:53:23
|
Date: Wednesday February 21, 2001 @ 3:54 Author: sunshine Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory usw-pr-cvs1:/tmp/cvs-serv29795/plugins/video/canvas/ggi Modified Files: ggi2d.mak Log Message: Eric Sunshine made the following changes to the project: -*- Resolved a circular reference problem between the system driver and the VFS plugin. The actual problem was that the VFS plugin was utilizing the new configuration manager module even though it should not have been doing so. There are a couple of reasons why utilization of the configuration manager by VFS was problematic. First, this introduced an unwanted circularity since the configuration manager and the VFS plugin each relied upon the services of the other. Second, it does not make sense for the VFS plugin to utilize the configuration manager at initialization time since the VFS plugin is loaded very early in the application start-up sequence. In fact, it is loaded before any other configuration files have been loaded (indeed, all other configuration files are typically loaded from a VFS volume; thus this was a chicken-and-egg issue). Now the VFS plugin manually loads its own configuration file (vfs.cfg) rather than relying on the configuration manager mechanism. In the future, we should introduce some new API into the VFS plugin which allows an application to override or augment the initial configuration from vfs.cfg. This will allow a client application to provide its own VFS.Mount settings if desired. Also note that when this API is finally added it should be in the form of a method in the VFS plugin which is invoked by the client application (or system driver) and that method should accept an iConfigFile* as its argument. The VFS plugin can then query this configuration object for the desired information. There is no need to re-introduce any circularity with iConfigManager. -*- Converted several modules to use the new configuration manager which were missed by Martin when he made his conversion sweep through the project. -*- Modified all makefiles project-wide so that the individual `clean' targets (such as `softclean', `x2dclean', etc.) no longer remove the dependency information (.dep files). In theory, having a module's `clean' target remove the .dep file was a sensible idea, however in actual practice, it turned out to be quite obnoxious to lose dependency information each time an individual module's `clean' target was invoked. You can still remove dependency files by invoking one of the standard and existing targets `cleandep' or `distclean'. |
From: Eric S. <sun...@us...> - 2001-03-09 01:05:46
|
Date: Thursday March 8, 2001 @ 17:07 Author: sunshine Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory usw-pr-cvs1:/tmp/cvs-serv12472/plugins/video/canvas/ggi Modified Files: ggi2d.cpp ggi2d.h Log Message: Eric Sunshine made the following changes to the project: -*- Moved all of the pure SCF interface header files (the filenames beginning with `i') into subdirectories of CS/include. They no longer reside directly in CS/include. The new subdirectories within CS/include are iengine, igame, igeom, igraphic, imap, imesh, inetwork, iobject, isound, isys, iterrain, iutil, ivaria, and ivideo. Also, several files were decomposed into multiple new files, so you may need to include one or more of the new files in place of the old ones. The files which were specially split are: itexture.h -> iengine/itexture.h & ivideo/itexture.h imater.h -> iengine/imater.h & ivideo/imater.h imeshobj.h -> iengine/imeshobj.h & imesh/imeshobj.h iterrobj.h -> iengine/iterrobj.h & iterrain/iterrobj.h Also updated all source & header files, documentation files, and makefiles to reflect this change. -*- Eliminated several compilation warnings throughout the project. |
From: Eric S. <sun...@us...> - 2001-03-16 13:51:23
|
Date: Friday March 16, 2001 @ 5:53 Author: sunshine Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory usw-pr-cvs1:/tmp/cvs-serv10952/video/canvas/ggi Modified Files: ggi2d.cpp ggi2d.h Log Message: Eric Sunshine renamed all of the pure SCF interface header files. Considering that that these files were recently organized into well-named subdirectories, it is possible to use more descriptive names for the files themselves. Also dropped the `i' prefix. Here are just a few examples of the new more meaningful and descriptive names: iengine/idlight.h --> iengine/dynlight.h iengine/imeshobj.h --> iengine/mesh.h imesh/imeshobj.h --> imesh/object.h imesh/mfire.h --> imesh/fire.h imap/ildrplug.h --> imap/reader.h imap/isvrplg.h --> imap/writer.h isound/isnddrv.h --> isound/driver.h isound/isndlstn.h --> isound/listener.h ivideo/imater.h --> ivideo/material.h |
From: Jorrit T. <jo...@us...> - 2001-05-21 14:08:57
|
Date: Monday May 21, 2001 @ 7:08 Author: jorrit Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory usw-pr-cvs1:/tmp/cvs-serv10720/plugins/video/canvas/ggi Modified Files: ggi2d.cpp Log Message: Fixed several csrect.h cases. |
From: Jorrit T. <jo...@us...> - 2001-05-28 07:59:20
|
Date: Monday May 28, 2001 @ 0:59 Author: jorrit Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory usw-pr-cvs1:/tmp/cvs-serv22096/plugins/video/canvas/ggi Modified Files: ggi2d.mak Log Message: Added CSUTIL. |
From: Eric S. <sun...@us...> - 2001-06-14 14:17:23
|
Date: Thursday June 14, 2001 @ 7:17 Author: sunshine Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory usw-pr-cvs1:/tmp/cvs-serv24132/plugins/video/canvas/ggi Modified Files: ggi2d.cpp Log Message: Eric Sunshine eliminated all of the special platform-specific glue libraries and objects with which applications and plugin were required to link in the past. Rather than maintaining special object files and static libraries, the platform-specific glue is now implemented on-the-fly via macros. -*- Eliminated all of the platform-specific special implementation files: cssys/os2/dllentry.cpp cssys/ps2/dummy.cpp cssys/unix/dummy.cpp cssys/win32/dllentry.cpp cssys/win32/exeentry.cpp -*- Removed the Windows-specific special static link libraries along with their project files: cswin32exe.lib cswin32dll.lib libcswin32exe.dsp libcswin32dll.dsp -*- Eliminated the MSVC dependencies upon libcswin32exe.dsp and libcswin32dll.dsp. -*- Eliminated the SRC.SYS_CSSYS_EXE and SRC.SYS_CSSYS_DLL system-level makefile variables which controlled how the special implementation files were inserted into the build process. -*- Added the new macro CS_IMPLEMENT_PLUGIN to cssysdef.h. This macro should be placed at the global scope in exactly one compilation unit comprising a plugin module. For maximum portability, each plugin module must employ this macro. Some platforms override the definition of this macro in order to augment the implementation of the plugin module with any special implementation details required by the platform. For example, the Windows port uses this macro to implement the DllMain() function. -*- Added the new macro CS_IMPLEMENT_APPLICATION to cssysdef.h. This macro should be placed at the global scope in exactly one compilation unit comprising an application. For maximum portability, each application should employ this macro. Platforms override the definition of this macro in order to augment the implementation of an application with any special implementation details required by the platform. For example, the Windows port uses this macro to implement the WinMain() function. -*- cssysdef.h for OS/2 now defines CS_IMPLEMENT_PLUGIN to implement _DLL_InitTerm() and a version of getenv() which works for plugin modules. -*- cssysdef.h for Unix now defines CS_IMPLEMENT_PLUGIN to implement main() in plugin modules if requested by the platform-specific makefile. Currently, the Linux, FreeBSD, and Hurd makefiles request this augmentation. -*- cssysdef.h for Windows now defines CS_IMPLEMENT_PLUGIN to implement DllMain(), and CS_IMPLEMENT_APPLICATION to define WinMain(). -*- Completely re-worked and simplified the convoluted `main' versus `csMain' versus `WinMain' issue on Windows. In the past, the Windows port tried renaming all `main' functions to `csMain' (via the C-preprocessor), and then implemented its own `main' and `WinMain' functions which acted as covers to `csMain'. With the new, much simpler scheme, `WinMain' is merely a thin cover over `main' and global renaming is unnecessary. -*- Augmented all applications and plugin modules with the new CS_IMPLEMENT_APPLICATION and CS_IMPLEMENT_PLUGIN macros. |
From: Eric S. <sun...@us...> - 2001-06-25 14:01:50
|
Date: Monday June 25, 2001 @ 7:01 Author: sunshine Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory usw-pr-cvs1:/tmp/cvs-serv24821/plugins/video/canvas/ggi Modified Files: ggi2d.cpp ggi2d.h Log Message: Eric Sunshine made the following name changes throughout the project in order to avoid global namespace pollution: All SCF macros are now prefixed by "SCF_". All MSG_BLAH macros are now prefixed by "CS_". All QUERY_PLUGIN macros are now prefixed by "CS_". All LOAD_PLUGIN macros are now prefixed by "CS_". All IS_BLAH_EVENT macros are now prefixed by "CS_". |
From: Eric S. <sun...@us...> - 2001-06-29 13:51:06
|
Date: Friday June 29, 2001 @ 6:51 Author: sunshine Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory usw-pr-cvs1:/tmp/cvs-serv27863/plugins/video/canvas/ggi Modified Files: ggi2d.cpp ggi2d.h Log Message: Eric Sunshine made the following changes to the project: -*- Repaired a bad assumption which plagued most SCF interfaces implemented by plugin modules. The problem was that most such interfaces inherited from iPlugIn rather than iBase. This made the potentially invalid assumption that these interfaces would always be implemented as plugin modules. The reason that this is an invalid assumption is that the packaging into a plugin is merely an implementation detail. For instance, since the iImageIO interface was derived from iPlugIn, all image loaders were expected to implement HandleEvent(), which is a rather silly requirement for an image loader. All interfaces which were inheriting from iPlugIn now instead inherit from iBase. Actual plugin modules now directly implement iPlugIn, as well as implementing the various interfaces which used to be derived from iPlugIn. -*- Fixed a number of canvas implementations which were using SCF_DECLARE_IBASE() and SCF_IMPLEMENT_IBASE() rather than the _EXT() versions. -*- Fixed a number of 2D canvases which implemented iEventPlug but neglected to mention iEventPlug in the SCF_IMPLEMENT_IBASE() block. -*- Eliminated the cscmdConsoleStatusChange event and re-implemented this notification facility via an SCF class named iConsoleWatcher. -*- Augmented `haspython.sh' so that it now also checks /usr/local/python in addition to /usr and /usr/local. -*- Changed the `soft' makefile target to `soft3d' to be consistent with other renderer targets such as `gl3d', `null3d', and `line3d'; and to disambiguate from the "software" sound renderer. Also changed `infinite' target to `inf3d'. -*- Renamed FindBone() and FindFrameSet() to csFindBone() and csFindFrameSet() in order to avoid pollution of the global namespace. -*- Removed the obsolete igraphic/loader.h header. |
From: Philip W. <phi...@us...> - 2001-07-03 00:49:59
|
Date: Monday July 2, 2001 @ 17:49 Author: philwyett Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory usw-pr-cvs1:/tmp/cvs-serv16793/plugins/video/canvas/ggi Modified Files: ggi2d.cpp Log Message: Changed the following: csPlugIn -> csPlugin iPlugIn -> iPlugin scfiPlugIn -> scfiPlugin This change is a change of PlugIn for Plugin in all instances inside the libs, plugins and apps. This makes code read better and saves you a SHIFT key every so often - Don't say we don't think of your tired fingers. :-) Work in progress...Hope will be finished today... |
From: Eric S. <sun...@us...> - 2001-07-03 12:13:03
|
Date: Tuesday July 3, 2001 @ 5:13 Author: sunshine Update of /cvsroot/crystal/CS/plugins/video/canvas/ggi In directory usw-pr-cvs1:/tmp/cvs-serv14745/plugins/video/canvas/ggi Removed Files: ggi2d.cpp ggi2d.h ggi2d.mak Log Message: Eliminated the unmaintained `ggi' and `mgl2d' canvases. |