Jedi Master
Jedi Master
Posts: 336
Joined: Sun Aug 09, 2009 9:16 am
Allegiance:: Jedi
User avatar
Jedi Master
Jedi Master
Re: C++ GUI Frameworks

Post by Matthew »

I'm having troubles with C++ now.
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/cscalelib.so, 2): Symbol not found: _glBindFramebufferEXT
Referenced from: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/cscalelib.so
Expected in: dynamic lookup
Thats with my C++ extension for python. Seems the OpenGL library wont link properly and I don't know why, I've tried all sorts of gcc arguments.

There's not much help regarding compiling OpenGL on OSX in C++.
User avatar
Sam
Jedi Council Member
Jedi Council Member
Posts: 481
Joined: Thu Dec 17, 2009 12:33 pm
Allegiance:: Neutral
Location: UK
User avatar
Jedi Council Member
Jedi Council Member
Re: C++ GUI Frameworks

Post by Sam »

This might help you out:

http://www.network-theory.co.uk/docs/gc ... index.html

it saved my ass once.
Administrator
Administrator
Posts: 3307
Joined: Thu Dec 24, 2009 2:06 am
Allegiance:: Space Rome
Location: ON, Canada
User avatar
Administrator
Administrator
Re: C++ GUI Frameworks

Post by Scott »

Have you looked at the OpenGL SuperBible? I've skimmed through it and it seems neat if your interested in learning everything there is to know about OpenGL. I found it at Chapters but I'm sure many bookstores have it.

On a side note, I've been writing a program that takes an inputted number and determines if it is a prime or composite number. I've done many revisions and this is what I have so far:

Code: Select all

#include <iostream>

int main()
{
    using namespace std;
    
    int input, oneortwo = 0, test, ans = 0, i = 2;
    
    cout << "Enter a number to be checked as a prime or composite number\n";
    cin >> input;

    if (input == 1 || input == 2)
    {
              ans = 1;
              oneortwo = 1;
                            
    }   
  
    while (i != input)
    {   
          if (oneortwo == 1)
          break;       
          
          test = (input%i);
          
          cout << "Test: " << test << "\t\ti: " << i << endl;
                          
          i++;
                          
          if (test == 0)
          {
                   ans = 0;
                   break;                   
          }
          else 
          {
                   ans = 1; 
          }          
                    
    }
    
    if (ans == 0)
    {
            cout << endl << input << " is a Composite Number\n";
    }
    else
    {
            cout << endl << input << " is a Prime Number\n";
    }          
    
    cout << "\nPress ENTER to quit\n";
    cin.get();
    cin.get();
    return 0;
}     
This line:

Code: Select all

          cout << "Test: " << test << "\t\ti: " << i << endl;
is just for debugging but will write quite a bit on screen but it will end and not just keep going. If anyone finds any bugs or numbers that are misinterpreted then please let me know. You need a C++ compiler and although I would upload the program itself, you can't upload .exe files so your going to need a compiler.
Image
Jedi Master
Jedi Master
Posts: 336
Joined: Sun Aug 09, 2009 9:16 am
Allegiance:: Jedi
User avatar
Jedi Master
Jedi Master
Re: C++ GUI Frameworks

Post by Matthew »

And I have a Mac.
Tretarn wrote:This might help you out:

http://www.network-theory.co.uk/docs/gc ... index.html

it saved my ass once.
Thank you but I managed to find the problem. I needed to remove the build directory before rebuilding the extension.

Now it imports fine but the function I'm using for testing results in a bus error. I haven't been very good with my error handling. I'll finish a few bits and then try it again.

I hope to use some cg effects. I've had a look for gaussian blur effects and cg can do that it seems. cg is highly optimised and works with OpenGL so it seems like a good way to get high performance graphics and should surely allow me to get 60fps constantly with my simple 2D game.
Jedi Knight
Jedi Knight
Posts: 195
Joined: Wed Mar 10, 2010 5:41 pm
Allegiance:: Jedi
User avatar
Jedi Knight
Jedi Knight
Re: C++ GUI Frameworks

Post by sukispartan »

Me: :?:
Administrator
Administrator
Posts: 3307
Joined: Thu Dec 24, 2009 2:06 am
Allegiance:: Space Rome
Location: ON, Canada
User avatar
Administrator
Administrator
Re: C++ GUI Frameworks

Post by Scott »

Anyone here try SFML or SDL? I hear that SFML is more efficient (with benchmarks to prove it) and overall a better package. Yet, there are more library errors with SFML than SDL. Do you have a preference or opinion?
Image
Jedi Master
Jedi Master
Posts: 336
Joined: Sun Aug 09, 2009 9:16 am
Allegiance:: Jedi
User avatar
Jedi Master
Jedi Master
Re: C++ GUI Frameworks

Post by Matthew »

SFML has a python wrapper. I might give it a go in my game. Perhaps it's faster than pyglet and pyglet is the bottleneck in my game. It says it's fast.
Administrator
Administrator
Posts: 3307
Joined: Thu Dec 24, 2009 2:06 am
Allegiance:: Space Rome
Location: ON, Canada
User avatar
Administrator
Administrator
Re: C++ GUI Frameworks

Post by Scott »

I tried to setup SFML with Code::Blocks with numerous fresh install and numerous failures. Posting my problem on the internet I found out that it's just an error with SFML that requests a .dll that is not existent (or something on those lines). I might try SDL but I need a .tar unpacker which is no small feet with dial-up.
Image
Jedi Master
Jedi Master
Posts: 336
Joined: Sun Aug 09, 2009 9:16 am
Allegiance:: Jedi
User avatar
Jedi Master
Jedi Master
Re: C++ GUI Frameworks

Post by Matthew »

If you just want to test out OpenGL, you can use the simple GLUT included with OpenGL. It's not very advanced but does the job for trying things out.
Administrator
Administrator
Posts: 3307
Joined: Thu Dec 24, 2009 2:06 am
Allegiance:: Space Rome
Location: ON, Canada
User avatar
Administrator
Administrator
Re: C++ GUI Frameworks

Post by Scott »

I've considered OpenGL but I was looking for something all-in-one. I might try it and then try OpenAL for the audio.
Image
Jedi Master
Jedi Master
Posts: 336
Joined: Sun Aug 09, 2009 9:16 am
Allegiance:: Jedi
User avatar
Jedi Master
Jedi Master
Re: C++ GUI Frameworks

Post by Matthew »

You want to use the abstracted functions and classes in those libraries?

The good thing about learning OpenGL is that it's transferrable across all of those libraries and you have precise control over your graphics code.
Jedi Adept
Jedi Adept
Posts: 67
Joined: Fri Jun 11, 2010 12:13 pm
Allegiance:: Sith
Location: Toronto
Contact:
User avatar
Jedi Adept
Jedi Adept
Re: C++ GUI Frameworks

Post by The Last Byte »

I only use Microsoft Visual Studio 2010 for all my programming.

Great Structure and great dependability.
█||||||||(•)█Ξ████████████████████████████████████████)
Administrator
Administrator
Posts: 3307
Joined: Thu Dec 24, 2009 2:06 am
Allegiance:: Space Rome
Location: ON, Canada
User avatar
Administrator
Administrator
Re: C++ GUI Frameworks

Post by Scott »

These are graphics libraries not IDEs. I use Dev and Code::Blocks for my environment.
Image
Jedi Master
Jedi Master
Posts: 336
Joined: Sun Aug 09, 2009 9:16 am
Allegiance:: Jedi
User avatar
Jedi Master
Jedi Master
Re: C++ GUI Frameworks

Post by Matthew »

Pyglet is no good so I may try SFML next. I was looking into Objective-C and Cocoa for OSX as well. It's very confusing. Is there anything else worth considering?

I've asked for help here - http://www.opengl.org/discussion_boards ... Post279798
Administrator
Administrator
Posts: 3307
Joined: Thu Dec 24, 2009 2:06 am
Allegiance:: Space Rome
Location: ON, Canada
User avatar
Administrator
Administrator
Re: C++ GUI Frameworks

Post by Scott »

I have a book on Obj2.0 but I never got around to...you know...purchasing a Mac. SFML is good if you can get it to work. There is a .dll problem with it at the moment which won't allow me to anything with it. I found that it's a common problem with no fix to be found. If it does work for you I think it's worth the time. Cocoa is confusing? I was always under the impression it was simplified.
Image
Post Reply