@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3



Comments:

<0> hm, textured polygons seems totally unaffected by lighting, how very strange...
<1> Are you sure your glTexEnv() would not be GL_REPLACE ?
<0> what would that do?
<0> must check
<0> GL_ADD
<0> oops
<0> GL_MODULATE, I meant
<0> :)
<1> GL_MODULATE = PrimaryColor*Texture GL_REPLACE = Texturing ? Texture : PrimaryColor;
<0> ok
<0> yeah
<0> the first one
<0> but the result is like the other
<0> hm, must go
<0> too bad
<1> I don't see many other explanations really, grep through the whole code



<1> Okay, good luck
<0> thanks!
<0> actually, I was putting GL_REPLACE there and couldnt see any difference from before...
<0> well, cu
<2> ``Erik - Are you around?
<2> Any lisp users around at all?
<3> jawhol?
<4> hello
<3> ...
<3> (and I do scheme, not cl...)
<2> Hey :)
<2> Same damn thing :d
<2> Have time for a quick couple of questions?
<3> sure...
<3> (did you just ask to ask??? DUDE)
<2> heheh
<2> Basically I'm doing some C / lisp interop
<2> I've got it working in that I can write a bit of lisp that calls my code p***ing in a (lisp) stack allocated variable
<3> ooooookay?
<2> all I want to be able to do is change it so that the function I've created can have that variable p***ed to it
<2> instead of declaring it locally
<2> I know the syntax to declare it at a more global level,
<3> the C function? or the lisp function?
<2> so its just a matter of syntax as far as p***ing lisp the variable
<3> (this is very much impl specific stuff0
<2> yes, I realize the c-calling stuff is impl specific, but Im hoping my question of p***ing a variable to a lisp function isnt :)
<2> let me post something on nopaste
<3> I d'no if lisp has any specific mechanism for that... that's very much impl land, in a decent scheme compiler, it should figure out if the function changes that variable and should choose whether or not to copy by value or reference by itself
<2> hrm
<2> http://rafb.net/paste/results/2OW0ar53.html <- here is a bit of code I have that works.
<2> all I want to do is break these tasks up into functions
<4> yo
<2> so I can create a Gview instance with (defvar view ( make-alien ( struct Gview )))
<3> that stinks of macro land, to me
<4> has anyone implemented nurb functionality into their opengl routines?
<2> now all I want to do is create wrappers.... say g-create-window that takes my view, can does the alien-funcall
<2> sysrpl - twingy. he wrote nurbana, which was a nurbs modelling tool, and is now the nurbs code in blender.
<2> He hasn't touched it in years, though I suspect he recalls most of it
<2> ``Erik - so, I know pretty much 0 about lisp
<2> I fought for a day to get the code on nopaste working :p
<3> hm, heh, it looks kinda ugly, interfacing other languages is always... interesting
<2> :)
<2> and thats what Im trying to put into wrappers
<2> I have a library that I want to create a lisp wrapper for, so that if someone wants to use it in lisp, that work is already done
<3> best thing in my experience is to make the wrapper part as obscenely thin and trivial as possible, even if it means 'ugly' lisp code... then you can build up extra functions and wrappers on top o.O
<3> if those 4 native calls are the things you wanna do with that code, put it in a function... if you have a lot of very similar calls, macro it up
<3> (lithp and thscheme have thyntax aware macros, far far more powerful than C string substitution macros, far more powerful and versatile than c++ template expansion)
<2> the only thing I need to change here is the ability to p*** the view in, rather than declare it
<2> so...
<3> (where does gcolor come from?)
<2> I want to say (defvar my-view (make-alien ( struct Gview ))) .. get my-view back and then p*** it into g-create-window
<2> its a struct defined in the C-side of things but its imported into lisp via the alien mechanisms
<3> so there's more outside of that, you can't just wrap that in it's own (defun)
<3> are you aware of 'let'?
<2> here's all the code.
<2> http://rafb.net/paste/results/Irf3Pq45.html
<2> yeah, so let isn't what I want
<2> consider the user is running totally interactively



<2> he wants to say "make me a view"
<2> now "make me a window using this view information"
<2> now "draw on my view"
<2> the perhaps clear the view, or close it and make an new one
<3> (defun (makeview) (let* ((view (alien gCreateWindow)) (color (alien defaultcolor))) (alien clear) (alien gtan) (alien gmakevisible) view))
<3> ?
<2> mmm
<2> one sec. let me parse
<2> i don
<2> don't always want to call gcreatewindow on it
<2> sometimes I want to call gcreateview
<3> so p*** that in as a string?
<3> or make two funcs?
<2> there will be another func...
<2> but that bit of code isn't what I always want to do
<2> the point is that it's interactive mode
<2> I can't prescript all of the commands using local vars
<3> 'interactive mode'?
<2> the user is typing his commands in
<2> not loading a file
<3> sooo, have 'em type lithp? :D
<3> or write a parser?
<2> urm
<2> you're not quite following I dont think
<3> I guess not :)
<2> your makeview ***umes that I always want to call gCreateWindow then clear, set the color, and make visible
<2> what if I just want to defvar a view...
<2> then do some random series of commands
<4> what library/api is gCreateWindow part of?
<2> a custom one used here
<3> (defun (dr^eval str type) (alien-funcall (extern-alien str (function void (*(type)))))) ?
<2> what about something like
<2> (and here's what Im trying to make work, specifically)
<3> so you're just now getting around to asking your real question? :)
<2> (defun (g-create-window (v)) ( alien-funcall (extern-alien "gCreateWindow" (function void (*(struct Gview)))) (addr v)))
<2> heh, I should've given you the code that was broken rather than ask you how to write the code I couldn't figure out
<3> but the value you want to return is the return value of that alien-funcall, not the addr?
<2> there should be nothing returned, but inside gCreateWindow (in the C code) the view will be modified
<3> well.... ok... then do that... :D
<2> the line I wrote above gives me all sorts of crazy errors
<3> (is it (defun (symbol (varlist)) ...) in lithp???)
<2> it seems to be ( defun symbol (varlist ) ( ... ) )
<3> I'd read that as saying create a function, execute (v) and caall the return value the argument list for that function... woops, 'v' doesn't exist in that frame anymore
<3> but I'm a schemer, not a lithper
<2> scheme is a lisp dialect, so it should be close..
<3> yeah, but when you say lisp, do you mean lisp, or cl?
<3> cuz those're radically differnet
<2> ah, I donno these things
<3> and scheme was radically different from lisp1.5/maclisp/interlisp
<2> cl I suppose,
<2> since its cmucl Im using
<3> yeah, that's common lisp
<2> so how would you rewrite the above for the result I want?
<4> are you guys onn linux?
<2> os x
<4> :p
<3> in scheme, I'd write (define (g-create-window v) (alien-call blah balh blah) (addr v) #f)
<3> osX and fbsd
<4> do you know linux/unix? i got a problem
<2> depends on the problem. linux is kinda gross though.
<2> its like a bastard variant of unix/bsd that was born missing gene 21.
<3> osX is a variant of fbsd, fbsd is a freed up BSD4.4lite, BSD comes from unix system 1... linux is the retarded hcild trying to act like the grownups
<4> i typed the wrong su p***word three times in a row on my user account and now i cannot exec sudo commands. i was looking for a way to reset my user account so that it's not marked as failed three times on su p***word
<3> erm, type the right p***word? heh
<4> no
<4> sudo now does nothing
<3> you're talking about two very different programs, y'know...
<4> between su and sudo? when i said su ... i meant the su account ir. root
<4> ir. = ie.
<2> login as root
<2> or administrator, whatever
<2> then try editing /ect/sudoers
<2> man sudoers(5) I think
<3> man 5 sudoers


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #opengl
or
Go to some related logs:

#computers
#qmail
btls.com
#delphi
#nhl
#openbsd
#computers
ARP Spoofing4
irc ned teller
#politics



Home  |  disclaimer  |  contact  |  submit quotes