Who's Online |
153 user(s) are online ( 105 user(s) are browsing Forums)
Members: 0
Guests: 153
more...
|
|
Headlines |
-
mce.lha - game/utility
Apr 23, 2024
-
theme_list.lha - utility/misc
Apr 23, 2024
-
faac.lha - audio/convert
Apr 22, 2024
-
faad2.lha - audio/convert
Apr 22, 2024
-
seq.lha - audio/misc
Apr 22, 2024
-
libfaac.lha - development/library/audio
Apr 22, 2024
-
libfaad.lha - development/library/audio
Apr 22, 2024
-
image2pdf.lha - utility/text/convert
Apr 22, 2024
-
libharfbuzz.lha - development/library/graphics
Apr 20, 2024
-
libpng.lha - development/library/graphics
Apr 20, 2024
|
|
|
|
Re: Beta testing
|
Posted on: 2013/6/27 20:37
#161
|
Just popping in
|
Quote: alfkil wrote: I am looking for beta testers for the new Qt4.7 version (including webkit support) and a bunch of other software. Who's in? :)
If you're still after beta testers, count me in! cheers billy
|
|
|
|
Re: Lockup starting qt apps
|
Posted on: 2013/6/27 20:35
#162
|
Just popping in
|
Thanks Chris, that fixed it. I'll ask Alfkil about the latest Qt beta too.
Billy
|
|
|
|
Lockup starting qt apps
|
Posted on: 2013/6/22 11:03
#163
|
Just popping in
|
Hi all I've recently got my hands on a shiny new X1000 (v. nice btw!) and have been looking to port an app that I wrote that uses Qt. I've installed both the user and dev packages but can't get any of the apps to run, my machine locks up and i have to reboot. I set the stack to 2000000 and tried running e.g. analogclock from a shell and it complains that I haven't got iconv library version 1 installed. I downloaded and installed the sobj from http://os4depot.net/share/development/library/libiconv_so.lha but it still complains. I assume I'm doing something dumb or have forgot something obvious. Help! cheers billy
|
|
|
|
Re: The Revenge of the Qt Demo Browser
|
Posted on: 2013/2/14 16:33
#164
|
Just popping in
|
afxgroup wrote: Quote: .. at this point a good profiler would help.. I'd agree but I've also found the technique listed at What can I use to profile C++ code in Linux? works really well often enough, I was sceptical till I tried it and it really works as quick solution.
|
|
|
|
Re: Draw an arc with graphics.library
|
Posted on: 2012/10/23 20:35
#165
|
Just popping in
|
Quote: Chris wrote:
Quote:billyfish wrote: The algorithm I used is based upon Bresenham's
I think that was what I looked at originally. The examples always draw a whole circle, and how to get it to only plot an arc is a bit vague. It's likely miles faster than using trigonometry for each point though, so it'll be good to get that working.
It works for arc sections too, take a look at the "Drawing incomplete octants" on the midpoint circle algorithm page. If you can get a copy of Computer Graphics by Foley et al. it really is a goldmine of useful stuff ( http://www.amazon.co.uk/Computer-Grap ... TF8&qid=1351020762&sr=1-3) cheers billy
|
|
|
|
Re: How to initialize a struct in a class?
|
Posted on: 2012/5/11 16:05
#167
|
Just popping in
|
I'm not sure if its what you're after but what I was suggesting was that the struct that you need in your c code is in a c++ file, but wrapped in a method that is declared as extern "c" i.e
--- foo.hpp ---
extern "C" { struct Foo *GetTheCPlusPlusStructure (); } --- foo.cpp ---
struct Foo *GetTheCPlusPlusStructure () can use any c++ code e.g. for construction, member initialisation, etc.
so foo.cpp is comppiled as c++ code.
The rest of your c code can be compiled as normal as c code and just include foo.hpp and link to foo.o.
Does that make sense and/or help?
|
|
|
|
Re: How to initialize a struct in a class?
|
Posted on: 2012/5/10 14:25
#168
|
Just popping in
|
Hi
If you're calling it from c code, you can have a stub routine written in C++ that has extern "C" around its declaration. The rest of your c code can then call this stub routine and all will happily co-exist.
|
|
|
|
Re: Monitor randomly shutting off (compositing)??
|
Posted on: 2012/3/23 10:21
#169
|
Just popping in
|
Hi Quote: broadblues wrote: No DebugPrintf doesn't use RawDoFmt else it would output '%f' unmodified and it clearly makes some attempt to process the float, but does it incorrectly
Are you sure? Wouldn't the format string need to be "%%f" to print out "%f" since you'd need to escape the % as it's a reserved char. cheers billy
|
|
|
|
Re: Monitor randomly shutting off (compositing)??
|
Posted on: 2012/3/22 18:50
#170
|
Just popping in
|
alfkil wrote: Quote: Other problem: How to make IExec->DebugPrintF() output floats?? I try
float somefloat = 512.512; IExec->DebugPrintF("f = %f\n", somefloat);
...but all I get is some wrong value or "infl" (or smth)... (I have also tried "%fl", it doesn't help).
I've had this problem on OS3, my suggestion is to create a wrapper function something like:
int DebugPrintDouble (const char * const str_p, const double d)
{
/* Get the length of the string, the size of the number before the decimal point, plus 10 for the decimal point, the fraction, the terminating NULL and the space. */
size_t buffer_size = strlen (str_p) + ceil (log10 (d)) + 10;
int result = 0;
char *buffer_p = IExec -> AllocVec (buffer_size, MEMF_ANY);
if (buffer_p)
{
sprintf (buffer_p, "%s %.6lf", str_p, d);
result = IExec -> DebugPrinttF (buffer_p);
IExec -> FreeVec (buffer_p);
}
return result;
}
cheers billy
|
|
|
|
Re: Help with GUI programming
|
Posted on: 2012/1/31 11:00
#171
|
Just popping in
|
@Hans Quote: Why not ask for help on os4coding.net? It is, after all, a website set up specifically for AmigaOS 4.x development.
Although I aim to make an OS 4 native version once I've got an X1000, it's currently an OS 3 app. cheers Billy
|
|
|
|
Re: Help with GUI programming
|
Posted on: 2012/1/30 23:02
#172
|
Just popping in
|
@chris Quote: Why are you using a hook for drag'n'drop? Just register the window as an AppWindow (window.class can even do this for you IIRC) and get events via the usual method. Definitely no problems with rendering this way. I didn't even know it was possible to create a hook for drop events...
I probably explained it badly, I followed trixie's example from os4coding ( http://www.os4coding.net/blog/trixie/ ... ppwindows-and-appmessages). I set WINDOW_AppMsgHook to a struct Hook pointer that had its h_Entry set to my function. Is there a better way of doing it? @broadblues Thanks for the code, that's really useful. Thanks to both of you with the heads up about the space.gadget as well, I'll give it a look.
|
|
|
|
Re: Help with GUI programming
|
Posted on: 2012/1/30 19:31
#173
|
Just popping in
|
Essentially I'm drawing a 3d diagram into the Window's RastPort and then the user can rotate, scale or translate the display. The code I had in mind was John Kennedy's from his Amiga Format tutorial where he has two bitmaps and flips between them
if (which_screen) { myscreen->RastPort.BitMap=bitmapA; myscreen->ViewPort.RasInfo->BitMap=bitmapA; } else { myscreen->RastPort.BitMap=bitmapB; myscreen->ViewPort.RasInfo->BitMap=bitmapB; }
rastport=&myscreen->RastPort; which_screen = !which_screen;
Would using similar code to above but replacing the Screen's RastPort with the Window's RPort instead?
|
|
|
|
Help with GUI programming
|
Posted on: 2012/1/30 19:11
#174
|
Just popping in
|
Hi all
I've got a few programming questions. I'm currently building a visualization app in C on OS 3.9 (and OS 4 once I get an X1000).
1. I've seen how you can double-buffer the screen's display using two bitmaps, can the same approach be used to double-buffer a window's display? If so, do the bitmaps need to be the size of the screen,
2. I'm currently using Reaction for the GUI and have installed a hook so that you can drag and drop files onto the window. These are then processed and loaded. I noticed that for MUI with a similar approach using hooks that you can't draw from this process, instead you use the MUIM_Draw method. Does Reaction have a similar restriction.
3. Since I'm using calls such as AreaEllipse () and Flood (), I'm setting up the TmpRas buffer. Will this work on both native and rtg displays or would it be better to have a completely separate set of routines that use Picasso96?
cheers
billy
|
|
|
|
Re: need some english speaking person, with programming knowlege and few hours of time
|
Posted on: 2012/1/2 12:39
#175
|
Just popping in
|
Hi Kasle I'm happy to help out with this. I've been programming in C for ages and have done a few OS3 apps (sadly no OS4 box at the moment, can't wait for the second batch of the X1000 ). cheers billy
|
|
|
|
Re: gcc gnu C library Reference Manual
|
Posted on: 2011/7/21 11:48
#176
|
Just popping in
|
@tboeckel
Well spotted. Changing from a "char *" to a "char []" should fix it. Something like:
char str [] = "THIS=that@"; const char *delimiters = "=@"; char *ptr; printf ("delimiters = %s\n", delimiters);
ptr = strtok (str, delimiters); while (ptr) { printf ("strtok returned %s\n", ptr);
ptr = strtok (NULL, delimiters); }
fflush (stdout);
|
|
|
|
Re: gcc gnu C library Reference Manual
|
Posted on: 2011/7/20 20:05
#177
|
Just popping in
|
The restrict keyword is to do with the location that the pointer points at. Basically restrict tells the compiler that no other pointer is going to point at that memory block, so the complier can do more optimizations. See Wikipedia - restrict keyword. As for the problem you're having what happens if you do explicit checks for NULL returns from strtok?
|
|
|
|