Click here to Skip to main content
12,892,596 members (46,040 online)
Click here to Skip to main content
Add your own
alternative version


51 bookmarked
Posted 28 Oct 2006

Panorama 360

, 28 Oct 2006 CPOL
Rate this:
Please Sign up or sign in to vote.
OpenGL full 360 spherical panorama
Sample Image - panorama_net.jpg


The project uses exclusively the features found in VISUAL C# 2005 Express Edition.

The purpose of this demo is to mimic the JAVA applets that can be found over the NET to create virtual tours.


Use either buttons or direction keys to change view angle.

About the Code

The code itself is small, but there are two important points:

  1. Handling of keyboard direction keys is done in Form_KeyDown and Form_PreviewKeydown, this is to bypass the nasty TAB order that would rather put the focus on trackbar, instead of the OpenGL control.
  2. To perform smooth animation and limit CPU usage I am using a tip, using StartAnimation and the WndProc Api.WM_TIMER message, altogether.

Note: I am using GDImage to select a new panorama and create OpenGL texture and font on the fly, but you can use any other OpenGL helper doing the same, this won't affect the core RenderOpenGL method.

Apart of the MAIN_Form class, the project uses 3 specific classes:

  • OpenGL.cs (dedicated OpenGL API encapsulation)
  • Win32.cs (low level Win32 API encapsulation)
  • GDImage.cs (low level graphic encapsulation)

ZIP Content

  • Project source code for .NET 2.0+
  • Two JPEG textures in the \bin\debug folder
  • GDImage.dll in the \bin\debug folder (prerequisite to create OpenGL texture and font on the fly)


You can check for the latest version here in the "C# corner" section.
You will also find on my C# Web page other demos that haven't been posted here.


  • 29th October, 2006: Initial post


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer zapsolution
France France
I am a low level SDK programmer, focusing mainly on graphic imaging and multimedia applications.
I am using several languages, including C, C++, PowerBASIC, WinDev.
I wrote also a few demos in C#, but i never used DotNET in real code production.

You may also be interested in...

Comments and Discussions

Questiondoes not work in Windows 8 Pin
Jayson Ragasa8-Nov-14 20:51
memberJayson Ragasa8-Nov-14 20:51 
SuggestionRe: does not work in Windows 8 Pin
Member 127961694-Nov-16 22:57
memberMember 127961694-Nov-16 22:57 
GeneralRe: does not work in Windows 8 Pin
zapsolution4-Nov-16 23:45
memberzapsolution4-Nov-16 23:45 
QuestionCannot use it with Visual Studio 2010 Pin
Dark Lord Malik6-Apr-12 2:00
memberDark Lord Malik6-Apr-12 2:00 
GeneralMy vote of 5 Pin
manoj kumar choubey26-Feb-12 20:01
membermanoj kumar choubey26-Feb-12 20:01 
GeneralMy vote of 4 Pin
borlittle1-Jul-11 19:05
memberborlittle1-Jul-11 19:05 
QuestionQuality of Image Pin
zahra nessri8-Jan-11 22:12
memberzahra nessri8-Jan-11 22:12 
AnswerRe: Quality of Image Pin
zapsolution9-Jan-11 0:22
memberzapsolution9-Jan-11 0:22 
GeneralCombine more than 2 images to genrate panorama Pin
pawangupta.gupta98-Dec-10 8:30
memberpawangupta.gupta98-Dec-10 8:30 
Generalquestion Pin
loloberro24-Feb-07 6:23
memberloloberro24-Feb-07 6:23 
GeneralRe: question Pin
zapsolution24-Feb-07 8:36
memberzapsolution24-Feb-07 8:36 
GeneralRe: question Pin
Tiramisung17-Mar-10 21:19
memberTiramisung17-Mar-10 21:19 
GeneralRe: question Pin
zapsolution17-Mar-10 21:49
memberzapsolution17-Mar-10 21:49 
GeneralPanorama 360 demo Pin
Blubbo31-Oct-06 2:49
memberBlubbo31-Oct-06 2:49 
Questionin a webform? Pin
robrich30-Oct-06 3:51
memberrobrich30-Oct-06 3:51 
AnswerRe: in a webform? Pin
zapsolution30-Oct-06 4:18
memberzapsolution30-Oct-06 4:18 
GeneralRe: in a webform? Pin
Jasmine25011-Nov-06 5:12
memberJasmine25011-Nov-06 5:12 
QuestionGetting the Jpeg Pin
CliffStanford30-Oct-06 0:41
memberCliffStanford30-Oct-06 0:41 
AnswerRe: Getting the Jpeg Pin
zapsolution30-Oct-06 4:23
memberzapsolution30-Oct-06 4:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170424.1 | Last Updated 29 Oct 2006
Article Copyright 2006 by zapsolution
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid