Wednesday, December 11, 2013

Basic .Net Socket Class Implementation in C#

Introduction

The .Net Framework provides a Socket class which has the all properties of TcpClient , TcpListener and UdpClient and plus its own methods. For details of .Net Socket class you can see here. In my previous articles I have shown you the basic implementation of TcpClient, TcpListener and UdpClient class. Here we are going to use the Socket class. Many things are same as previous articles so I like to discuss only Socket class implementation and ignore other things

Downloading the source code

Download complete source code from below:

Basic UDP socket echo client server program in C#

Introduction

This program is same as previous chapter TCP Echo client server only difference is implementation of UDP socket. This chapter highlight the difference between TCP and UDP connection. TCP is analogous to telephone communication but UDP is analogous to mail box communication. TCP socket is required to establish a connection before data transfer where as UDP does not required to establish a connection before communication but we have to specify the destination address for each one i.e message called a datagram carries its own address information and is independent of all others. Message send through UDP can lost but in TCP doesn't. Data transfer rate is faster in UDP connection rather than TCP connection. So, UDP socket is used in such area where higher Data transfer rate is important rather than accurate data transfer for example live video telecast.

Download Source code

You can download the complete source code below:
UDPClient
UDPServer 

Basic TCP socket echo client server program in C#

Introduction

Here we will create a simple echo client and echo server program where client send the message string to the server and server echoed back the same message string to the client. Download the both client and server source code compile it and run both in command window. IP address , port and message are passed through command line argument.

Download Source Code

You can download the complete source code form below.
TcpEchoClient
TcpEchoServer

Saturday, August 31, 2013

OpenGL with Qt tutorial Creating OpenGL Widget with Qt Creator

In this articles, we will discuss about using the OpenGL with Qt GUI application. We just create the OpenGL window with Qt GUI application using Qt creator. In upcoming tutorials series I will show rendering the 3D object , event handling and other with OpenGL and Qt GUI application.

Download Qt creator

Qt 5.1.0 for Windows 32-bit (MinGW 4.8, OpenGL, 666 MBform http://qt-project.org/downloads

Introduction

This tutorial provides basic implementation of OpenGL with Qt GUI application. It shows how to integrate the OpenGL with Qt GUI application. Qt provides a widget called QGLWidget for rendering graphics which enables you to easily integrate OpenGL with Qt. This tutorials only includes OpenGL widget and related class to integrate with Qt. It doesn’t include the details of OpenGL rendering pipeline and Qt GUI. To learn and understand this tutorial you must have basic knowledge of Qt GUI and OpenGL rendering pipeline.  In this tutorial, we will use modern OpenGL version 3.2 and GLSL 1.5 as a shader language.

Monday, August 26, 2013

Basic GLFW Tutorials with C++

GLFW (OpenGL FrameWork) is open source library to create OpenGL Window and multi-platform  too. Very easy to manage OpenGL context and event with GLFW. It is specially suitable for game development. GLFW doesn't render 3D scene for that you have to use OpenGL library function. GLFW help to create window , handle keyboard , mouse and joystick events. This tutorials is for those who are new to OpenGL and GLFW. By the end of this tutoirals series understand the basic knowledge about OpenGL and handling events with GLFW.

Tutorials 1: Setup GLFW in Code::Blocks IDE in Windows Machine

Tutorials 2:  Introduction to GLFW

Tutorials 3: Drawing Basic Shapes

Tutorials 4: Transformation: Translation, Rotation and Scalling

Tutorials 5: Texture Mapping 

Saturday, July 27, 2013

Modern OpenGL Tutorial Series

Modern OpenGL are different than ancient opengl version before 2.0. After opengl 2.0 vetex shader and fragment shader are implemented. So modern opengl can be difficult for beginner. Here I tried to write a tutorial which are useful for beginner. 
All chapter focus on game development rather than other opengl implementation. These tutorials are useful for those who want to start modern opengl quick and know the ancient opengl befor version 2.0. All the chapter focus on example rather then explaining opengl in details. For details understanding of OpenGL you can read this tutorials site which was great that I found.

Modern OpenGL tutorial 3D model .obj loader/parser with C++ and GLM

When you need to draw a more advanced object like character, house, terrain, vehicles we can't pass the vertices by ourselves for these object so we have to use the 3D model and model are simply the meshes made of one or more number of vertices. There are many 3D modeling software one of them is blender which is open source also. Blender help to create the model and export it into different file format like .obj, 3ds, md2 etc among them I choose the .obj (wave front obj) file which is very simple. OBJ only contain vertex, normal, texture and other material information. It doesn't support animation for animation we can use  3ds, md2  3Dmodel. There are many library to load 3D model. In this articles I will show you how to write your own .obj model parser.