Friday, 29 November 2013

Creating your own Forum using PunBB

In this article we create a forum on local machine using xampp.

Prerequisites:


  • xampp is installed on your machine. 


Installing the forum:

There are many ready made, easy to install forums are available on the internet. I have chosen "punbb" (which is a php powered discussion board or forum). You can find more info on punbb.informer.com official site.
  • Go to download page.
  • Download recent version zip file.
  • Extract the zip file.
  • Go to "C:\xampp\htdocs" (default xammp installation folder).
  • Create a new folder as "forum".
  • Copy all the contents of the extracted punbb folder to this newly created "C:\xampp\htdocs\forum" folder.
  • Start Apache and MySQL server from xampp control panel and check whether they are running or not by typing http://localhost in your favorite browser.
  • Click on phpmyAdmin 
  • Click on Databases tab
  • Create a new database with the name "myforum".
  • You will see a configuration screen as shown below.
  • Fill the details as shown below.
  • After filling the details click on "Start Install"
  • You will be redirected to "successful installation page". Now click on "go to the forum index" link
  • We will redirected to the forum home page

That's it we are done with the installation of a forum.

Happy Coding..:)






Sunday, 24 November 2013

OpenGL for Dummies #1:Introduction

What is OpenGL?

OpenGL is an Application Programming Interface (API) for  rendering 2D and 3D computer graphics using simple primitives like points, lines, polygons, triangles, images and bitmaps.

Setting up OpenGL Environment on Windows 7

OpenGL more or less comes with the system. However, you will need to ensure that you have downloaded and installed a recent driver for your graphics hardware. You can find the updated driver and more details here.
Now we know that our operating system with updated graphics hardware drivers has the openGL API that we what to use. But we are not sure of the openGL version installed on the system. Next section will help you in finding out the OpenGL version currently present on your system.

Finding OpenGL version installed on your System?

To know about the OpenGL version installex on the system, we need GLEW (OpenGL Extension Wrangler Library). GLEW provides efficient run-time mechanisms for determining which OpenGL extensions are supported on the target platform. Follow the below steps to get started with GLEW:



  • Download the zip file and extract it.
  • Copy the glew-x.xx.xx folder to "C:\GL" (if not present create GL folder in C:\ drive).
  • Go to "C:\GL\glew-x.xx.x\bin\Release\Win32" path
  • Run "glewinfo.exe"
  • New "glewinfo.txt" file will be created which contains all the information about  supported OpenGL features, commands and different versions installed on your machine.

Now we know the version of openGl. But this is not enough to render the graphics on to the screen. We need utility toolkit to handle the window operations, keyboard operations. Next section will describe installation of Graphic Library Utility Toolkit (GLUT) on your system.

Installing GLUT (freeglut)



  • Download recent version of freeglut.
  • Extract the zip file and copy "freeglut-x.x.x" folder to "C:\GL".
  • Open "C:\GL\freeglut-x.x.x\VisualStudio\2010\freeglut.sln"\ in Visual Studio 2010
  • Rebuild the project.

  • The built libraries and dlls can be found at "C:\GL\freeglut-2.8.1\lib\x86\Debug" (we require these binaries for creating our own OpenGL projects) 

We are all set to run OpenGL programs. We will write our first graphics program in the next tutorial.

Happy Coding.. :)