KOceanSaver

Screensavers

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

10
7 .7
Description:

An under water screen saver for KDE4
Thanks to John Stamp for your help.

todo:
sea creature swimming pattern
camera movement (swimming through seen)

How to Install:
1 install package build-essential cmake kdebase-workspace-dev libqt4-opengl-dev or your distros equivalent
2 download.
3 extract (tar -xzf "the file you downloaded")
4 change to the new directory (KOceanSaver)
5 cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr CMakeLists.txt
6 sudo make install

And a big thanks to the guys and gals at mepis-deb.org for making the debian packages for all of us who use a debian distro.

If your distro is not (k)ubuntu then you may or may not need the -DCMAKE_INSTALL_PREFIX:PATH=/usr. a simple
1 cmake CMakeLists.txt
2 sudo make install
will work for you.
Last changelog:

7 years ago

0.1, 0.2, 0.3
1 Faster skeleton animation function for fish. (this dropped CPU usage by half or more on my computer even with wave added. Matrix is only calculated once for each bone instead of once for each vertex)
2 Added ocean surface with waves. (Please let me know what you think)
3 Moved things around to make it more aesthetic

Please give feedback so I know if I'm going in the right direction

0.4
1. Changed time basted movement (much faster now)
2. Adding Setting Dialog.
3. Adding new fish

0.5
1 Changed form qmake to cmake.

0.6
1 Added rocking motion.

0.7
1. Bug fixes and performance improvements.
2. Added Orca.
3. Added new function for attached fish (remora).

0.8
1. Bug fixes (fish disapeare after screen suspend)
2 Added fish: Grouper.

tittiatcoke

9 years ago

Hi,

When building, I get the following build-error:

[ 55%] Building CXX object src/CMakeFiles/koceansaver.kss.dir/ocean.o
/home/hq000006/Downloads/KOceanSaver/src/ocean.cpp: In member function ‘virtual void Ocean::resizeGL(GLint, GLint)’:
/home/hq000006/Downloads/KOceanSaver/src/ocean.cpp:354:69: error: ‘gluPerspective’ was not declared in this scope
make[2]: *** [src/CMakeFiles/koceansaver.kss.dir/ocean.o] Error 1
make[1]: *** [src/CMakeFiles/koceansaver.kss.dir/all] Error 2

I am running openSUSE 12.1, with KDE 4.8 Beta and Qt 4.8 RC. I am not sure if the KDE or Qt versions got anything to do with the above, but it seems as if a certain include is missing.

Thanks

Raymond

Report

C

jboss1995

9 years ago

You are right it is QT 4.8 not KDE 4.8. They removed GLU intentionally. Here is the link.
https://bugreports.qt.nokia.com/browse/QTSDK-1022

So just add

#include <GL/glu.h>

in ocean.cpp and it should work fine. I will make changes to source soon. Thanks.

Report

tittiatcoke

9 years ago

Hi,

Thanks for the fast replies. Unfortunately I hadn't access to my computer last night, so I couldn't reply. Yes, KDE 4.8 is currently in Beta.

Fortunately including the statement #include <GL/glu.h> solved the issue.

Thanks

Raymond

Report

C

jboss1995

9 years ago

Added to source now.

Report

C

jboss1995

9 years ago

You are right it is QT 4.8 not KDE 4.8. They removed GLU intentionally. Here is the link.
https://bugreports.qt.nokia.com/browse/QTSDK-1022

So just add

#include <GL/glu.h>

in ocean.cpp and it should work fine. I will make changes to source soon. Thanks.

Report

C

jboss1995

9 years ago

Could it be that kde 4.8 is beta?

Report

C

jboss1995

9 years ago

did you install package "kdebase-workspace-dev" and "libqt4-opengl-dev"? OpenSUSE may have a little diffident naming standers.

Report

tittiatcoke

9 years ago

They are indeed called differently on opensuse, but I have all libqt4 and kdebase-workspace packages installed. Also cmake itself does not complain that it doesn't find something.

But as indicated I guess that maybe Qt 4.8 doesn't include something that it did with version 4.7. That is why I was wondering if you would know which include should provide this missing variable ?

Regards

Raymond

Report

C

jboss1995

9 years ago

Sorry for spelling :( and sorry, I have no idea. I will look and see if I can find anything but if you find something please let me know. Were you able to get version 0.4 to work? if so it may be something with cmake.

Report

C

jboss1995

9 years ago

Starting to work on it again. New things

1. changed it to cmake now (sould compile on any system now)
2. changed my time basted movement (much faster now)
3. Working on adding Setting Dialog.
4. Adding new fish (remora attaches itself to shark)
5. Adding new fish (Manta ray)

Hope to have thing done soon.

Report

CharlesT

9 years ago

I now using Kubuntu Maverick 10.10, kernel 2.6.35-30
qt4-3.1-amd on AMD64 and for some reason the screen now goes blank and uses up 100% of the cpu. I have dual cpus so one is always at 100% and the computer is almost completely useless until I close KOceanSaver.
What could be causing that?
Will upgrading to Natty 11.04 change that?

Report

C

jboss1995

8 years ago

Have you try to install KOceanSaver since I converted it to cmake. It should work for you now.

Report

C

jboss1995

9 years ago

Sorry for getting back so late. What video card do you use?

Report

jmiahman

10 years ago

I packaged this ScreenSvaer for Unity Linux however in testing the package anytime I try and run it it Kills X. Looking into it further when I call the binary /usr/bin/KOceanSaver it comes up in a Window and Dies with:

terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted


I'm running KDE 4.4.2
QT 4.6.2
and Unity Linux (a Mandriva derivative)

Report

C

jboss1995

10 years ago

Make sure you install it. It looks for data files in the installed location. if they are not there then it gives that error.

Report

jmiahman

10 years ago

ls -1 /usr/share/kde4/apps/koceansaver/data/* | wc -l
86

I have 86 files in:

/usr/share/kde4/apps/koceansaver/data/

is that correct?

Report

C

jboss1995

10 years ago

Yes that sounds right, but this is the error produced when it can not find data files.

terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted

I'm kinda new to programing for KDE may be that for different distro it need a different path. Can anyone else help or add anything that might help?

Report

jstamp

10 years ago

You're right. KOceanSaver.pro hardcodes the install paths, but those can vary between distributions. For instance, it looks like Mandriva is using /usr/share/apps.

To fix it, I'd use cmake instead. Since that's what KDE standardized on, it'd be the best way to make sure that the screensaver uses the right paths, no matter which distribution you're building on.

Report

anjpr

10 years ago

I installed the screensaver with all required files, but when I try to run the screensaver I get a blank screen and a frozen computer, which I have to force-reboot. How can I uninstall?

Report

C

jboss1995

10 years ago

Sorry for you problem. I'm not sure, the uninstall should do the trick. try reinstalling then uninstalling again.

Report

ruxax

11 years ago

Thank you for the screensaver. The ship and sharks are very good. But the ocean surface is a bit fluttering.

And are pictures from data/ocean/ directory unused at the moment?

Report

mx3208

11 years ago

thanks, i've got the full caribbean sea on my screen

like you say, i add package libqt4-opengl-dev, and all is fine

on debian sid x64

great work

Report

mx3208

11 years ago


i try to install it on two machine
the first fedora 11 x64
kstarndarddirs.h can't be found
------
make install
g++ -c -m64 -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/lib64/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtOpenGL -I/usr/include -I/usr/X11R6/include -I. -o ocean.o ocean.cpp
ocean.cpp:24:27: error: kstandarddirs.h: No such file or directory
ocean.cpp: In constructor ‘Ocean::Ocean(QWidget*)’:
ocean.cpp:113: error: ‘KStandardDirs’ has not been declared
ocean.cpp:119: error: ‘KStandardDirs’ has not been declared
ocean.cpp:125: error: ‘KStandardDirs’ has not been declared
ocean.cpp: In member function ‘unsigned int Ocean::LoadImageFile(const char*)’:
ocean.cpp:269: error: ‘KStandardDirs’ has not been declared
make: *** [ocean.o] Error 1
---------
locate kstandarddirs.h
/usr/include/kde/kstandarddirs.h
/usr/include/kde4/kstandarddirs.h

what's wrong


and the second installation is on a sidux (x64), i got same errors like ancleensen4

can you help me

Report

C

jboss1995

11 years ago

in kde 4.3 they broke off the opengl lib in to own package do a apt-cache search for opengl look for dev kde libs. install that and let me know.

Report

ancleessen4

11 years ago

I am trying to install on sidux but get this error after make install;

g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I/usr/X11R6/include -I. -o ocean.o ocean.cpp
ocean.cpp:22:20: error: QtOpenGL: No such file or directory
In file included from ocean.cpp:26:
ocean.h:24:21: error: QGLWidget: No such file or directory
In file included from seacreature.h:23,
from ocean.h:26,
from ocean.cpp:26:
guidancesystem.h:31: error: expected class-name before ‘{’ token
In file included from ocean.h:27,
from ocean.cpp:26:
wavemap.h:26: error: expected class-name before ‘{’ token
In file included from ocean.cpp:26:
ocean.h:31: error: expected class-name before ‘{’ token
ocean.h: In member function ‘void Ocean::timerEvent(QTimerEvent*)’:
ocean.h:52: error: ‘updateGL’ was not declared in this scope
In file included from ocean.cpp:27:
ship.h: In function ‘void ship(unsigned int, unsigned int)’:
ship.h:24: error: ‘GL_TEXTURE_2D’ was not declared in this scope
ship.h:24: error: ‘glBindTexture’ was not declared in this scope
ship.h:25: error: ‘GL_QUADS’ was not declared in this scope
ship.h:25: error: ‘glBegin’ was not declared in this scope
ship.h:26: error: ‘glTexCoord2f’ was not declared in this scope
ship.h:26: error: ‘glNormal3f’ was not declared in this scope
ship.h:26: error: ‘glVertex3f’ was not declared in this scope
ship.h:164: error: ‘glEnd’ was not declared in this scope
ship.h:178: error: ‘GL_TRIANGLES’ was not declared in this scope
In file included from ocean.cpp:28:
floor.h: In function ‘void floor(unsigned int)’:
floor.h:3: error: ‘GL_TEXTURE_2D’ was not declared in this scope
floor.h:3: error: ‘glBindTexture’ was not declared in this scope
floor.h:4: error: ‘GL_QUADS’ was not declared in this scope
floor.h:4: error: ‘glBegin’ was not declared in this scope
floor.h:5: error: ‘glTexCoord2f’ was not declared in this scope
floor.h:5: error: ‘glNormal3f’ was not declared in this scope
floor.h:5: error: ‘glVertex3f’ was not declared in this scope
floor.h:1426: error: ‘glEnd’ was not declared in this scope
In file included from ocean.cpp:29:
rock.h: In function ‘void rock()’:
rock.h:22: error: ‘GL_QUADS’ was not declared in this scope
rock.h:22: error: ‘glBegin’ was not declared in this scope
rock.h:23: error: ‘glTexCoord2f’ was not declared in this scope
rock.h:23: error: ‘glNormal3f’ was not declared in this scope
rock.h:23: error: ‘glVertex3f’ was not declared in this scope
rock.h:887: error: ‘glEnd’ was not declared in this scope
In file included from ocean.cpp:30:
sky.h: In function ‘void sky()’:
sky.h:23: error: ‘GL_QUADS’ was not declared in this scope
sky.h:23: error: ‘glBegin’ was not declared in this scope
sky.h:24: error: ‘glNormal3f’ was not declared in this scope
sky.h:24: error: ‘glTexCoord2f’ was not declared in this scope
sky.h:24: error: ‘glVertex3f’ was not declared in this scope
sky.h:25: error: ‘glEnd’ was not declared in this scope
In file included from ocean.cpp:31:
chest.h: In function ‘void chest(unsigned int, unsigned int)’:
chest.h:23: error: ‘GL_TEXTURE_2D’ was not declared in this scope
chest.h:23: error: ‘glBindTexture’ was not declared in this scope
chest.h:24: error: ‘GL_QUADS’ was not declared in this scope
chest.h:24: error: ‘glBegin’ was not declared in this scope
chest.h:25: error: ‘glNormal3f’ was not declared in this scope
chest.h:25: error: ‘glTexCoord2f’ was not declared in this scope
chest.h:25: error: ‘glVertex3f’ was not declared in this scope
chest.h:53: error: ‘glEnd’ was not declared in this scope
chest.h:311: error: ‘GL_TRIANGLES’ was not declared in this scope
ocean.cpp: In constructor ‘Ocean::Ocean(QWidget*)’:
ocean.cpp:33: error: class ‘Ocean’ does not have any field named ‘QGLWidget’
ocean.cpp:33: error: ‘QGL’ has not been declared
ocean.cpp:33: error: ‘QGL’ has not been declared
ocean.cpp:33: error: ‘QGL’ has not been declared
ocean.cpp:33: error: ‘QGLFormat’ was not declared in this scope
ocean.cpp:35: error: ‘makeCurrent’ was not declared in this scope
ocean.cpp:36: error: ‘startTimer’ was not declared in this scope
ocean.cpp:110: error: ‘setWindowTitle’ was not declared in this scope
ocean.cpp: In destructor ‘Ocean::~Ocean()’:
ocean.cpp:144: error: ‘makeCurrent’ was not declared in this scope
ocean.cpp: In member function ‘void Ocean::initializeGL()’:
ocean.cpp:150: error: ‘GL_TEXTURE_2D’ was not declared in this scope
ocean.cpp:150: error: ‘glEnable’ was not declared in this scope
ocean.cpp:151: error: ‘GL_SMOOTH’ was not declared in this scope
ocean.cpp:151: error: ‘glShadeModel’ was not declared in this scope
ocean.cpp:152: error: ‘glClearColor’ was not declared in this scope
ocean.cpp:153: error: ‘glClearDepth’ was not declared in this scope
ocean.cpp:154: error: ‘GL_DEPTH_TEST’ was not declared in this scope
ocean.cpp:155: error: ‘GL_LEQUAL’ was not declared in this scope
ocean.cpp:155: error: ‘glDepthFunc’ was not declared in this scope
ocean.cpp:156: error: ‘GL_PERSPECTIVE_CORRECTION_HINT’ was not declared in this scope
ocean.cpp:156: error: ‘GL_NICEST’ was not declared in this scope
ocean.cpp:156: error: ‘glHint’ was not declared in this scope
ocean.cpp:158: error: ‘GL_LIGHT1’ was not declared in this scope
ocean.cpp:158: error: ‘GL_AMBIENT’ was not declared in this scope
ocean.cpp:158: error: ‘glLightfv’ was not declared in this scope
ocean.cpp:160: error: ‘GL_DIFFUSE’ was not declared in this scope
ocean.cpp:162: error: ‘GL_POSITION’ was not declared in this scope
ocean.cpp:164: error: ‘GL_LIGHTING’ was not declared in this scope
ocean.cpp:165: error: ‘GL_SRC_ALPHA’ was not declared in this scope
ocean.cpp:165: error: ‘GL_ONE_MINUS_SRC_ALPHA’ was not declared in this scope
ocean.cpp:165: error: ‘glBlendFunc’ was not declared in this scope
ocean.cpp:167: error: ‘GL_EXP’ was not declared in this scope
ocean.cpp:167: error: ‘GL_EXP2’ was not declared in this scope
ocean.cpp:167: error: ‘GL_LINEAR’ was not declared in this scope
ocean.cpp:168: error: ‘GL_FOG_MODE’ was not declared in this scope
ocean.cpp:168: error: ‘glFogi’ was not declared in this scope
ocean.cpp:170: error: ‘GL_FOG_COLOR’ was not declared in this scope
ocean.cpp:170: error: ‘glFogfv’ was not declared in this scope
ocean.cpp:171: error: ‘GL_FOG_DENSITY’ was not declared in this scope
ocean.cpp:171: error: ‘glFogf’ was not declared in this scope
ocean.cpp:172: error: ‘GL_FOG_HINT’ was not declared in this scope
ocean.cpp:172: error: ‘GL_DONT_CARE’ was not declared in this scope
ocean.cpp:173: error: ‘GL_FOG_START’ was not declared in this scope
ocean.cpp:174: error: ‘GL_FOG_END’ was not declared in this scope
ocean.cpp:175: error: ‘GL_FOG’ was not declared in this scope
ocean.cpp: In member function ‘void Ocean::paintGL()’:
ocean.cpp:181: error: ‘GL_COLOR_BUFFER_BIT’ was not declared in this scope
ocean.cpp:181: error: ‘GL_DEPTH_BUFFER_BIT’ was not declared in this scope
ocean.cpp:181: error: ‘glClear’ was not declared in this scope
ocean.cpp:182: error: ‘glLoadIdentity’ was not declared in this scope
ocean.cpp:190: error: ‘GL_BLEND’ was not declared in this scope
ocean.cpp:190: error: ‘glDisable’ was not declared in this scope
ocean.cpp:191: error: ‘GL_LIGHTING’ was not declared in this scope
ocean.cpp:191: error: ‘glEnable’ was not declared in this scope
ocean.cpp:192: error: ‘GL_TEXTURE_2D’ was not declared in this scope
ocean.cpp:192: error: ‘glBindTexture’ was not declared in this scope
ocean.cpp:194: error: ‘glTranslatef’ was not declared in this scope
ocean.cpp:195: error: ‘glRotatef’ was not declared in this scope
ocean.cpp:215: error: ‘glScalef’ was not declared in this scope
ocean.cpp:223: error: ‘glColor4f’ was not declared in this scope
ocean.cpp: In member function ‘void Ocean::resizeGL(int, int)’:
ocean.cpp:256: error: ‘glViewport’ was not declared in this scope
ocean.cpp:257: error: ‘GL_PROJECTION’ was not declared in this scope
ocean.cpp:257: error: ‘glMatrixMode’ was not declared in this scope
ocean.cpp:258: error: ‘glLoadIdentity’ was not declared in this scope
ocean.cpp:259: error: ‘gluPerspective’ was not declared in this scope
ocean.cpp:260: error: ‘GL_MODELVIEW’ was not declared in this scope
ocean.cpp: In member function ‘unsigned int Ocean::LoadImageFile(const char*)’:
ocean.cpp:271: error: ‘QGLWidget’ has not been declared
ocean.cpp:273: error: ‘glGenTextures’ was not declared in this scope
ocean.cpp:274: error: ‘GL_TEXTURE_2D’ was not declared in this scope
ocean.cpp:274: error: ‘glBindTexture’ was not declared in this scope
ocean.cpp:275: error: ‘GL_TEXTURE_MAG_FILTER’ was not declared in this scope
ocean.cpp:275: error: ‘GL_LINEAR’ was not declared in this scope
ocean.cpp:275: error: ‘glTexParameteri’ was not declared in this scope
ocean.cpp:276: error: ‘GL_TEXTURE_MIN_FILTER’ was not declared in this scope
ocean.cpp:277: error: ‘GL_RGBA8’ was not declared in this scope
ocean.cpp:277: error: ‘GL_RGBA’ was not declared in this scope
ocean.cpp:277: error: ‘GL_UNSIGNED_BYTE’ was not declared in this scope
ocean.cpp:277: error: ‘glTexImage2D’ was not declared in this scope
make: *** [ocean.o] Error 1
root@siduxbox:/home/neil/KOceanSaver#

Any help much appreciated.

Report

7 years ago

0.1, 0.2, 0.3
1 Faster skeleton animation function for fish. (this dropped CPU usage by half or more on my computer even with wave added. Matrix is only calculated once for each bone instead of once for each vertex)
2 Added ocean surface with waves. (Please let me know what you think)
3 Moved things around to make it more aesthetic

Please give feedback so I know if I'm going in the right direction

0.4
1. Changed time basted movement (much faster now)
2. Adding Setting Dialog.
3. Adding new fish

0.5
1 Changed form qmake to cmake.

0.6
1 Added rocking motion.

0.7
1. Bug fixes and performance improvements.
2. Added Orca.
3. Added new function for attached fish (remora).

0.8
1. Bug fixes (fish disapeare after screen suspend)
2 Added fish: Grouper.

12345678910
215
product-maker AnalisaLogika Jun 15 2017 9 excellent
product-maker thwald Jan 23 2016 9 excellent
product-maker mea5 Dec 13 2014 9 excellent
product-maker dergnome Jan 27 2014 3 bad
product-maker tuxdude Nov 30 2013 9 excellent
product-maker janet Oct 20 2013 9 excellent
product-maker Contrast Oct 19 2013 9 excellent
product-maker Sweyn78 Aug 24 2012 9 excellent
product-maker Xephexx May 22 2012 9 excellent
product-maker tartare30 Jan 03 2012 9 excellent
product-maker darthroe Dec 27 2011 9 excellent
product-maker woodsmoke Dec 27 2011 9 excellent
product-maker posixru Dec 07 2011 9 excellent
product-maker mixalns Dec 06 2011 9 excellent
product-maker ATAHUALPA Nov 28 2011 9 excellent
product-maker electron222 Jun 19 2011 9 excellent
product-maker otternox May 31 2011 3 bad
Be the first to comment
CharlesT
Apr 10 2015
sefran
Oct 20 2013
Bumpalot
Mar 11 2013
rgfernandes
Jan 13 2012
tuxdude
Jan 06 2012
woodsmoke
Dec 27 2011
devport
Nov 18 2011
janet
Apr 09 2010
kilometk
Mar 29 2010
Doobius
Jun 27 2009
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.8
updated Oct 19 2013
added Dec 26 2008
downloads 24h
0
mediaviews 24h 0
pageviews 24h 5