Click here to Skip to main content
Licence CPOL
First Posted 28 Oct 2006
Views 53,595
Downloads 1,879
Bookmarked 43 times

Panorama 360

By | 28 Oct 2006 | Article
OpenGL full 360 spherical panorama
Sample Image - panorama_net.jpg

Introduction

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.

Animation

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)

Enjoy!

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.

History

  • 29th October, 2006: Initial post

License

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

About the Author

zapsolution

Software Developer
zapsolution
France France

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionCannot use it with Visual Studio 2010 PinmemberDark Lord Malik2:00 6 Apr '12  
GeneralMy vote of 5 Pinmembermanoj kumar choubey20:01 26 Feb '12  
GeneralMy vote of 4 Pinmemberborlittle19:05 1 Jul '11  
QuestionQuality of Image Pinmemberzahra nessri22:12 8 Jan '11  
AnswerRe: Quality of Image Pinmemberzapsolution0:22 9 Jan '11  
GeneralCombine more than 2 images to genrate panorama Pinmemberpawangupta.gupta98:30 8 Dec '10  
Generalquestion Pinmemberloloberro6:23 24 Feb '07  
GeneralRe: question Pinmemberzapsolution8:36 24 Feb '07  
GeneralRe: question PinmemberTiramisung21:19 17 Mar '10  
GeneralRe: question Pinmemberzapsolution21:49 17 Mar '10  
GeneralPanorama 360 demo PinmemberBlubbo2:49 31 Oct '06  
Questionin a webform? Pinmemberrobrich3:51 30 Oct '06  
AnswerRe: in a webform? Pinmemberzapsolution4:18 30 Oct '06  
GeneralRe: in a webform? PinmemberJasmine25015:12 1 Nov '06  
QuestionGetting the Jpeg PinmemberCliffStanford0:41 30 Oct '06  
AnswerRe: Getting the Jpeg Pinmemberzapsolution4:23 30 Oct '06  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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 | Mobile
Web01 | 2.5.120517.1 | Last Updated 29 Oct 2006
Article Copyright 2006 by zapsolution
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid