Programming :: SDL Code Optimisation / Change Of Library For Low End Systems?
Mar 23, 2011
I have a question about choice of library to be used on low-end systems. I've so far been using SDL to create a user interface for a media system, and it's been working fantastically on my development machine, a dual core 2GHz machine with 2Gb RAM and an Intel graphics card. I get a frame rate of up to 100fps, and there is no slowdown at all. However when I run the exact same program on an embedded motherboard, the VIA EPIA EN15000G, which has a 1.5GHz processor, and a VIA P4M800 graphics chip (possibly the worst graphics chip ever invented as far as Linux support goes), I get a frame rate of less than 5fps. This makes the entire program totally unusable, and I've been left in a bit of a pickle. I've looked into alternatives like SFML, but that looks like it won't help at all on an unaccelerated system. I've also tried using OpenChrome drivers on it, and that made a negligible or nonexistent difference.
Can anybody suggest anything I could look into re: optimising my code or changing libraries goes? I already use SDL_DisplayFormatAlpha to convert my surfaces to the correct format. I haven't looked into Dirty Rectangles yet massively, as there's not much movement at all on the GUI, just the changing of button states.
Would use of OpenGL help at all if using the OpenChrome driver, which apparently has 2D acceleration? I'm more than willing to totally overhaul the code if needs be.
I am trying to write suitable .pro file for my application. I need real-time library. Have you some ideas how to do that? I just need the line for linking with real-time library...
I'm writing an application with a plugin architecture and would like modify (specifically add to) the dynamic library search path while the main executable is running.
The plugin paths are not known until the application is running so I can't set LD_LIBRARY_PATH ahead of time.
My understanding (although I haven't tested it) is that the executable will only parse the LD_LIBRARY_PATH once, early on, so modifying this environment variable at runtime will have no effect.
(Note - on Windows the solution is to modify the PATH environment variable)
I know it's possible to specify the full path to load a dynamic library, and this would work if the plugin(s) only had a single library to load, but some of them will have a bunch of libraries with their own inter-dependencies, so I'd like the plugin folder(s) to get added to the search path to pick up the dependant libs.
I want to modify the source of cd (the 'change directory' command) to do a little extra for me, but I can't seem to find the source code anywhere.. maybe I didn't look for it well enough, and googling "source code cd" and variants of that doesn't exactly help... I was wondering if anyone knew where I could find the src?
I am dealing with one FORTRAN 90 code, have made small changes.
milenko@milenkons:~/mt4$ make mt4 make: 'mt4' is up to date. milenko@milenkons:~/mt4$ ifort -c MT2DDIB1.FOR milenko@milenkons:~/mt4$ make mt4 make: 'mt4' is up to date. milenko@milenkons:~/mt4$ make mt4 make: 'mt4' is up to date. milenko@milenkons:~/mt4$ make mt4 make: 'mt4' is up to date.
I go for make command but it does not see that the source code has been modified.Than I do compilation from command line,try make again but no use. F95=ifort FFLAFGS= -O1
I'm reading about shared, static, and dynamic libraries. What is SDL? Is it static, shared, or dynamic?
I always thought a library would be a lot of .h and .cpp files compiled separately into .o files and then if you compiled your own program you could use the -l parameter to link the library and it was all compiled together. Now I'm not so sure.
I don't even see any SDL .cpp files in my system anywhere. All I have are lots of SDL .h files in /usr/include/SDL and I don't really understand the code in them.
I'm making a wild guess here: SDL is a shared library. SDL itself is NOT compiled into my program, therefore SDL must be on any system my program tries to run on. When I compile and link SDL all it needs is the header files to know what SDL function and objects it can use. And then on every system it uses an already compiled SDL shared library thingy somewhere.
So... where is that part of SDL? All I can find are header files.
I'm thinking the advantage of shared libraries is that someone could say update SDL on their own system and take advantage of the new features without having to download new executables with the new version of SDL compiled into them for every program that uses SDL.
So if I'm making an editor and a game engine and they both use a lot of the same .cpp and .h files that I wrote and I'm tired of updating one and then the other and I need to turn them into a library, then a shared library might be kind of a silly solution. I could just make a static library. Right? Because it's not SDL. Nobody else is ever going to use this library.
i try to compile a c code which uses SSH library,but i get this error
Code: libssh.h: No such file or directory
i searched and i found that This happens if a library used for linking is not present in the standard library directories used by gcc.
By default, gcc searches the following directories for header files:
/usr/local/include/ /usr/include/
and the following directories for libraries:
/usr/local/lib/ /usr/lib/
i update my libssh from libssh-0.4.2-1.fc13.i686 to libssh-0.4.6-1.fc13.i686, and there are files called libssh.so.4 and libssh.so.4.0.2 in /ur/lib, but i still can't compile it with this command:
Ubuntu 9.10 is the running system. I need to install a library (LibRaw-0.8.5) from source code as the version I need is not present in the repositories. So far, I managed to extract the .tar.gz, but now I have no clue how to install it and make it work with DigiKam... I tried the sudo make install stuff, but it seems I don't do it right or what
I have downloaded lzo-2.00 package and have installed it linux kernel 2.6 version. Now I want to include the lzo library in the source code of linux.According to the instructions given in the package, I have copied the files (minilzo.c,minilzo.h,lzoconf.h,lzodefs.h)in the source directory(/mm),added minilzo.o to my Makefile and have included(#include minilzo.h) from my program. But when I compile the kernel,I am getting errors.
Errors:
->limits.h:No such file or directory ->assert.h:No such file or directory
I need to create a test setup in my lab that will run power supplies for an indefinite amount of time. It could be anywhere from days to months at a time. This rules out matlab, as its memory leaks won't let it run that long, and LabView is too buggy (at least in my experience. and it has memory leaks as well). So I need a way to program GPIB (since that is the interface these power supplies have). So far, PyVISA seems to be the most likely way to be able to do this.
However, I keep receiving the following error: Code: pyvisa.visa_exceptions.VisaIOError: VI_ERROR_LIBRARY_NFOUND: A code library required by VISA could not be located or loaded. Searching around, this apparently means that I'm missing GPIB drivers, but I'm not. linux-gpib installed, and the card appears in /dev.
That being said, every now and then the gpib interfaces simply disappear from /dev,and the only way I can get them back is to reinstall linux-gpib. Also, has anybody else succeeded in working with GPIB outside of LabView and Matlab, and if so how? I'm also open to other options, having made no progress on this after over a week. The two real requirements is that I need programming interface to be scpi commands, and I would prefer to code in python or C/C++.
How can we convert a dynamic library (filename.so) to a static library (filename.a) using gnu gcc . Can we get a static library form a dynamic library . I saw a few post in which the conversion form a static library to a dynamic library is mentioned but, unfortunately, not the other way.
Can anyone suggest a product that will allow a developer to raise a ticket (or similar sort of trackable item) which can be used to track the progress of a software build through a number of environments?Basically It's just a case of creating a ticket, using that to trigger a software build, then requiring some form of sign off to allow a second stage, and then another sign off for a third. It's not about building things, just tracking an issue through various stages of testing through to production.
I'm looking at replacing an environment which currently uses jira for this purpose, but I've no knowledge of it, and am keen on other GPL tools instead. Jira is, as a product, massively overkill for what is required too. So I'm keen on one which might fit in with the rest of my toolset - cobbler, func, puppet etc. I was looking at trac, which seems like it might have some relevant angles to it, but I really can't tell because having not done this sort of project before I don't honestly know what to call what i'm after. I don't *think* that something like bugzilla would be appropriate as it's too specifically about bug tracking, rather than a generic workflow with signoff stages and such.
I have a NTFS drive mounted at /media/bigbrother as my user. I have no trouble reading or writing to files here. I just created a link to /var/www using: ln -s /var/www /media/bigbrother/
The link is there however, I can't even open the folder. How should I go about getting access. So that I'm able to copy files from other systems on the network.
Every time I log in, I get 5 alerts. When I check them out, there is nothing to see. Everything is blank. I'm tired of seeing this lousy popup each time I login. How can I fix this? Also, how do I change the systems default keymap to dvorak (before login screen)
I've just got a question about this. What if you wanted to change only the display sequence in Grub 2 (Ubuntu 9.10) and not which o/s boots first or is the deault o/s? In previous versions of grub you could just copy & paste the lines in /boot/grub/menu.lst, but this version of grub doesn't allow you to edit /boot/grub/grub.cfg...
How to make simple games (snake, pong... nothing too fancy). I have completed making snake and now want to be able to distribute it. I built it using C++ and wxWidgets so it would be multi-platform. I'm able to compile it and run it in both Windows and Ubuntu using g++. In windows, I was able to distribute it by putting a *.dll file in the same folder as the executable. However in Linux, I don't understand what I need to do so that it would run on any installation of Ubuntu out of the "box". When I build it and try to run it in a different installation of Ubuntu (which has g++) it gives me an error saying that a particular library file was not found and Getlibs fails to find that library file.
Is there a way to build a project with G++ so that all the dependencies are either packaged in the executables or copied into the folder....?
I'm trying to make one that has some sorts in it for now. I know you have to make a header file and a .cpp file. I'm using VC++(yes, I'm in school so windows in needed. I use Ubuntu at home I swear D if it makes a difference. What goes in the header file, how is the cpp file set up, and then where do I put the files once I'm done?
i have a code written in c..for which i was trying to create a gui using Gtk+.but now i want to use qt4 for the same purpose but native language of qt4 is C++. i have to do library binding for my C code to develop a gui using qt4.
I am trying to write a program that can get the times from files on a NTFS drive in Linux using the ntfs-3g library. I have installed the development libraries and source on my Fedora 10 machine. I can find the headers in the /usr/include/ntfs-3g directory but when i try and compile my program I am getting an undefind reference to ntfs_mount() call. I have the following in my link string
g++ -L/lib -o ProgramName -lpthread -lntfs-3g
I did a pkg-config --cflags --libs libntfs-3g and it said all i needed was the -L/lib -lpthread and -lntfs-3g.
I need to write program (preffer Python) to change range for users. Does anyone know some library which can help me to do that? Maybe someone has written program like that?
To create a static library, or to add additional objectiles to an existing static library, I can use a command like this:ar rcs my_library.a file1.o file2.oBut how to add an existing static library to my own static library. I have created my own static library using the command above and want to link against the library libuuid.a (placed in /usr/lib/).