Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - phusg

Pages: [1]
1
First off: Thanks very much for your reply eXpl0it3r!

You're right that C++/OpenGL no stroll in the park and so I'm now practising doing other stuff to get me to the point where I can further develop this glgalaxy code.

Still it would be nice if I could just get this code running on my machine so I also have an idea of how computationaly intensive it is. This is how far I've got:

> you could create four empty projects with one workbench and add to all of the the one related source file

I've done this, assuming you mean matrix.cpp is the related source file of each project, as each of the 4 .cpps in the Makefile includes matrix.cpp, and 3 of them build to give an executable. (BTW, to link against OpenGL on windows I found out I needed the -lopengl32 switch instead of the linux only -lGL.)

The one that doesn't build is gltexture. That one is slighly more complicated as it also includes lodepng.cpp (which also needs lodepng.h). Building the gltexture project results in almost 300 multiple definition errors along the lines of

/lodepng.cpp:1811: multiple definition of `LodeZlib_read32bitInt(unsigned char const*)'

Is there an incompatibility between this LodePNG version 20110417 and SFML 1.6? As I said glgalaxy seems to have been written in SFML 1.2, but unfortunately that has now been taken offline. Or should I be looking elsewhere?

I'm still not entirely sure what I should make of the all: gljitter line from the Makefile. Does that mean gljitter.cpp is a dependency of each of the other 3 projects too?

Any help, suggestions, tips much appreciated!

2
I'm relatively new to SFML and even C++ but am highly motivated to learn the ropes via this great project I've found: https://github.com/dustyco/glgalaxy (basically a beautified version of the classic xscreensaver galaxy)

The .cpp files have #include <GL/gl.h> so I'm assuming it's a SFML 1.2 project. I've set up SFML 1.6 with the Dwarf2 version of GCC 4.4.1 in Code::Blocks 10.05 and have built and run my first SFML executable.

After a lot of googling I'm still not any further as to how to port the Makefile based glgalaxy code (which I assume was made in Linux) to my windows Code::Blocks project, hence my cry for help! The makefile is pretty simple as they go:

all: gljitter

gldemo: gldemo.cpp
        g++ -O3 -o gldemo gldemo.cpp -lsfml-system -lsfml-window -lGL

gltexture: gltexture.cpp
        g++ -O3 -o gltexture gltexture.cpp -lsfml-system -lsfml-window -lGL

gljitter: gljitter.cpp
        g++ -O3 -o gljitter gljitter.cpp -lsfml-system -lsfml-window -lGL

gl3d: gl3d.cpp
        g++ -O3 -o gl3d gl3d.cpp -lsfml-system -lsfml-window -lGL

Any pointers or hints are much appreciated! What I still don't get at the moment is why there isn't a main.cpp and why only the lodepng has a header file (yes I have a lot to learn, please help me on my way).

Pages: [1]
anything