|
Rotating 3d cube using allegro 5 |
Scooter
Member #16,799
January 2018
|
Hi guys: |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Checklist : 1. Coordinates of cube vertices in 3D space My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Scooter
Member #16,799
January 2018
|
Hi Edgar: |
Edgar Reynaldo
Major Reynaldo
May 2007
|
That list was more of a suggestion as to what to understand in what order. Later steps need prior steps completed, but beginning steps are not hard. How far did you get? My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Scooter
Member #16,799
January 2018
|
Hi Edgar: |
Neil Roy
Member #2,229
April 2002
|
I recommend searching online for OpenGL tutorials. Youtube is good as well as several websites. You can do OpenGL in Allegro as well once set up right. --- |
Edgar Reynaldo
Major Reynaldo
May 2007
|
I spent a good part of today making a (mostly) half baked example demo of a textured cube for you. Included below is a zip file of all the source and a static win32 binary as well as the font I used. {"name":"611351","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/7\/77b00861336114a1a59b69162b82ad04.png","w":802,"h":633,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/7\/77b00861336114a1a59b69162b82ad04"} Press left and right to rotate around the cube and press up and down to change your ascension. Equals and Minus move you in or out. There are still some problems with it. The cube is supposed to be outlined in white but thats not working. And there's some text that's not drawing anymore, even though it used to and even though I reset the transformations and the letters are sideways don't know what caused that. I'm sure you're going to have a bunch of questions, but that's okay, ask away. I really want you to try this out, I know you're up to it. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Scooter
Member #16,799
January 2018
|
Good morning Edgar: |
Edgar Reynaldo
Major Reynaldo
May 2007
|
You need to link to OpenGL - "-lopengl32 -lglu32" . I'll post better instructions soon. I'm on my phone EDIT I made some updates on the cube demo. The text is back, the textures are right side up, and I added in axes and edges (the right color this time). {"name":"611352","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/7\/270dfbc1e04b3281211ec2ef45d3f3e6.png","w":802,"h":633,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/2\/7\/270dfbc1e04b3281211ec2ef45d3f3e6"} Let me know if you have trouble building it, or running it. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Scooter
Member #16,799
January 2018
|
Hi Edgar: |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Scooter said:
I am running Code:Blocks on Ubuntu. I have been trying to find On Ubuntu, you need to install the Mesa GL development packages. Allegro wiki said: OpenGL (libgl1-mesa-dev, libglu-dev) - Devel libs for OpenGL Note, this one may overwrite some files from your graphics drivers if you installed 3rd party binary drivers (ie: fglrx or nvidias binaries) So your commands would be : sudo apt-get install libgl1-mesa-dev libglu-dev How did you install Allegro? Where did you get it from? EDIT My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Scooter
Member #16,799
January 2018
|
Hi Edgar: Before I closed, I wanted to check to see if what you said was loaded: |
Edgar Reynaldo
Major Reynaldo
May 2007
|
If you're using CodeBlocks, and gcc, all you should need to do is link to OpenGL by using "-lopengl32" and "-lglu32" on your command line for the linking options. You say it's installed already, so linking should just work. GLUT is an alternative to Allegro, sure, but I think Allegro can do far more for you than GLUT can. Sure, GLUT is nice for simple examples, but beyond that it falls a little short. I use FreeGLUT from time to time, but not so much lately. Allegro does everything I need it to. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Neil Roy
Member #2,229
April 2002
|
Given the choice, Allegro is a FAR better one over GLUT. GLUT is very limited. You're better off picking the library you wish to use to make your game with and learning with it, like Allegro. In the end, once your library like GLUT or Allegro sets up the OpenGL context, they don't have much more to do with it. But they can give you more or less options you will need for a game. And Allegro is very nice for cross platform development. Partnered with OpenGL they make a great pair. --- |
Edgar Reynaldo
Major Reynaldo
May 2007
|
I just fired up OpenSUSE. I am running a 64 bit version, and I found libGL.so and libGLU.so in /usr/lib64 . You might try looking there if you're running a 64 bit version of Linux. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Scooter
Member #16,799
January 2018
|
Hi Edgar: |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Relax. Post the steps you're taking to compile the program. Be specific, and complete. Post the full error messages as well. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Scooter
Member #16,799
January 2018
|
Hi Edgar: |
Edgar Reynaldo
Major Reynaldo
May 2007
|
I found out, it should be called 'libGL.so' and 'libGLU.so'. Use 'find' to find the files. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Scooter
Member #16,799
January 2018
|
Edgar: |
Edgar Reynaldo
Major Reynaldo
May 2007
|
So then in your static build, link to them. -lGL -LGLU , and then whatever else you need. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|