Click here to Skip to main content
13,792,910 members
Click here to Skip to main content

Stats

70.4K views
6.8K downloads
87 bookmarked
Posted 30 Oct 2010
Licenced CPOL

Writing a Platform and GUI Toolkit Independent OpenGL Class

, 1 Nov 2010
Article showing how to write OS and GUI toolkit portable OpenGL view class
basecode
linux
MultiGL
GLView
GLViewGTKApp
.project
AUTHORS
autom4te.cache
output.0
requests
traces.0
ChangeLog
config.guess
config.h.in
config.sub
configure
configure.in
COPYING
depcomp
glviewgtkapp.gladep
INSTALL
install-sh
Makefile.am
Makefile.in
missing
mkinstalldirs
NEWS
po
ChangeLog
Makefile.in.in
POTFILES.in
README
src
Makefile.am
Makefile.in
stamp-h.in
GLViewMotifApp
.project
autom4te.cache
output.0
requests
traces.0
config.h.in
configure
configure.ac
depcomp
install-sh
Makefile.am
Makefile.in
missing
src
Makefile.am
Makefile.in
GLViewQtApp
.project
GLViewQtApp.ico
GLViewQtApp.pro.user
glviewqtapp.qrc
Makefile
Resources
.project
autom4te.cache
output.0
requests
traces.0
config.guess
config.h.in
config.sub
configure
configure.ac
depcomp
install-sh
m4
Makefile.am
Makefile.in
missing
src
Makefile.am
Makefile.in
win32
MultiGL
GLView
GLViewGTKApp
AUTHORS
ChangeLog
configure.in
devcpp
glviewgtkapp.dev
glviewgtkapp.gladep
Makefile.am
msvc
glviewgtkapp.suo
glviewgtkapp.vcproj
NEWS
po
ChangeLog
POTFILES.in
README
src
Makefile.am
stamp-h.in
GLViewMFCDlgApp
GLViewMFCDlgApp.aps
GLViewMFCDlgApp.vcproj
res
GLViewMFCDlgApp.ico
GLViewMFCMDIApp
GLViewMFCMDIApp.vcproj
res
buttons.bmp
filelarge.bmp
filesmall.bmp
GLViewMFCMDIApp.ico
GLViewMFCMDIAppDoc.ico
main.bmp
Toolbar.bmp
Toolbar256.bmp
writelarge.bmp
writesmall.bmp
GLViewQtApp
GLViewQtApp
GLViewQtApp.ico
glviewqtapp.qrc
GLViewQtApp.vcproj
Makefile
moc_glviewqtapp.o
Resources
GLView.cpp.bak
GLView.suo
GLView.vcproj
MultiGL.suo
Requires autotools installed
Note: convenience scripts to build and run the samples are provided.
In case you want to perform the build and then run the samples individually on your own, use the procedure given below.

1) Build the GLView library first. For things to work hasslefree use the following procedure.
	Using the commands below...
	> cd GLView
	> autoreconf --install
	> ./configure --prefix=$PWD/../
	> make install
	...creates a directory named include and lib in the toplevel directory and installs the GLView.h in the include directory and libGLView.so and its links in the lib directory.

2) Set the LD_LIBRARY_PATH variable to point to the lib directory.
	e.g. Let us say the toplevel directory is /home/yourname/MultiGL
	The lib dirctory is MultiGL/lib
	in this case, in bash...
	export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/yourname/MultiGL/lib
	in tcsh...
	setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:/home/yourname/MultiGL/lib

	

3) Build the examples that you would like to see.
	For Gtk example, GTK+ devel packages should be installed.
	Using the commands below... (applicable for Motif example too)
	cd GLViewGTKApp
	autoreconf --install
	./configure --prefix=$PWD/../
	make install
	...creates a folder named bin in the toplevel directory and installs the executable in it.

	For Qt example you can either use QtCreator or use qmake-qt4 to generate the makefile and use it from command line. The executable is installed in the top level bin directora as the other examples.

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

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

Share

About the Author

Sharjith
Product Manager Mahindra & Mahindra
India India
Sharjith is a Mechanical Engineer with strong passion for Automobiles, Aircrafts and Software development.

You may also be interested in...

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web03 | 2.8.181207.3 | Last Updated 1 Nov 2010
Article Copyright 2010 by Sharjith
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid