Quantcast
Channel: The Code Log » C
Browsing all 10 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

GLUT Geometric Shapes

This is a sample app that demonstrates GLUT geometric shapes. It allows you to go through all the shapes in wireframe and solid modes and lets you interact with the shape by rotating it, resizing it...

View Article



Image may be NSFW.
Clik here to view.

Memory Visualizer

“Memory Visualizer” is a program implemented in C++ using the OpenGL library. It allows you to browse and see the contents (in decimal, hex, char and binary formats) of every address in the process...

View Article

Image may be NSFW.
Clik here to view.

OpenGL Frame Rate

Calculating the frames per second in our Graphics application makes sense when we are displaying animation, which is simply a collection of images displayed rapidly and in sequence.When we watch a...

View Article

Image may be NSFW.
Clik here to view.

OpenGL Image Generator

The idea behind this post is very simple: generate m x n grid of pixels, with each pixel having a random color. Every time the user clicks the mouse or presses the ‘g’ key, a new random color is...

View Article

Image may be NSFW.
Clik here to view.

OpenGL Resolution

This is a simple OpenGL app that runs in full screen (game mode), shows every other pixel in alternating color, and displays the screen resolution (m x n grid of pixels) and the screen dimension in...

View Article


Image may be NSFW.
Clik here to view.

OpenGL Color Interpolation

Using the GL_LINES mode, OpenGL will draw for us a line for every two vertices we specify. glBegin (GL_LINES); glColor3f (1, 0, 0); glVertex2f (x0, y0); glColor3f (0, 0, 1); glVertex2f (x1, y1); glEnd...

View Article

Image may be NSFW.
Clik here to view.

C Pointer Tricks

I’ve been exploring\reading more about C pointers (mostly from this source) and I’ve found the following interesting tricks. Trick 1 – Pointer Arithmetics Question What is the result of running the...

View Article

Image may be NSFW.
Clik here to view.

Dynamic Three Dimensional Arrays in C\C++\C#\Java

If you come from a Java or C# perspective and want to create a multi-dimensional array in C or C++, you’ll soon figure out that multi-dimensional array allocation in C\C++ is not as simple, plus you’ll...

View Article


Image may be NSFW.
Clik here to view.

GLUT Menu World

This post demonstrates how to create a GLUT menu and add to it sub-menus and menu items. In the above sample app, clicking on a menu item in the popup menu will log that menu item’s ID to the console...

View Article


Image may be NSFW.
Clik here to view.

OpenGL Camera

The concept of a camera in a Graphics application is simple. Just imagine that what you see is the view of the camera. So adjusting the camera lens or moving\rotating it should affect your view. In the...

View Article
Browsing all 10 articles
Browse latest View live




Latest Images