tag:blogger.com,1999:blog-77207225702851650752024-02-29T05:28:57.870+05:45Code in code::blocksDownload Mini project in c,c++,c# ,OpenGL,GLUT,GLFW,windows form application source codeDinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.comBlogger80125tag:blogger.com,1999:blog-7720722570285165075.post-28981234446223362872023-11-03T05:21:00.003+05:452024-01-09T17:57:41.158+05:45Chapter 2: Contact Management in C | File Handling <<Previous ChapterIf you remember we have categoried all the functions into two types user functions and operational functions. Here I will explain the operational function and its usage in user functions one by one.First, let's define Variables and Data Structure.
// Define Constant Variables
#define ESC 27
#define MAX_NAME_SZ 15
#define MAX_NUM_SZ 25
#define READ_ARRAY_SZ 15
#Dinesh Subedihttp://www.blogger.com/profile/14592859300444169698noreply@blogger.com0tag:blogger.com,1999:blog-7720722570285165075.post-12259660002004510742023-11-01T14:50:00.003+05:452024-01-09T17:56:43.153+05:45Chapter 1: Contact Management in C | Flow Chart and Functions<<Previous Chapter  Dinesh Subedihttp://www.blogger.com/profile/14592859300444169698noreply@blogger.com0tag:blogger.com,1999:blog-7720722570285165075.post-80121364700746001182020-03-28T04:09:00.002+05:452024-01-09T17:52:21.318+05:45Quiz Game in C Part 3: Final Game Play and scoreFirst Page
In previous articles, we created functions, multi-dimensional character array to store questions, options, and answers. Up to this point, we have everything ready to finish gameplay.
Here we will use the following techniques:
Create for loop to display question one by one
Create another infinite loop inside for loop to check the answer given by the user. The loop breaks only if the Dinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com0tag:blogger.com,1999:blog-7720722570285165075.post-52297906459734079602020-03-28T04:08:00.002+05:452024-01-09T17:53:35.757+05:45Quiz game in C Part 2: Multi-dimensional C array
Previous Page Dinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com0tag:blogger.com,1999:blog-7720722570285165075.post-75484306293148556122020-03-28T04:07:00.002+05:452024-01-09T17:53:16.905+05:45Quiz Game in C part 1 - Flow Chart and Main Menu
Previous Page &Dinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com2tag:blogger.com,1999:blog-7720722570285165075.post-920740613711468932013-08-26T19:55:00.001+05:452013-08-26T19:55:32.492+05:45Basic 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 Dinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com1tag:blogger.com,1999:blog-7720722570285165075.post-33190119370917126262013-07-27T18:32:00.001+05:452015-05-10T15:15:24.944+05:45Modern OpenGL Tutorial Series
Modern OpenGL are different than ancient opengl version before 2.0. After opengl 2.0 vetex shader and fragment shader became compulsory. It is little bit difficult for beginner to start.
All chapter include basic concept of Modern OpenGL and especially focus on beginner. After going through all the chapter user can get concept of shader, drawing shapes, perspective projection, transformation, Dinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com1tag:blogger.com,1999:blog-7720722570285165075.post-24662144448221476112013-07-27T06:45:00.000+05:452015-05-10T15:40:15.817+05:45Modern 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 Dinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com1tag:blogger.com,1999:blog-7720722570285165075.post-34149213825929471922013-06-21T08:53:00.001+05:452015-05-10T15:36:10.945+05:45Modern OpenGL tutorial Texture Mapping Example source code
Texture mapping technique haven't change in Modern OpenGL. If you are experience in ancient version of OpenGL you might have done Texture mapping which is similar to here.Only difference is adding the extra variable to the vertex shader and fragment shader. Texture memory lie in video memory similar to VBO which is uploaded to OpenGL. Two things we have to pass in vertex shader and fragment Dinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com1tag:blogger.com,1999:blog-7720722570285165075.post-30819737207910681622013-06-20T23:36:00.000+05:452015-05-10T15:35:23.550+05:45Modern OpenGL tutorial Playing with color example
At first have a look screen shot of our program what we have going to build.
You have seen a triangle having different color at each vertex. In previous tutorials series we are just drawing the white triangle without color.
Download
All the code in this series of articles is available from github: https://github.com/smokindinesh/Modern-OpenGL-Series You can download a zip of Dinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com0tag:blogger.com,1999:blog-7720722570285165075.post-91390633490893727812013-05-31T23:16:00.000+05:452015-05-10T15:34:27.628+05:45Modern OpenGL tutorial Rotation, Scalling and Translation Matrix using GML (OpenGL Mathematics)
In previous article perspective projection I have shown you how to do perspective projection. Now its time to do Scalling, Translation and Rotation which are very important task. In ancient version of OpenGL for these operation opengl provide funcition like glRotate, glScale, glTranslate but in modern opengl this function are not available so we are using GLM (OpenGL Mathematics) for doing Dinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com0tag:blogger.com,1999:blog-7720722570285165075.post-80393916425539458822013-05-31T21:49:00.000+05:452013-05-31T21:49:11.809+05:45Setup GTK project in Code::Blocks (windows 7)
Follow the following step to setup GTK project in Code::Blocks (windows 7)
step 1: Download gtk+-bundle_2.24.10-20120208_win32.zip (all-in-one bundle) from http://www.gtk.org/download/win32.php
step 2: Extract it in c drive creating new directory or any other place. In my case C:\GTK is the directory where I extracted the zip file.
My extracted files looks like below.
Dinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com18tag:blogger.com,1999:blog-7720722570285165075.post-56640157780964114352013-05-19T21:46:00.000+05:452015-05-10T15:33:52.659+05:45Modern OpenGL tutorial Perspective Projection using GLM (OpenGL Mathematics)
In my previous article you may notice that in vertex data for drawing a triangle, I have fixed the co-ordinate of z-axis to 1. If you change the value of z-axis greater than 1 or less than -1 then Image will not render on the screen because we haven't define the perspective projection matrix. In this project we are using GLM , in previous article there is no especial use Dinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com0tag:blogger.com,1999:blog-7720722570285165075.post-38591765302004651532013-05-18T16:25:00.003+05:452015-05-10T15:32:57.692+05:45Modern OpenGL tutorial Drawing the basic shapes
This article is almost similar to my previous tutoirals series. In previous article we draw only triangle but here we are drawing other shapes.
Download
All the code in this series of articles is available from github: https://github.com/smokindinesh/Modern-OpenGL-Series You can download a zip of all the files from that page, or you can clone the repository if you are Dinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com0tag:blogger.com,1999:blog-7720722570285165075.post-83723483719565837662013-05-18T15:18:00.002+05:452015-05-10T15:29:45.897+05:45Modern OpenGL tutorial: Introduction to shader GLSL (OpenGL shader language)
Shader are compulsory on Modern OpenGL and most important. Shader are a little program they run in GPU i.e for OpenGL, shader run in rendering hardware. There are many shader language available but we use GLSL (OpenGL Shader Language) which is very similar to C but not C. For beginner, shader can be new things so just think it is a little program written in different language that Dinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com0tag:blogger.com,1999:blog-7720722570285165075.post-6179042186462348332013-05-08T09:24:00.001+05:452015-05-10T15:30:12.532+05:45Beginner learning materials for Modern OpenGL API version 3.2
Just copy the code below, compile and run it in Code::Blocks to insure that you have successfully setup Moden OpenGL following instruction given in previous chapter Setup Modern OpenGL in Codeblocks . Also make sure that your pc graphics hardware (GPU) supports OpenGL API version 4.2 or later.
Download
All the code in this series of articles is available from github: https://Dinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com0tag:blogger.com,1999:blog-7720722570285165075.post-89937084019676744652013-05-08T08:44:00.000+05:452015-02-12T22:51:06.596+05:45Setup Modern OpenGL with GLFW, GLEW and GLM in Codeblocks
Modern OpenGL 3 and above version may be difficult especially for beginner because of new shaders and buffer object concepts. OpenGL 1.x is simple to understand and to setup the project also which you can find in my previous articles here. By setting the GLUT or just by including gl.h and glu.h we can acess the OpenGL function because all the API function are determined in compiled Dinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com18tag:blogger.com,1999:blog-7720722570285165075.post-35583370716760346962012-12-29T23:50:00.002+05:452012-12-29T23:50:58.246+05:45Using OpenCV in GTK sample program "Inverting an image on Image Processing"
In this article I want to show you How we can use the OpenCV on GTK (GIMP toolkit) on fedora.Although GTK+ is a GNU project like the GMP, it is released under the terms of the more liberal LGPL(lesser general public license) that permits software (including closed source proprietary software) to be written using GTK+ without payment of fees, royalties, or other restirictions. The freedom offeredDinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com0tag:blogger.com,1999:blog-7720722570285165075.post-69818634727818992682012-12-29T22:18:00.001+05:452012-12-29T22:23:30.797+05:45Using semaphore to synchronize the multiple thread using c on linux/fedora
Semaphore is a new type of variable introduced by E. W. Dijkstra. You may learn about semaphores in university. It is used to solve the Producer-Consumer Problem in Operation system design which I have learn in books "Modern Operating Systems " (second edition) by Andrew S. Tanenbaum. In that books the algorithm for semaphore is clearly defined and easy to understand. But I was always curious Dinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com0tag:blogger.com,1999:blog-7720722570285165075.post-460655868946113652012-12-28T18:00:00.000+05:452012-12-28T18:00:59.220+05:45Threads Program using c on linux/fedora
<!--
@page { margin: 0.79in }
P { margin-bottom: 0.08in }
This program creates a single extra
thread, shows that it is sharing variables with the original thread,
and gets the new thread to return a result to the original thread.
Multithreaded programs don't get much simpler than this.
Lets look the function which create the
thread. pthread_create creates a new thread,much as fork Dinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com0tag:blogger.com,1999:blog-7720722570285165075.post-83400376882040563122012-12-25T09:42:00.004+05:452013-04-08T19:28:28.923+05:45Bash Shell Scripting example project "library management"
<!--
@page { margin: 0.79in }
P { margin-bottom: 0.08in }
This program is a sample shell script.
To understand this project you must know the basic syntax of shell
programming. In this article I tried to show an example how we can
use a shell as a programming language. I have build the very simple
shell script for managing a library books. If you are completely new
to shell Dinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com4tag:blogger.com,1999:blog-7720722570285165075.post-27085849456891945412012-12-01T15:54:00.001+05:452012-12-17T21:25:52.915+05:45Creating Static Libraries using c on linux Fedora.
You have seen the library file ".lib" extension on Windows and a ".a" on LINUX/UNIX.If you are unknown about what are they and how to create them then you will get answer here.
These are Static Library files, also known as archives, which are simply a collection of ordinary object files. It is a set of routines, external functions and variables which are resolved in a caller at Dinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com0tag:blogger.com,1999:blog-7720722570285165075.post-86964736300200330312012-11-16T22:50:00.001+05:452012-12-17T21:22:05.066+05:45Start learning C on Linux (Fedora)
We students learn c on windows . We create the executable file (.exe) using turbo c or gcc compiler that runs only in windows machine. Have you tried the c on Linux and generating executable file for Linux? Not yet then follow this article.
In this article you learn how to:
1. Install linux (e.g fedora or ubuntu)
2. Install gcc compiler in fedora
3. Compile the c program using gccDinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com0tag:blogger.com,1999:blog-7720722570285165075.post-64956341487526530122012-08-04T23:03:00.002+05:452017-02-24T11:48:11.253+05:45C project on Medical Store Management System with source
This is large and complete c project built for medical store management system. In this project you can keep details of customer , suppliers and medicine. You can view the report and billing information also. You can add,edit, delete and search the record also. This project is also console application without graphics compile in code::blocks IDE with MinGW compiler.
Whole project is completely Dinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com16tag:blogger.com,1999:blog-7720722570285165075.post-24707368637708152972012-08-04T22:30:00.001+05:452017-03-04T20:27:44.170+05:45Employee’s Management System Project in c++ with source
This is another Mangagement project which is suitable for school or college mini project. It is written in c++ language in code::blocks IDE with MinGW compiler. It is console application without graphics. Whole project is completely based on file handling all the employee’s record are store in file. You learn how to store the data, editing data, searching data and deleting the data using file. Dinesh Subedihttp://www.blogger.com/profile/15921581026092958477noreply@blogger.com14