the Fiddler's picture

New sample browser

Avalaible through SVN, today.

I've been putting this off for a long time, but being on vacation in Switzerland I decided it was time to tackle this. Finally.

New features:

  1. Samples are now organized in three large categories and multiple subcategories, making them easier to browse.
  2. Each sample now comes with a short description and an explanation of its concepts.
  3. The source code of each sample is available right in the sample browser.

Obligatory screenshots below.

Still missing / help wanted:

  1. The aforementioned explanations. If you have some time to burn, consider picking a sample and writing a short explanation (examples: how does GLSL work? How does immediate mode work?). Any document format other than pdf is fine (the sample browser uses rtf).
  2. Source-code highlighting. If you are aware of any highlighting rich text-boxes that work on Mono, please post a link!
  3. Check that this works on Mono 2.0+. Mono 1.9.2 seems to work relatively well (scrolling artifacts in the rich text-box), but still need to confirm it works in newer versions.
  4. Modify the examples so that they work outside of the Examples project without modification. This generally means putting a couple of #ifdef regions around the Example attribute and inside the main method.
  5. Touch up some of sample sub-category icons.

Features under consideration:

  1. Make the source-code editable. This would be very cool for quick experimentation (change a line here or a constant there and see what happens!) and a prototype already exists in a branch, but it's relatively complicated to make it work reliably. Besides, the sample browser is no code editor (no autocompletion, no error checking), so it might be easier to just copy the code into a real editor. What do you think?
  2. Use CodeDOM to translate the samples to Visual Basic and C++/CLI, similar to MSDN.
  3. Add screenshots to each sample.
  4. Find a more intelligent way to specify which document / source file belongs to which example. Right now you need to add the relevant files as resources, which is not very nice (because you need to update the resources every time you change the code of a sample.)

Help / comments appreciated.

Images

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
objarni's picture

Slick I tell ya!

Is that a GLControl you render things on to the left?

the Fiddler's picture

No, it's a plain TreeView. I considered using a GLControl for the right pane, but it would be a lot of work for little reason.

objarni's picture

The kerning, is it a GL effect or did you do it with Gimp or something?

the Fiddler's picture

Gimp to the rescue. It's one of its alpha-to-logo effects, 'Glowing Hot' IIRC.

triton's picture

Looks good. Though I think the TreeView shouldn't have those graphics (they look a bit ugly).

Continue the good work! :)

jakov's picture

I can not find it. I did download the newest release but sample brower is not like in the picture above. Please provide the link

the Fiddler's picture

To quote the original post, 'available through SVN'. It's not released yet, you'll have to download the code from SVN and compile it (simply run 'Build/Build.exe', type 'vs' and hit enter twice. You can open the resulting solution with Visual Studio / SharpDevelop / MonoDevelop).