How to draw on a Window in WPF (best practice)?

Typically, you “draw” in WPF in a completely different manner. In Windows Forms/GDI, the graphics API is an immediate mode graphics API. Each time the window is refreshed/invalidated, you explicitly draw the contents using Graphics. In WPF, however, things work differently. You rarely ever directly draw – instead, it’s a retained mode graphics API. You … Read more

OpenGL, How to create a “bumpy Polygon”?

I think what your looking for is actually Parallax mapping (Or Parallax Occlusion mapping). Demos: http://www.youtube.com/watch?v=01owTezYC-w http://www.youtube.com/watch?v=gcAsJdo7dME&NR=1 http://www.youtube.com/watch?v=njKdLvmBl88 Parralax mapping basically works by using the height map to alter the texture UV coordinate being used. The main disadvantage to parallax is that anything that appears to be ‘outside’ the polygon will be clipped (think of … Read more

what are sparse voxel octrees?

Here’s a snippet about id Software on this subject. id Tech 6 will use a more advanced technique that builds upon the MegaTexture idea and virtualizes both the geometry and the textures to obtain unique geometry down to the equivalent of the texel: the Sparse Voxel Octree (SVO). It works by raycasting the geometry represented … Read more

Polygon Triangulation with Holes

To give you some more choices of libraries out there: Polyboolean. I never tried this one, but it looks promising: http://www.complex-a5.ru/polyboolean/index.html General Polygon Clipper. This one works very well in practice and does triangulation as well as clipping and holes holes: http://www.cs.man.ac.uk/~toby/alan/software/ My personal recommendation: Use the tesselation from the GLU (OpenGL Utility Library). The … Read more

How does Content-Aware fill work?

I am a co-author of the PatchMatch paper previously mentioned here, and I led the development of the original Content-Aware Fill feature in Photoshop, along with Ivan Cavero Belaunde and Eli Shechtman in the Creative Technologies Lab, and Jeff Chien on the Photoshop team. Photoshop’s Content-Aware Fill uses a highly optimized, multithreaded variation of the … Read more

How were graphical DOS Games written? [closed]

Assembler, Pascal and C were popular languages. Graphics were generated by directly interfacing with the display hardware, for instance the Color Graphics Adapter. (CGA) Probably there were libraries, but not like today, and libraries were often not shared outside a company. A resource which would have been relevant in say, 1988, can be found here: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)