Archives June 2011

Django + JQuery Mobile Quick Start Tutorial

I've uploaded a tutorial and a very minimal library for creating JQuery Mobile sites with Django.  It's actually the first time I've used PyPI's documentation hosting system, mostly because Launchpad doesn't have a web-page hosting mechanism.  The library (django-jqm) is not intended to be a platform for creating "real" sites, it's just a bunch of sample code for getting started fast creating very basic sites from your existing Django sites.

Continue reading

JQuery Mobile Django Baseline

Playing with a JQuery Mobile baseline template for Django this afternoon. Just a set of templates, urls, static files, etceteras which give a "mobile app-like" base from which to begin development in a new project. I'm not particularly satisfied with it yet; I coded it directly into a "regular" app, and it really should have been a "pluggable" app (that's mostly just a matter of naming, really) and some (hopefully) simple instructions for installing it. Oh well, can refactor it some other day.

Continue reading

Dumb PyDoc Replacement for PyOpenGL

I have been using "standard" Pydoc (actually slightly hacked) to document PyOpenGL outside the man pages, but PyOpenGL is almost entirely composed of things that don't work well with the standard tools; functions are actually class instances that check for availability before attempting to call, "functions" are defined in "raw" modules then imported into their final locations, lots of the code is replaced by accelerator modules, etceteras.

Some time ago I started writing a rather stupid little replacement tool that is PyOpenGL specific and can be (easily) taught how to handle new object-types.  The biggest downside of it is ...

Continue reading

Miscellaneous jQuery Mobile + Django tips

Some little tips on how to make your "normal" Django site work properly under jQuery mobile:

  • as mentioned before, put your JQM setup code into a base template that all of your mobile pages extend, this means that users can go to any "normal" url and still get the jQuery effects loaded
  • create a "content" and "title" block (at least), much as you would on a normal page template, map those into the JQM data-role=header/content so that you don't have any particularly JQM markup in the individual pages; provide your navigation, django message-display and login/logout buttons ...

Continue reading

IDE without File|Open or File|Save is... painful

As mentioned a while ago, I switched my desktop from Ubuntu to Kubuntu because Unity was just too half-baked to be used in my setup. That went relatively well, modulo the need to restart 3 times to get the desktop to come up (KDE just hung on login). However, one truly annoying casualty is that Eric4 can no longer open up any file dialogs (I didn't notice this for most of a day, and can go quite a while before it bites me, but when it does, it bites hard, as it segfaults the process).

When I trace through ...

Continue reading

jQuery Mobile + Django gets Pleasantly Out of the Way

Have been doing quite a bit of work combining jQuery Mobile with Django for certain (internal) projects.  You can set up the JQM stuff with a few lines in your template, then mostly "forget" about it while developing a regular Django form-based site (though you'll want to use HTML5 widget types).  The only major things that keep coming up as pain points are the inability to properly handle redirects (this is a browser limitation, as JQM can't know that it was redirected on a form post), and the poor handling of "download" links (i.e. download results as ...

Continue reading

ARB draw_instanced + ARB texture_buffer_object == Best Sphere Renderer

As mentioned last week, the ARB draw_instanced extension allows you to draw large numbers of the same basic geometric shape with a single rendering call. However, to be useful, you need to pass in per-instance parameters which are used to customize the rendering. With the ARB uniform_buffer_object extension, you can get up to ~200-300 objects before running into memory-allocation failures.

With the ARB texture_buffer_object, by comparison, you can go far higher. My current test is rendering 15,000 textured, medium-quality (224 triangles each), per-pixel-lit, spheres at approximately 200fps on my old laptop.[1]

This would seem to answer the question ...

Continue reading

No luck on GLSLDevil + PyOpenGL yet

Hit a bug in my ARB buffer texture test-case this morning and decided to try out GLSLDevil to see what's going on in the shader (basically I seem to be getting out the wrong values from my texelFetch() calls).  Long story short, while I can do a bit of hackery to get past some initial failures (basically ctypes utils find_library doesn't use the hooks GLSLDevil is using), it appears that the whole edifice crashes when attempting to load entry points from the wrapper library which are not wrapped (or something of that nature), which happens during PyOpenGL initialization ...

Continue reading

Daily archives

Previous month

May 2011

Next month

July 2011