- Computer graphics deals with generating images and art with the aid of computers. Today, computer graphics is a core technology in digital photography, film, video games, digital art, cell phone and computer displays, and many specialized applications.
- This project involved creating a visually appealing and realistic 2D scene environment using OpenGL and C++ for my computer graphics lab project. The objective was to simulate a diverse scene that includes various elements such as roads, a rail line, rail tracks, cars, multiple buildings, a sun, clouds, ships, and a boat in the sea. Leveraging OpenGL functions and C++ coding, I successfully implemented the scene, ensuring accurate representation in terms of colors, sizes, and textures for each element.
- Realistic 2D scene representation.
- Diverse elements including roads, rail lines, rail tracks, cars, buildings, sun, clouds, ships, and a boat.
- Utilization of OpenGL functions for rendering.
- Accurate color, size, and texture mapping for enhanced realism.
Download Software and install
- Codeblocks 10.05
- Glut 3.7.6
- Step: Create Environment
-
Copy glut32.dll to C:\Windows\System32 If it 64bit copy to C:\Windows\SysWOW64
-
Glut32.lib copy to C:\ProgramFiles(x86)\CodeBlocks\MinGW\lib
-
Glut.h copy to C:\ProgramFiles(x86)\CodeBlocks\MinGW\include\GL
- Step: Codeblocks -> Build Option Build option> add linker> find glut.lib again, add and ok
int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowPosition(0, 0);
glutInitWindowSize(1200,900);
glutCreateWindow("Natural Scene");
init();
glutDisplayFunc(display);
glutTimerFunc(25,update,0);
glutMainLoop();
}
1.mp4
2.mp4
3.mp4
The Project Documentation is here
I would like to acknowledge the OpenGL community for providing a powerful platform for graphics development. Additionally, I appreciate the support of my computer graphics lab instructor for guiding me throughout this project.
If you have any questions, feedback, or inquiries about my 2D scene project, please feel free to contact me at Email: ibrahim15-3802@diu.edu.bd