Click here to Skip to main content
Click here to Skip to main content

Panorama 360

, 29 Oct 2006 CPOL
Rate this:
Please Sign up or sign in to vote.
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)

Share

About the Author

zapsolution
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.

Comments and Discussions

 
Questiondoes not work in Windows 8 PinmemberJayson Ragasa8-Nov-14 21:51 
QuestionCannot use it with Visual Studio 2010 PinmemberDark Lord Malik6-Apr-12 3:00 
GeneralMy vote of 5 Pinmembermanoj kumar choubey26-Feb-12 21:01 
GeneralMy vote of 4 Pinmemberborlittle1-Jul-11 20:05 
QuestionQuality of Image Pinmemberzahra nessri8-Jan-11 23:12 
AnswerRe: Quality of Image Pinmemberzapsolution9-Jan-11 1:22 
GeneralCombine more than 2 images to genrate panorama Pinmemberpawangupta.gupta98-Dec-10 9:30 
Generalquestion Pinmemberloloberro24-Feb-07 7:23 
GeneralRe: question Pinmemberzapsolution24-Feb-07 9:36 
GeneralRe: question PinmemberTiramisung17-Mar-10 22:19 
GeneralRe: question Pinmemberzapsolution17-Mar-10 22:49 
GeneralPanorama 360 demo PinmemberBlubbo31-Oct-06 3:49 
Questionin a webform? Pinmemberrobrich30-Oct-06 4:51 
AnswerRe: in a webform? Pinmemberzapsolution30-Oct-06 5:18 
GeneralRe: in a webform? PinmemberJasmine25011-Nov-06 6:12 
QuestionGetting the Jpeg PinmemberCliffStanford30-Oct-06 1:41 
AnswerRe: Getting the Jpeg Pinmemberzapsolution30-Oct-06 5:23 

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.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150129.1 | Last Updated 29 Oct 2006
Article Copyright 2006 by zapsolution
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid