plib-users Mailing List for PLIB (Page 37)
Brought to you by:
sjbaker
You can subscribe to this list here.
2000 |
Jan
|
Feb
(24) |
Mar
(54) |
Apr
(29) |
May
(58) |
Jun
(29) |
Jul
(675) |
Aug
(46) |
Sep
(40) |
Oct
(102) |
Nov
(39) |
Dec
(40) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(45) |
Feb
(23) |
Mar
(30) |
Apr
(64) |
May
(28) |
Jun
(61) |
Jul
(55) |
Aug
(35) |
Sep
(24) |
Oct
(23) |
Nov
(21) |
Dec
(67) |
2002 |
Jan
(98) |
Feb
(23) |
Mar
(13) |
Apr
(23) |
May
(43) |
Jun
(45) |
Jul
(54) |
Aug
(5) |
Sep
(56) |
Oct
(17) |
Nov
(53) |
Dec
(26) |
2003 |
Jan
(67) |
Feb
(36) |
Mar
(22) |
Apr
(35) |
May
(26) |
Jun
(35) |
Jul
(10) |
Aug
(49) |
Sep
(17) |
Oct
(3) |
Nov
(30) |
Dec
(10) |
2004 |
Jan
(12) |
Feb
(18) |
Mar
(52) |
Apr
(50) |
May
(22) |
Jun
(13) |
Jul
(16) |
Aug
(23) |
Sep
(21) |
Oct
(29) |
Nov
(6) |
Dec
(26) |
2005 |
Jan
(9) |
Feb
(19) |
Mar
(13) |
Apr
(19) |
May
(12) |
Jun
(8) |
Jul
(6) |
Aug
(10) |
Sep
(22) |
Oct
(3) |
Nov
(6) |
Dec
(17) |
2006 |
Jan
(10) |
Feb
(8) |
Mar
(5) |
Apr
(5) |
May
(6) |
Jun
(8) |
Jul
(8) |
Aug
(13) |
Sep
(2) |
Oct
(1) |
Nov
(9) |
Dec
(6) |
2007 |
Jan
(3) |
Feb
(4) |
Mar
(12) |
Apr
(2) |
May
(6) |
Jun
|
Jul
(22) |
Aug
|
Sep
(9) |
Oct
(13) |
Nov
|
Dec
|
2008 |
Jan
(1) |
Feb
(6) |
Mar
(2) |
Apr
(4) |
May
(15) |
Jun
(28) |
Jul
(8) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2009 |
Jan
(5) |
Feb
(5) |
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
(2) |
Apr
(7) |
May
(4) |
Jun
(2) |
Jul
(5) |
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
|
2011 |
Jan
(7) |
Feb
(2) |
Mar
(1) |
Apr
|
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
(1) |
Nov
(4) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: torcs <to...@fr...> - 2003-04-26 22:04:02
|
Michael Douglas wrote: > 'hoping this is the right place' > > i hav mandrake linux 9.0 and i'm installing plib so i can use the flight > simulator, Flight Gear. I can unpack plib and run ./configure but when > i then type make it gets about halfway then comes up with a whole lot of > errors like this- > /usr/include/GL/glu.h:318: syntax error before `void' > /usr/include/GL/glu.h:320: syntax error before `GLAPIENTRY' > can sum1 please tell me what this means and suggest how i can fix it and > get plib going so i can run flight gear? > any help greatly appreciated. > sry if this is the wrong place to be posting this stuff, > Mike D > I had that once on my Mdk 9.0 after installing new Nvidia drivers. I did not investigate much, but after reinstalling (with --force) the X11-devel rpm every thing was OK. Bye, Eric Espie. -- =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= TORCS The Open Racing Car Simulator AKA The Other Release Coming Soon (Skin'r) http://torcs.org =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= |
From: Michael D. <ran...@ho...> - 2003-04-26 21:28:19
|
'hoping this is the right place' i hav mandrake linux 9.0 and i'm installing plib so i can use the flight simulator, Flight Gear. I can unpack plib and run ./configure but when i then type make it gets about halfway then comes up with a whole lot of errors like this- /usr/include/GL/glu.h:318: syntax error before `void' /usr/include/GL/glu.h:320: syntax error before `GLAPIENTRY' can sum1 please tell me what this means and suggest how i can fix it and get plib going so i can run flight gear? any help greatly appreciated. sry if this is the wrong place to be posting this stuff, Mike D _________________________________________________________________ Download MSN Messenger @ http://messenger.xtramsn.co.nz - talk to family and friends overseas! |
From: Simon <sim...@ho...> - 2003-04-24 21:05:29
|
Hi all, I'm making a scrollable list of buttons that all share the same call back function. The idea is that the a list of names is read in from a file. Some processing is done with the names and then the buttons are created and positioned with a scrollbar within a puGroup. The buttons are labelled in a separate method by iterating through a vector which contains all the names. When the button is clicked the common callback reads the legend from button and calls another method which uses this as one of its arguments. The problem is that when a button is clicked the text that is created by the method called from the call back is garbled and the labels on the buttons appears on the wrong buttons at random. I've tried using strings instead of character pointers, declaring the button in the create buttons method, the list goes on. I noticed that if I don't assign a callback to any of the buttons then I can click them and scroll the list and the button labels are fine. I re-enabled the button callback and commented out the code inside so it was an empty method. This time the text still gets jumbled on the button list. This is a sample of the code for the create button method: static puGroup *recordBtnGRP; static puOneShot *recordButton; static puScrollBar *recordBtnSlider; createButtons() { For( the number of names) { //This deals with adding the buttons to the group thats been made for them. recordButton = new puOneShot( 0 , 0, recordBtnWidth, 20) ; recordButton->setPosition(RGmainX, 22*(currentCount)); recordButton->setCallback( recordBtn_CB ) ; recordBtnGRP->add(recordButton); } //if the scrollbar is enabled if(activeScrollBar) { recordBtnSlider = new puScrollBar( recordBtnWidth, -5, window_height - (40 + RGmainY), 0, true, 10); recordBtnSlider->setMinValue(0.0); recordBtnSlider->setMaxValue(currentCount - recordBtnGRP->getNumChildren()); recordBtnSlider->setStepSize(1.0); recordBtnSlider->setValue(currentRecordBTN); recordBtnSlider->setCallback(recordBtnSlider_CB); recordBtnGRP->add(recordBtnSlider); } } -Simon |
From: Paolo L. <p.l...@ci...> - 2003-04-24 12:19:15
|
Andreia R. Assuncao Schneider wrote: > > I'm trying to do a program that uses the mouse for navigation. I'm using > GlUT to build the frame. > Has anyone done it already? Andreia, please find attached the file with the excerpt of the code I use for the mouse navigation model in my Plib-based viewer. The three mouse buttons are mapped to camera motion in the following way: - Left: walk navigation on the x-y plane - click set the init, moving the mouse while keeping left-button pressed give proportional delta for direction and speed; - Middle: look around - click set the init, moving the mouse while keeping middle-button pressed give proportional delta for yaw and pitch angles - they remains for further walk navigation; - Right: move on the vertical plane perpendicular to the walk direction - click set the init, moving the mouse while keeping right-button pressed give proportional delta for vertical and lateral movements. These seems to me quite natural as camera manipulations in a walk approach - not suitable for examining an object though. Some simplification from the original code could need to adapt the constant used as mapping factor between pixels and world space. The code should even compile (not tried), yet please feel free to ask anything about it. Greetings - Paolo ------------------------------------------------------------------------- Paolo Leoncini phone: +39 (0823) 623134 Visualization & Virtual Reality fax: +39 (0823) 623126 CIRA - Italian Center for Aerospace Researches mailto:p.l...@ci... Via Maiorise - 81043 Capua (CE) Italy http://www.cira.it |
From: Wolfram K. <w_...@rz...> - 2003-04-24 07:50:19
|
>I'm trying to do a program that uses the mouse for navigation. I'm using= =20 >GlUT to build the frame. >Has anyone done it already? In PrettyPolyEdit, you can do some thigns by mouse, for example rotate the camera around the object. However, most camera movement is done with keys. Bye bye, Wolfram. |
From: Andreia R de A. S. <an...@co...> - 2003-04-23 21:24:26
|
Hi all, I'm trying to do a program that uses the mouse for navigation. I'm using GlUT to build the frame. Has anyone done it already? -- Andreia R. Assuncao Schneider Curso de Ciencia da Computacao Universidade Federal de Lavras |
From: Simon <sim...@ho...> - 2003-04-22 15:06:35
|
Hi, I'm using the puMenuBar as the main menu in my application. Sometimes when the menu bar is clicked the whole application freezes. This happens when the bar is linked to call backs for each menu item and also when each is set to NULL. I was using the menu bar from the 1.6 release but now im using the latest version from the CVS which is version 1.20. Does anyhow know why this is happening? -Simon |
From: Andreia R de A. S. <an...@co...> - 2003-04-18 23:21:01
|
Hi, I'm writing code in which there is a strange change of position of the objetcs, when I change the camera position. See how the position of the cilinder changes in relation to the cube when the 3rd number of cam_inicial is changed in line 55. Try changing it from 5 to 15 and see how the objects seem to change. Any clues? -- Andreia R. Assuncao Schneider Curso de Ciencia da Computacao Universidade Federal de Lavras |
From: Andreia R de A. S. <an...@co...> - 2003-04-18 21:31:38
|
Hi, I'm trying to get the position of the camera with the function ssgGetCameraPosition but the values that are returned do not seem correct. The value of my camera is: static sgCoord cam_inicial = { { 1.0, 0.0, 0.0 }, { 0,0,0 } } ; the part of my program that gets the position of the camera is: sgVec3 pos_camera; int xc; int yc; int zc; ssgSetCamera ( & cam_inicial) ; ssgGetCameraPosition(pos_camera); xc = pos_camera [0]; yc = pos_camera [1]; zc = pos_camera [2]; cout<<"camera: "<<xc<<", "<<yc<<", "<<zc<<"."<<endl; The values should be 1.0, 0.0, 0.0. But the returned values are -1, 0, 0. I also tried this with the tux example, values don't seem correct either. Attached is the modified tux example code. May someone tell me what i'm doing wrong? thank's -- Andreia R. Assuncao Schneider Curso de Ciencia da Computacao Universidade Federal de Lavras |
From: sickz6sickz <sic...@ho...> - 2003-04-16 23:28:24
|
Fixed the problem, think the blame went to strcat and me not using things correctly. |
From: Wolfram K. <w_...@rz...> - 2003-04-16 15:23:15
|
Hi >I=20 >try to change the position of the camera using the function = ssgSetCamera,=20 Sounds good to me. Did you check the function gets called? And that you are in the right "environment". Sorry, I forgot the correct word, but if you have several windows, you can have a camera in each one, maybe you change one and use the other? >Thank's. Bye bye, Wolfram. |
From: Andy R. <an...@pl...> - 2003-04-16 14:51:34
|
[Oops, I said I'd cc plib but didn't. Here it is. Followups should probably go to fli...@fl... to reach the original bug reporter.] Mike Urig wrote: > I upgraded to RH9 the other day and when I tried to run FG it did > nothing. So I'm in the process of recompiling it but when I went to > "./configure" plib I got the message: configure: error: could not find > working GLUT library. You probably installed the NVidia drivers, right? Red Hat 9 ships a broken GLUT that won't work with third party libGL's. What happened is that they ship GLUT as distributed by SGI, not the one in the Mesa distribution. The SGI glut hasn't changed since 1998, and therefore doesn't know how to link dynamically against extensions using glXGetProcAddressARB(). So it tries to link against the SGIX_video_resize extension statically instead. Until recently, XFree/DRI/Mesa didn't support this extension, so the support wasn't compiled in. But now they do, so the resulting GLUT depends on these functions. But guess what? NVidia (and other third party OpenGL implementations) don't support it. So glut programs can't link. The Mesa version has this fixed, so what you need to do is remove the glut from Red Hat ("rpm -e glut glut-devel") and install the one from Mesa. Another option is, after installing the NVidia drivers, to rebuilt the glut srpm. The NVidia headers don't export that extension. I tried reporting this to Red Hat's bugzilla, but somehow wires got crossed and Mike Harris kinda threw a temper tantrum and locked the bug so the outside world can't see it. If you want to re-report it there, please be very gentle. :) There's also a thread at the NVidia discussion site where I re-posted the summary: http://www.nvnews.net/vbulletin/showthread.php?s=&postid=103801#post103801 We should probably add this to the website as a FAQ. It's going to bite lots of people. I'm CC'ing the plib folks, because it affects them too. Andy -- Andrew J. Ross Beyond the Ordinary Plausibility Productions Sole Proprietor Beneath the Infinite Hillsboro, OR Experience... the Plausible? |
From: Andreia R de A. S. <an...@co...> - 2003-04-14 22:19:42
|
Hi, I'm trying to change the position of the camera but it doesn't work. I'm using the GLUT to build a window and in a function named keyboard. I'm using a switch, where I test if the key pressed is 'p'. If that is true I try to change the position of the camera using the function ssgSetCamera, but it doesn't change the position of the camera. Is that the correct function to change the position of the camera? Thank's. -- Andreia R. Assuncao Schneider Curso de Ciencia da Computacao Universidade Federal de Lavras |
From: Erik U. <un...@et...> - 2003-04-14 11:54:47
|
Hello, If I'm not mistaking I believe there was a discussion regarding multi-texturing support in plib on the plib-devel list about half a year ago. Anyhow, was this feature ever built in into plib? If so, how do I use it? I want to stretch out a second texture over a large VtxTable. Do I need the CVS version of plib or is it enough with the tarballs on plib.sourceforge.net for plib-1.7.0 or current.tgz? Best regards, Erik Unemyr Student @ Chalmers University of Technology, Sweden |
From: Steve B. <sjb...@ai...> - 2003-04-12 19:15:09
|
Andreia R de Assuncao Schneider wrote: > Hi, > I'd like to know what is the meaning of the parameters passed to the > struct sgCoords (x,y,z and p,h,r). > As far as I know, x,y,z are the parametes of the translation and the > rotation is executed before the translation, but I dont't understand what > p, r, z mean... xyz is the translation (positive Z is up, X is to the right, Y is forwards) and hpr is the rotation. h == Heading (rotation about the Z axis) p == Pitch (rotation about the X axis) r == Roll (rotation about the Y axis). Some people use the word 'Yaw' instead of 'Heading' - but Yaw begins with a 'Y' and it gets confused with the Y axis. The array indices go in the same order as the letters, so hpr[0] is heading, hpr[1] is pitch and hpr[2] is roll. ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |
From: Andreia R de A. S. <an...@co...> - 2003-04-12 17:39:29
|
Hi, I'd like to know what is the meaning of the parameters passed to the struct sgCoords (x,y,z and p,h,r). As far as I know, x,y,z are the parametes of the translation and the rotation is executed before the translation, but I dont't understand what p, r, z mean... Thank's in advance. -- Andreia R. Assuncao Schneider Curso de Ciencia da Computacao Universidade Federal de Lavras |
From: Simon <sim...@ho...> - 2003-04-11 12:45:37
|
Hi all, I've been trying to use the ssgParser to parse through a text file and read it into a tree. The problem that I have is that im reading 3 part lines in one at a time and in the third section the second word is ALWAYS dropped. This may be easier with an example: 0 HEAD 1 CHAR ASCII 1 ADDR Submitters address 2 CONT address was continued here and here (gedcom format) ok well in this example the first two lines will read in fine but the word "address" on line 3 will be skipped and the word "was" on the last line will be missed. I reached this point on the first day of writing my code and spent around a week trying to fix it. I figured in the end that it couldn't be my code and that it must be ssgParser so downloaded the latest CVS ssgParser and still have no success. The exact same problem which now makes me think that it must just be my code. Can someone take a look at the following and tell me where im going wrong. Its now been two weeks stuck on the same problem and I think that I am too far into the code to see something really obviously wrong. static int parse() { bool firsttime = true; char* token; int startLevel = parser.level; //Create the tree using the header as the root node. This works since there //can only be one header in a gedcom transmission. tree<gedcom_line> tr; tree<gedcom_line>::iterator root, trHeader; root=tr.begin(); char *tempWord; char *tokCopy; while ((token = parser.getLine( startLevel )) != NULL) { if (firsttime) { if (strcmp(token,"0")) { parser.error("Not gedcom format, invalid header"); return false ; } level = atoi(token); parser.expect(" "); token = parser.getNextToken(0); if (strcmp(token,"HEAD")) { parser.error("Not gedcom format, invalid header"); return false ; } tag = token; line_value = ""; //Create the first structure in the tree - The Header...checkout the //string to int function - atoi(const char*) gedcom_line *Header = new gedcom_line; Header->level = level; Header->tag = tag; Header->line_value = line_value; trHeader=tr.insert(root, *Header); firsttime = false; } else { /* problem starts around here, the code in the if statement above deals with the first line i.e. 0 HEAD as gedcom filetype validation. This next bit deals with every other line A typical line consists of : level(space)tag(space)line_Value. It is the line_Value area that is not working */ level = atoi(token); parser.expect(" "); tag = parser.getNextToken(0); line_value2 = parser.getNextToken(0); if(strcmp(line_value2, "\n") == 0) { line_value = ""; } else {//it probably equals a sqace then line_value = parser.getNextToken(0); bool running = true; while(running) { tempVal = parser.parseToken(0); if(strcmp(tempVal, "\n") != 0) { strcat(line_value, tempVal); } else { tempVal = ""; running = false; } } } gedcom_line *newNode = new gedcom_line; newNode->level = level; newNode->tag = tag; newNode->line_value = line_value; trHeader=tr.insert(root, *newNode); level = 0; tag = ""; line_value = ""; } } return true ; } Thanks in advance Simon |
From: Steve B. <sjb...@ai...> - 2003-04-10 22:05:46
|
Allen Yang wrote: > I was wondering if anyone can show me how to put 3D text on the screen. Do you mean actual, 3D polygonal letters with 'depth'? Or do you perhaps mean flat 2D text painted onto a polygon that's placed in 3D? If it's the former, you need a 3D modeller to generate the '3D font' as a set of models that you'd load in the usual way...AC3D can do this for example. If it's the latter then the FNT library can do that for you. ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |
From: Steve B. <sjb...@ai...> - 2003-04-10 22:03:37
|
Andreia R de Assuncao Schneider wrote: > i'd like to know if there is a way to transform a cone made by a glu > function (gluCylinder) in a ssgEntity. No, there isn't. The glu functions render the objects directly every time you call them - they don't build up a permenant data structure in memory. > My problem is that I need to put a > cone on my scene and I didn't a method that build a ssgEntity with the > shape of a cone. Nope - didn't write one of those. I suggest you look at ssgAux - there is code there (class ssgaCylinder) to build a cylinder - it should be pretty simple to see how to change it to make a cone. ---------------------------- Steve Baker ------------------------- HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://www.sjbaker.org Projects : http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net -----BEGIN GEEK CODE BLOCK----- GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M- V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++ -----END GEEK CODE BLOCK----- |
From: Allen Y. <ay...@wr...> - 2003-04-10 19:21:29
|
Hi, I was wondering if anyone can show me how to put 3D text on the screen. Thanks. |
From: Andreia R de A. S. <an...@co...> - 2003-04-10 18:42:56
|
Hi, i'd like to know if there is a way to transform a cone made by a glu function (gluCylinder) in a ssgEntity. My problem is that I need to put a cone on my scene and I didn't a method that build a ssgEntity with the shape of a cone. Thank's in advance -- Andreia R. Assuncao Schneider Curso de Ciencia da Computacao Universidade Federal de Lavras |
From: McEvoy, N. <nic...@ds...> - 2003-04-02 23:15:05
|
Ralf Pietersz wrote: >I am certain its a bug in PUI or a real bad design decision. >I wasnt able to delete the dialogbox in the callback, whatever I tried. >But then, where else should I delete it if not in the callback? I know this is not ideal ... but as a temporary fix ... you could hide the dialog, in the callback, instead of deleting it. >The redraw doesnt help for me.... my problem is that its only a >noticebox, >so there is no time being used in between, but anyway having the app >rely on >a fulfilled race condition is really bad anyway. Yes, I agree. That's what I'm worried about in my app ... it works ... but in the back of my mind I know a bug lurks. I hate that ! :) >Still didnt get it to work... I think someone who REALLY knows (like the >developer who >wrote it :P) needs to tell us what its doing and why... they should >know... >Searching through the code didnt help me at all, whatever its doing must >be hidden somewhere. Yes, I suggest take your problem to the devel list. Someone there (ie. the pui author) should be more helpful. >I was trying to pop the dialogbox from the stack but it still gets the >mouse event and crashes. >I dont know what else I can do to persuade PUI that I REALLY deleted it. >:P >It doesnt say anywhere in the docs how the deletion works, but somehow >the example apps seem to >work... really weird. Damn, I hate it when the example works ... but then crashes in your own framework. Happens to me all the time. :) What you need is a simple example that demonstrates the problem. Cya, Nick |
From: SkyFlash <sky...@ch...> - 2003-04-02 05:45:27
|
> What I found was that the puMouse(button, state, x, y) > callback was arriving after dialog was deleted !? Yes, thats the same I am seeing, and I dont know why. > I'm not sure if it was a timing issue in my code, or a bug in > the pui ... where maybe it doesn't correctly check if the > dialog exists when checking hits (if I remember correctly it > seemed to happen on the mouse up event). I am certain its a bug in PUI or a real bad design decision. I wasnt able to delete the dialogbox in the callback, whatever I tried. But then, where else should I delete it if not in the callback? > In my case *maybe* it was a timing issue (but I'm not > convinced yet) ... I changed my code as follows to delete the > dialog after an intensive load operation (and a redraw ... > maybe the redraw is the solution ... I'm just guessing here): The redraw doesnt help for me.... my problem is that its only a noticebox, so there is no time being used in between, but anyway having the app rely on a fulfilled race condition is really bad anyway. > Sorry I can't be more helpful than that. Let us know what you find. Still didnt get it to work... I think someone who REALLY knows (like the developer who wrote it :P) needs to tell us what its doing and why... they should know... Searching through the code didnt help me at all, whatever its doing must be hidden somewhere. > >Do I need to tell PUI I am deleting that dialogbox AND the buttons > >inside it?? Clean something up? Pop some interface from the stack?? > > No, I don't think so. I was trying to pop the dialogbox from the stack but it still gets the mouse event and crashes. I dont know what else I can do to persuade PUI that I REALLY deleted it. :P It doesnt say anywhere in the docs how the deletion works, but somehow the example apps seem to work... really weird. Ralf Pietersz |
From: McEvoy, N. <nic...@ds...> - 2003-04-02 00:44:59
|
Ralf Pietersz wrote: >I have a strange crash I dont really understand... >If there is anyone that has experienced something similar and knows a >solution please speak up. :) >Basicly, I create a dialogbox, and close it when the callback for the >button inside it is called. >Once it closes I get a crash, access violation. >Traceback: >puOneShot::doHit(int 0, int 1, int 243, int 34) line 33 + 12 bytes >puObject::checkHit(int 0, int 1, int 243, int 34) line 508 + 29 bytes >puGroup::checkHit(int 0, int 1, int 243, int 34) line 212 + 29 bytes >puMouse(int 0, int 1, int 394, int 316) line 378 + 42 bytes >mouse(int 0, int 1, int 394, int 316) line 1004 + 21 bytes >FREEGLUT! 0089661d() <snip> I've only just started using the pui ... so I'm no expert (although I've been using plib for years) ... but I do remember I had a similar problem as you describe. What I found was that the puMouse(button, state, x, y) callback was arriving after dialog was deleted !? I'm not sure if it was a timing issue in my code, or a bug in the pui ... where maybe it doesn't correctly check if the dialog exists when checking hits (if I remember correctly it seemed to happen on the mouse up event). In my case *maybe* it was a timing issue (but I'm not convinced yet) ... I changed my code as follows to delete the dialog after an intensive load operation (and a redraw ... maybe the redraw is the solution ... I'm just guessing here): on mouse down: - closed & deleted dialog - loaded level (+ redraw) - crash occurred (similar to your description) on mouse down: - hide dialog - loaded level (+ redraw) - deleted dialog - no problems Sorry I can't be more helpful than that. Let us know what you find. >Do I need to tell PUI I am deleting that dialogbox AND the buttons >inside it?? >Clean something up? Pop some interface from the stack?? No, I don't think so. Nick |
From: Allen Y. <ay...@wr...> - 2003-04-01 20:22:59
|
Hi, I tried to create 3D texts on the screen. I wanted to use fntTexFont to solve my problem. However, my code kept crashing on Creating a new fntTexFont object. The problem was that fntTexFont can't find .txf file in my directory. However, I already created a sub_directory under my project and the .txf file was in there. I really want to know where I should put those .txf files and how can I make this thing work? I will be appreciated any help. This is my code: static fntTexFont **font_list ; static const char *font_names [] = { "Times-Roman.txf" }; COpenGLFonts::COpenGLFonts() { textout = new fntRenderer(); TextOut(); } COpenGLFonts::~COpenGLFonts() { } void COpenGLFonts::TextOut() { static fntRenderer *textout; char fname [ 256 ] ; font_list = new fntTexFont* [ sizeof(font_names) / sizeof(font_names[0]) ] ; sprintf ( fname, "fnt/%s", font_names [0] ) ; font_list [0] = new fntTexFont ( fname ) ; //crash here every time!!!!!!!!!!!!!!!!!!!!!!!!!!!! fntTexFont times("Times_Roman.txf"); textout -> setFont ( ×) ; textout -> setPointSize ( 25.0f ) ; textout->begin(); glColor3f ( 1.0f, 1.0f, 0.0f ) ; textout->start2f(50.0f,80.0f); textout->puts("hello"); textout->end(); } |