@# Quotes DB     useful, funny, interesting





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



Comments:

<0> So it's instead of GLUT, not in addition to, correct?
<1> Correct
<2> GLUT is like quick-and-dirty-OpenGL
<3> GLUT is "like" a multi-platform utility toolkit like it says in the description ;p
<3> it is pretty quick to get setup
<3> would be more usefull if you had some more control over its UI and other display settings and you mixed it with some type of GL widget set
<2> right now my experiments are using wxwidgets + wxglcanvas
<4> welp italy is through
<4> to the finals
<0> Okay guys... well I've read the introduction and FAQ for SDL, I've downloaded the .zip file... what now? How do I actually get it working with my compiler (I'm using the Dev-C++ IDE, if it matters)?
<1> Put the .a and .h files in the right directories
<0> I can just keep them in my source file directory, right?
<0> There's no .dll file(s)?
<1> You can put them anywhere you want, but standard directories would be preferable. Surely there's a guide for mingw32/dev-c++
<0> not specific to the SDL library.
<1> http://www.libsdl.org/faq.php?action=listentries&category=4#47



<0> I found that tutorial already, but it tells you to download the .zip file from that site, which isn't the latest SDL release.
<5> Is it possible to have a vector for my gl textures?
<5> leik
<5> std::vector<GLuint> textures;
<1> As long as the gluint are stored somewhere...
<1> Weird idea to use a C++ vector anyhow
<5> i unno
<5> someone suggested I make my Image cl*** use a vector
<5> I had it as an array of MAXIMAGES size
<5> i unno :P
<5> off to blow **** up
<5> bye
<1> Goodbye
<6> Mal - Any idea why I would need to call glXWaitX(); twice in a row for it to actually work?
<1> Is the process sleeping afterwards or something similar?
<1> Try a XSync()
<1> Actually, what's the big picture here?
<6> Okay, so this is actually really gross
<6> Basically I've been paid to reimplement a 1960's graphics package in GL
<6> (and C)
<7> 60's? like plotter stuff? heh
<6> there is no event loop (because this package is being called from an interpreted language)
<6> basically i can just run linearly
<1> Ahah, neat
<6> kind of, but its frustrating sometimes
<6> Anyway
<6> There are views
<6> they map a portion of the window into a new coordinate system
<1> Is the sync issue at the GL or X level?
<1> Go on
<6> The "window" is a view in the api, and so are its subviews
<6> if you resize a window-view, XMoveResize is called
<6> followed by glXWaitX(); followed by some GL code
<6> For example, Im drawing 10,000 lines to the window-view
<1> I don't see the point of glXWaitX after the Resize event
<6> Well, X is asyncronous, and so is GL
<6> so when the user calls XMoveResize (by a viewport resize), it needs to finish *before* GL rendering can proceed, or GL doesn't know about the new window-size/position
<1> I thought glx would synchronize that properly, is that the glXWaitX that causes problems?
<6> GLX doesn't sync.
<6> thats what glXWaitX and glXWaitGL do
<1> Yes, I meant glx doing the proper sync management between ogl and X for events such as Expose or Resize, but anyhow ; is that where the problem is?
<6> yeah
<6> So, remember that I don't actually handle events
<6> give me 1 sec, I'm going to paste to nopaste
<7> "but... what if I take two blue pills?" "then... you might to into the matrix... of the matrix..." "whoaaaa"
<1> You need to flush the Resize event to the server
<1> XSync( display, False );
<6> hrm
<6> glXWaitX is suppose to do that...
<6> http://rafb.net/paste/results/ba5Y3966.html
<6> if you scroll down to /******/ That's what a program using this api looks like
<6> notice no looping for event handling
<6> also notice all the glXWaitX() that should be redundant.
<1> What's the problem if you use only one?... I might need to check the man pages again, but I really would do a XSync() there
<6> hrm
<6> So the problem is that it draws before it moves
<6> so it draws, then "scrolls" over and garbage fills the parts of the frame buffer that weren't part of the display before the move
<1> Did you try XSync() instead?
<6> I'll try agian.
<6> i still need 2 of them, or one and a glXWaitX
<1> That doesn't seem to make sense...



<6> I know
<6> OS X glX
<1> That's not one I know, but I would still expect it to work accordingly to the specifications
<6> me too
<1> Could it be related to the output buffer being flushed, but the input ( with the Resize event ) hasn't been received yet on the client side?
<6> yes
<6> though thats why I call glXWaitX
<6> so ensure that the input has been recieved.
<6> so = to
<1> That synchronizes the server, but not the client waiting for events from the server
<6> doh.
<6> how would i sync the client?
<1> I think you'll actually have to wait for a Resize event there
<6> hrm
<6> XIfEvent?
<1> That should work, yes
<1> Actually, use XPeekIfEvent() to avoid modifying the event queue
<6> Do you know the event type off hand?
<1> ConfigureNotify
<6> thanks
<6> So, if I do that, it just hangs forever
<1> MotionNotify?
<1> I think that's it, it has been some time since I played with Xlib
<1> Nevermind, that's the cursor. Look for an Expose event
<1> Expose would definitely tell you that the window is ready
<6> frozen
<6> do I need to set an ExposeMask in the SWA stuff?
<1> Ah, yes!
<1> ExposureMask
<6> thanks!
<6> lets try
<6> still frozen
<1> SWA.event_mask = ... | ExposureMask; and it doesn't receive the event?
<1> You did XSync() before waiting for the event, right?
<6> nope
<1> Otherwise, it stays in the output buffer
<1> Right, do so
<1> or just XFlush()
<6> no go
<1> Argh!.
<6> http://rafb.net/paste/results/fgI1am85.html
<1> env_attr.event_mask = KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | EnterWindowMask | LeaveWindowMask | PointerMotionMask | PointerMotionHintMask | Button1MotionMask | Button2MotionMask | Button3MotionMask | Button4MotionMask | Button5MotionMask |
<1> ButtonMotionMask | KeymapStateMask | ExposureMask | VisibilityChangeMask | StructureNotifyMask | ResizeRedirectMask | SubstructureNotifyMask | SubstructureRedirectMask | FocusChangeMask | PropertyChangeMask | ColormapChangeMask | OwnerGrabButtonMask;
<1> Then loop through events and see if you get anything :)
<6> ahahhaa
<6> oh lord.
<6> Okay, I wouldnt know how
<6> XNextEvent?
<1> The callback you have there should do as well
<1> printf() what you get, you must receive an event of some sort
<1> Keep in mid that if the if( view->type == G_WINDOW_VIEW ) is not taken, you will wait forever
<6> yeah
<6> thats okay
<6> it has to be taken
<6> (i only have one view and it is definatey a g_window_view because the window moves and such)
<1> Okay
<6> plus, all top level views are g_window_views..
<1> Robot chicken?
<6> hm
<6> ...
<7> tv show... on toon network... seth green...
<7> http://www.youtube.com/watch?v=hAL7w2ybTfQ is a clip from it
<8> I think more or less every episode is available at video.google
<6> weird
<6> I took out the XPeekIfEvent, and reorganized
<6> and now one glXWaitX works
<6> ... bizzare
<1> Can you share the new code?
<1> It might "work", but I'm curious to see if it would work if going through a network with some latency..
<6> okay
<6> http://rafb.net/paste/results/CeSBqo74.html
<6> Shakespear in the park time
<6> Maloeran - maybe I can get you to help me with this later/tomorrow


Name:

Comments:

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






Return to #opengl
or
Go to some related logs:

#unix
#gentoo
#unix
#delphi
#sql
#red
massaged munches
globalsearch.usenetserver
PlexTools BlueScreen
#gentoo



Home  |  disclaimer  |  contact  |  submit quotes