Post the code that we worked up for the simple shader comparison tool in PyOpenGL. Why not share the knowledge with other beginners?! Good stuff. When we get deeper in I may not want to share all of our tricks, or I might not care... not sure, but, on this level, I KNOW I am hungry searching for good code and it is so hard to find, so, in good conscience, I just gotta do it. Unfortunately, I don't have it on hand. Thus, the reminder post. I'll erase this later. Peace. (as if anyone is reading this lol)
PS. What I am referring to above is that I got a few simple shaders working on Mike and I's sphere demo thing. Phong, multiple light phong, toon, point light. Basic stuff. Also we added the ability to swap out shaders on the fly to see the difference. Mike created triangle mesh sphere from scratch complete with proper VBO's to house the vertices and normals. He also created a version that has what he's calling "averaged normals". It makes a polyhedron (in this case shaped much like a sphere) appear smoother and rounder as if made from exponentially more triangles. Awesome technique. So know we have this demo thing where we can test new shaders and play around with GLSL and OpenGL. Next, come more complicated shaders, then textures, then effects... etc...
2011-07-08
2011-07-05
Installing PyOpenGL in Windows XP
I'm going to post this as is. I kept a record on notepad as I went. It ain't exactly a tutorial. Just a weB LOG of figuring out what to do!
Used this site as a reference point, (among others):
http://pyopengl.sourceforge.net/documentation/installation.html
It's sourceforge, so I tend to trust it, but I think it's wicked old...
BTW I am on my sister's family PC... ;) (stuck here dog-sitting)
Here's the rest:
Started just after 2:30am or so...
Installed (In Order):
python-2.7.2
PyOpenGL-3.0.1.win32
*could NOT install PyOpenGL-accelerate-3.0.1.win32-py2.6
because it requires Python 2.6 precisely.
- tried to install numpy-1.6.1rc2-win32-superpack-python2.6 (Numeric Python), but it
too requires 2.6.
-Downloaded the tarball file for Python 2.6.7 (Python-2.6.7.tar.bz2)j
-Downloaded and installed 7Zip.
-extracted the bz2 and then unzipped to the program files folder
- ^that did not work... apparently I need to use makefiles etc... and I'm not about to get into that whole process blind. Couldn't find any tutorials/instructions or forum chatter so...
-Downloaded MSI installer for Python 2.6
-^installed
-installed Numpy (see above)
-downloaded and installed PIL-1.1.7.win32-py2.6
(http://www.pythonware.com/products/pil/index.htm#pil117)
-Tried to install GLUT, but then realized that it SHOULD be included with the PyOpenGL
install (according to: http://pyopengl.sourceforge.net/documentation/installation.html)
-Downloaded PyGame installer for 2.6 (pygame-1.9.1.win32-py2.6) and installed.
-Installed PyOpenGL-3.0.1.win32
-Installed PyOpenGL-accelerate-3.0.1.win32-py2.6
-Installed Numpy
#will ANY OF THIS S#!T WORK? God knows...
It DID NOT appear to work (when I tried to run some Rubik's Cube/NEHE based code I found I got lots of discouraging errors, especially involving OpenGL calls and Numpy)
GACK!!!
Uninstalled everything I could find and re-installing... hopefully in the proper order this time...? (At least I already have all the installers found and dl'd)
4:31am
-Downloaded updated drivers for this crappy Intel video chipset on AK's PC and installed'em
-Restarting PC now
-Re-installed Python 2.6
-Downloaded and installed OpenGL Extensions Viewer 3.37
-It says that OpenGL 1.4 is the version on this PC
-Installed numpy-1.6.1rc2-win32-superpack-python2.6
-Installed PIL-1.1.7.win32-py2.6
-Installed PyOpenGL-3.0.1.win32 (which supposedly contains GLUT and GLE)
-When attempting to install PyOpenGL-accelerate-3.0.1.win32-py2.6 I got a pop up error
window. FAILED TO INSTALL ^^^^
-Spent an hour or so bouncing around the net like a fly caught in a spider web... googling
"pyopengl nehe" over and over in different forms
-FINALLY found http://pypi.python.org/pypi/PyOpenGL-Demo
-This package contains most of the NEHE lessons ported to PyOpenGL
-Ran Lesson 5 and it worked!!! yay!!!
TOMORROW I work on getting the tune shader working AND THEN phong...
5:45am Ouch...
Used this site as a reference point, (among others):
http://pyopengl.sourceforge.net/documentation/installation.html
It's sourceforge, so I tend to trust it, but I think it's wicked old...
BTW I am on my sister's family PC... ;) (stuck here dog-sitting)
Here's the rest:
Started just after 2:30am or so...
Installed (In Order):
python-2.7.2
PyOpenGL-3.0.1.win32
*could NOT install PyOpenGL-accelerate-3.0.1.win32-py2.6
because it requires Python 2.6 precisely.
- tried to install numpy-1.6.1rc2-win32-superpack-python2.6 (Numeric Python), but it
too requires 2.6.
-Downloaded the tarball file for Python 2.6.7 (Python-2.6.7.tar.bz2)j
-Downloaded and installed 7Zip.
-extracted the bz2 and then unzipped to the program files folder
- ^that did not work... apparently I need to use makefiles etc... and I'm not about to get into that whole process blind. Couldn't find any tutorials/instructions or forum chatter so...
-Downloaded MSI installer for Python 2.6
-^installed
-installed Numpy (see above)
-downloaded and installed PIL-1.1.7.win32-py2.6
(http://www.pythonware.com/products/pil/index.htm#pil117)
-Tried to install GLUT, but then realized that it SHOULD be included with the PyOpenGL
install (according to: http://pyopengl.sourceforge.net/documentation/installation.html)
-Downloaded PyGame installer for 2.6 (pygame-1.9.1.win32-py2.6) and installed.
-Installed PyOpenGL-3.0.1.win32
-Installed PyOpenGL-accelerate-3.0.1.win32-py2.6
-Installed Numpy
#will ANY OF THIS S#!T WORK? God knows...
It DID NOT appear to work (when I tried to run some Rubik's Cube/NEHE based code I found I got lots of discouraging errors, especially involving OpenGL calls and Numpy)
GACK!!!
Uninstalled everything I could find and re-installing... hopefully in the proper order this time...? (At least I already have all the installers found and dl'd)
4:31am
-Downloaded updated drivers for this crappy Intel video chipset on AK's PC and installed'em
-Restarting PC now
-Re-installed Python 2.6
-Downloaded and installed OpenGL Extensions Viewer 3.37
-It says that OpenGL 1.4 is the version on this PC
-Installed numpy-1.6.1rc2-win32-superpack-python2.6
-Installed PIL-1.1.7.win32-py2.6
-Installed PyOpenGL-3.0.1.win32 (which supposedly contains GLUT and GLE)
-When attempting to install PyOpenGL-accelerate-3.0.1.win32-py2.6 I got a pop up error
window. FAILED TO INSTALL ^^^^
-Spent an hour or so bouncing around the net like a fly caught in a spider web... googling
"pyopengl nehe" over and over in different forms
-FINALLY found http://pypi.python.org/pypi/PyOpenGL-Demo
-This package contains most of the NEHE lessons ported to PyOpenGL
-Ran Lesson 5 and it worked!!! yay!!!
TOMORROW I work on getting the tune shader working AND THEN phong...
5:45am Ouch...
2011-06-22
Android Graphics Tutorials
Found a helpful blog. Thought I'd post some links here:
The Organic Android by Ruben Lopez
Starting to play with graphics
Creating 2D games with Android and Blender
The Organic Android by Ruben Lopez
Starting to play with graphics
Creating 2D games with Android and Blender
2011-06-07
Root LG Optimus V (Android 2.2 Froyo)
Well it appears I have FINALLY rooted my Optimus V! Woo Hoo! For those who don't know what I'm talking about, I have taken over the Android OS so that I can do all sorts of things like install custom apps and roms and, perhaps most importantly MOVE APPS TO THE SD DRIVE that won't move with App2SD alone.
Considering the tiny amount of available memory on this model, this is huge! In my humble opinion, this phone was starting to become a huge disappointment, because I was constantly having to remove applications that I really wanted, just so the phone would work. I LOVE my Android phone, but, in the end, it is a hand sized mobile computer and no computer with choked memory space is worth a crap in a fast paced world, full of brand new apps and things to try every week.
So here is the sight I primarily used to do the job.
http://forum.androidcentral.com/optimus-v-rooting-roms-hacks/57485-how-root-lg-optimus-v.html
Earlier in the evening (week, month... lol), I accessed all sorts of sites all over the net. I first tried the process in Ubuntu 10.04, couldn't seem to get it done. I won't get into why. I'm no guru and I didn't keep notes. If I had, they would only confuse anyone who read them. Myself included I'll bet. Anyway, here are some sites I did read to help figure out what I was doing and what I might be doing wrong. I'm still not sure why it didn't work the 2 or 3 times before the last try, because I don't recall changing anything really at that point.
http://forum.xda-developers.com/showthread.php?t=803682
http://shortfuse.org/?page_id=2
I THOUGHT about using this method:
http://www.addictivetips.com/mobile/how-to-root-lg-optimus-v-virgin-mobile/
... but it involved putting files on the SD Card and it sounded more complicated than I wanted to get into at first. Later, however I may want to go back and install LEGO-ROM-V2. We'll see.
As per Revolution Red's instructions, I installed "Superuser" and "Titanium Backup".
Here is a sight with a "user manual" for Titanium Backup.
And a post I found at DROIDLIFE talking about moving apps. It mentions Titanium Backup, too.
Considering the tiny amount of available memory on this model, this is huge! In my humble opinion, this phone was starting to become a huge disappointment, because I was constantly having to remove applications that I really wanted, just so the phone would work. I LOVE my Android phone, but, in the end, it is a hand sized mobile computer and no computer with choked memory space is worth a crap in a fast paced world, full of brand new apps and things to try every week.
So here is the sight I primarily used to do the job.
http://forum.androidcentral.com/optimus-v-rooting-roms-hacks/57485-how-root-lg-optimus-v.html
Earlier in the evening (week, month... lol), I accessed all sorts of sites all over the net. I first tried the process in Ubuntu 10.04, couldn't seem to get it done. I won't get into why. I'm no guru and I didn't keep notes. If I had, they would only confuse anyone who read them. Myself included I'll bet. Anyway, here are some sites I did read to help figure out what I was doing and what I might be doing wrong. I'm still not sure why it didn't work the 2 or 3 times before the last try, because I don't recall changing anything really at that point.
http://forum.xda-developers.com/showthread.php?t=803682
http://shortfuse.org/?page_id=2
I THOUGHT about using this method:
http://www.addictivetips.com/mobile/how-to-root-lg-optimus-v-virgin-mobile/
... but it involved putting files on the SD Card and it sounded more complicated than I wanted to get into at first. Later, however I may want to go back and install LEGO-ROM-V2. We'll see.
As per Revolution Red's instructions, I installed "Superuser" and "Titanium Backup".
Here is a sight with a "user manual" for Titanium Backup.
And a post I found at DROIDLIFE talking about moving apps. It mentions Titanium Backup, too.
2011-02-11
Some notes on preparing Eclipse for Python Development
According to this site - http://clebeaupin.wordpress.com/2007/09/23/how-to-python-on-eclipse-ide/ - I'll be needing the following:
Parts of the instructions on the page above are outdated, so I had to adjust for the Galileo distro that I am currently running. I referred to this site - http://download.eclipse.org/webtools/updates/ - to find out how to add the WTP to Eclipse.
Install WTP:
1. Open Eclipse. Go to Help>Install New Software...
2. Click on Add... (upper right)
The Add Site dialogue box appears.
3. Enter a name for reference (I used Web Tools Updates)
and enter http://download.eclipse.org/webtools/updates/ in the Location field.
You'll be back on the Available Software screen.
4. Click on the drop down menu arrow just to the left of the Add... button.
5. Find the site you just added and click on it.
6. Type "web" in the field that has grey letters reading "type filter text".
7. Check the boxes for:
Web Tools Platform(WTP) 3.1.2
Web Tools Platform SDK (WTP SDK) 3.1.2
8. Click the Next> button at the bottom.
9. Click I accept the terms of the license agreement
(It's open source, no worries!)
10. and click Finish.
Eclipse will go about preparing your packages.
About a minute later Eclipse will stop and ask you to confirm that you trust the Eclipse site from which you are downloading.
11. Check the box at the upper left and then OK down at the bottom to continue the installation.
12. When it finishes, you will want to click the button to restart Eclipse and your done.
Install CVS:
(TO BE CONTINUED>>> BED TIME!)
Install Subversive:
Refer to this site for full installation instructions:
http://www.twm-kd.com/software/eclipse-galileo-and-svn-support/
- WTP (Web tools platform) to edit CSS, JS, HTML and XML files
- CVS to work with CVS repositories
- Subclipse to work with SVN repositories
- Pydev to edit python files
- AnyEditTools to add very useful features in text edition
Parts of the instructions on the page above are outdated, so I had to adjust for the Galileo distro that I am currently running. I referred to this site - http://download.eclipse.org/webtools/updates/ - to find out how to add the WTP to Eclipse.
Install WTP:
1. Open Eclipse. Go to Help>Install New Software...
2. Click on Add... (upper right)
The Add Site dialogue box appears.
3. Enter a name for reference (I used Web Tools Updates)
and enter http://download.eclipse.org/webtools/updates/ in the Location field.
You'll be back on the Available Software screen.
4. Click on the drop down menu arrow just to the left of the Add... button.
5. Find the site you just added and click on it.
6. Type "web" in the field that has grey letters reading "type filter text".
7. Check the boxes for:
Web Tools Platform(WTP) 3.1.2
Web Tools Platform SDK (WTP SDK) 3.1.2
8. Click the Next> button at the bottom.
9. Click I accept the terms of the license agreement
(It's open source, no worries!)
10. and click Finish.
Eclipse will go about preparing your packages.
About a minute later Eclipse will stop and ask you to confirm that you trust the Eclipse site from which you are downloading.
11. Check the box at the upper left and then OK down at the bottom to continue the installation.
12. When it finishes, you will want to click the button to restart Eclipse and your done.
Install CVS:
(TO BE CONTINUED>>> BED TIME!)
Install Subversive:
Refer to this site for full installation instructions:
http://www.twm-kd.com/software/eclipse-galileo-and-svn-support/
2011-02-05
New Game Project
My brother, Mike, and I have begun working on a game. Get this - since he knows Fortran, because he's an aerospace engineer, we are creating in PyOpenGL, but also using a Fortran wrapper for some speedy mathematical calculations. It promises to be interesting.
So, off I go learning again. Here are some links I'm using to help with the PyOpenGL coding:
http://www.geometrian.com/Tutorials.php
http://pyopengl.sourceforge.net/context/tutorials/shader_1.xhtml
Sure wish I could find the original full source code to that one (above)!
As always, this is mostly for my own reference, but if I come across any useful information I will pass it along to the blog.
So, off I go learning again. Here are some links I'm using to help with the PyOpenGL coding:
http://www.geometrian.com/Tutorials.php
http://pyopengl.sourceforge.net/context/tutorials/shader_1.xhtml
Sure wish I could find the original full source code to that one (above)!
As always, this is mostly for my own reference, but if I come across any useful information I will pass it along to the blog.
2010-12-16
Another Set of OpenGL for Android tutorials
I found another set of tutorials for android.
They were posted starting back in December of '09 at INsanityDesign.com.
Here's the link.
They were posted starting back in December of '09 at INsanityDesign.com.
Here's the link.
2010-12-07
Unreal 3 Engine Coming to Android???
Looks like UDK will soon be unleashed in the world of Android:
http://www.talkandroid.com/14541-unreal-engine-3-coming-to-android/
http://www.talkandroid.com/14541-unreal-engine-3-coming-to-android/
Android and OpenGL ES related links
I've been hacking away at Android SDK. Here are some newb-tastic beginner level tutorials, links and resources that I have been culling over and using lately:
First see my earlier post for some easy tuts on installing Eclipse and the Android "ADK".
Then get your "Hello World" on - using Java inside Eclipse - by using this awesomely easy tutorial... here. That one is just Java, not Android.
Then watch your Android Virtual Device "say Hello", by going here: Android Development 101 - Part 1: Hello World. Yes, this will create a graphical virtual android phone on your screen!
Okay, these two are sequential. Mind you, you MUST have a working installation of the Android SDK in Eclipse working in order to implement these easily. OpenGL ES is quite similar (nearly identical in parts) to OpenGL, so knowledge of OpenGL will be quite helpful as well.
I've also been reading a hard copy of Head First Java, that's correct, I am quite new to Java.
Meanwhile I'm progressing through the Android Development 101 tutorials at Hack A Day. (Mentioned above). Quite nice. These guys really make me feel like a newb, but that's because of the other stuff they are doing. THESE articles on this subject are well written and targeted at the beginner. I've gone through part 3. All tuts work great in my Linux Eclipse Galileo (3.5.1) Android Virtul Device. I keep referring back to these to remind me of simple things like what to type into the fields when I create new Android projects in Eclipse. Newb-ile details like that save a student like me countless hours --> Google rarely turns up details on what everyone "in the know" assumes to be obvious. Know what I mean?
OpenGL ES is included in Android projects through simple import statements and then it looks a lot like OpenGL within the project. For example: GLSurfaceView is included as a class in the Android API. Here is the technical page at Android Developers web site.
-----------------------------------------------------------------
I haven't looked at this one in depth yet, but I'm gonna slap it up here for future perusal. http://www.ibm.com/developerworks/java/tutorials/j-java3d/section3.html
It's concerning simple Java 3D graphics from way back in 2001. Dunno if it's worth anything yet.
First see my earlier post for some easy tuts on installing Eclipse and the Android "ADK".
Then get your "Hello World" on - using Java inside Eclipse - by using this awesomely easy tutorial... here. That one is just Java, not Android.
Then watch your Android Virtual Device "say Hello", by going here: Android Development 101 - Part 1: Hello World. Yes, this will create a graphical virtual android phone on your screen!
Okay, these two are sequential. Mind you, you MUST have a working installation of the Android SDK in Eclipse working in order to implement these easily. OpenGL ES is quite similar (nearly identical in parts) to OpenGL, so knowledge of OpenGL will be quite helpful as well.
OpenGL ES Tutorial for Android – Part I – Setting up the view
OpenGL ES Tutorial for Android – Part II – Building a polygon
(THANKS! to Per-Erik Bergman at the Jayway Team Blog for the tuts!)I've also been reading a hard copy of Head First Java, that's correct, I am quite new to Java.
Meanwhile I'm progressing through the Android Development 101 tutorials at Hack A Day. (Mentioned above). Quite nice. These guys really make me feel like a newb, but that's because of the other stuff they are doing. THESE articles on this subject are well written and targeted at the beginner. I've gone through part 3. All tuts work great in my Linux Eclipse Galileo (3.5.1) Android Virtul Device. I keep referring back to these to remind me of simple things like what to type into the fields when I create new Android projects in Eclipse. Newb-ile details like that save a student like me countless hours --> Google rarely turns up details on what everyone "in the know" assumes to be obvious. Know what I mean?
OpenGL ES is included in Android projects through simple import statements and then it looks a lot like OpenGL within the project. For example: GLSurfaceView is included as a class in the Android API. Here is the technical page at Android Developers web site.
-----------------------------------------------------------------
I haven't looked at this one in depth yet, but I'm gonna slap it up here for future perusal. http://www.ibm.com/developerworks/java/tutorials/j-java3d/section3.html
It's concerning simple Java 3D graphics from way back in 2001. Dunno if it's worth anything yet.
2010-09-07
Installing Android SDK (and eclipse)
Found a great blog article about installing the Android Software Development Kit in Ubuntu. Check it out!
http://www.mattcutts.com/blog/install-android-on-ubuntu/
http://www.mattcutts.com/blog/install-android-on-ubuntu/
Subscribe to:
Posts (Atom)