@# Quotes DB     useful, funny, interesting





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



Comments:

<0> Not by itself, the user provides its own structs and tell the implementation where the tree nodes are within the struct by offsetof()
<1> ok, so it's arranged to facilitate it...
<0> Correct
<1> that's ALMOST a lisp1.5 impl, dude
<1> an efficient one, at that :D
<0> Quite efficient, yes :p. http://www.rayforce.net/bintreemess.c I think it's a red-black tree, more or less, with a couple differences
<1> hm, there are a few 'with differences' relatives of rb trees, like avl trees, um
<1> and one that uses freakin' lightening bolts int he MIT algo book
<0> Not too sure what that is exactly, it's just what seemed the best solution for a self-balancing tree to me
<1> btrees, b+trees and b*trees are interesting, heh...
<1> tries are even more interesting
<1> hrm, I'm not seeing what I was thinking off in this book.. mebbe it's in one of the other books, or was a 'selected topic' :/
<0> More interesting when you don't look for the answer in a book first :p
<1> it depends



<1> is your purpose to emulate the giants, or stand on the shoulders of the giants?
<0> I think the purpose is more about the pleasure of intelectual stimulation
<1> if I got **** to do, and I wanna get it done, and it ain't been done before... yes, I will look in books, I will remember back to my school days, and I will try to use as much of someone elses work as possible... cuz, uh, I wanna get ti done and move to the next problem
<1> the interesting part isn't about redoing previously done problems, it's about doing NEW problems, and the things done before are all tools in accomplishing that
<1> so a good breadth of knowledge and resources are beneficial *shrug*
<1> <-- doesn't wanna solve previously solved problems, even if he solves 'em better... wants to solve UNsolved problems... like a good computer scientist o.O
<2> are there any good tutorials for opengl running on linux? i have already tried google with apparant result
<0> Install drivers from your video card vendor
<1> what library do you use to interface X and OpenGL, a256?
<0> If it isn't Nvidia or ATI, you might have a problem
<2> i failed with that
<1> matrox was very well supported until ike the m550 iirc
<1> better than nvidia and ati, and open to boot... :(
<2> i got NVidia
<0> Did you download and install their drivers? What's the problem exactly?
<0> Ah, you asked this a couple days ago too
<2> yes
<2> i should type "sh [verylongname]" and it did not find the file
<2> but it is possible to run without hardware acceleration isnt it?
<1> erm... that was a completely useless statement o.O
<0> Make sure it got +x and ./longfilenamethinghere in the directory where the file is
<1> if you have a libGL.so, it will display something.
<0> Software rendering is very slow
<2> yes ill do that later but i want to try it out first
<1> not necessarily, mal...
<1> textures are what kills sw
<2> so i googled for "opengl tutorial" linux and found no section called "your first program"
<1> e256: do you have possession of "the red book"?
<0> You don't need a "tutorial" specific to Linux. Get redbook, topic
<2> im not a communist
<1> ...
<1> it's called "the red book" because the book is red
<1> you pinko commie bastard
<2> :)
<1> http://math.missouristate.edu/opengl/redbook
<1> this document is the holy bible of opengl programming...
<2> and contains a tutorial for opengl on Unix platform?
<1> and the 'example pack' you can download for it works on linux...
<2> does it contain commandments?
<1> it's a tutorial for opengl... regardless of platform
<1> thou shalt call glBegin() before glVertex3f()
<0> glut is cross-platform, it works anywhere, and it relies on glut for its code samples
<0> You probably should switch to SDL later on though
<2> ill already used that
<2> ive used opengl on windows a little bit and then i switched to SDL, just as you say :)
<2> but now i have finally killed the ultimate virus windows and want to use some more noble graphics software than sdl
<0> Your SDL/opengl code should compile on Linux just fine
<1> unless you ****ed it up by doing something stupid like #include <sdl\sdl.h> instead of #include <SDL/SDL.h>
<2> well i wasnt that precise when i killed windows, i killed at random killing a lot of other things
<2> so now i have opened this holy book, but i cant see anything on creating windows, do i HAVE to use glut for that?
<0> The redbook uses glut because it's simple and primitive, but you can use SDL
<2> one graphics software at a time
<1> when you do opengl with sdl, all the graphics is in opengl... sdl provides input, sound, and attaches the ogl context to the X context
<1> are in?
<1> hm
<2> it must be easier to learn solely opengl, tutorial-wise?



<1> no, opengl has no direct attachment to a display manager... opengl does not exist 'alone'
<2> i see
<0> You can either use platform-dependant interfaces like glx, wgl or agl ; or you can use SDL which is cross-platform, _much_ simpler and takes care of this mess for you
<2> so what should i start with if i want to learn it this way, except the hardwareacceleration?
<0> Redbook, always
<2> you talk a lot about this red book... ill check it
<2> ill see you later
<2> _where_ can i find <glaux.h>??
<0> Don't use glaux, it's outdated and non-portable, try SDL_image, pnglib, or whatever else to load your textures
<2> the red book uses glaux
<2> i cant find any tutorial without glaux
<0> The redbook is about opengl, not about windowing, input or image loading
<2> it seems like the whole world has gone glaux
<2> i found a tutorial without glaux, instead i hadnt got gltk.h
<0> No, the online version of the redbook is old, but the basics never changed
<2> do you know where to find glaux or gltk?
<0> Loading an image can be done with pbglib or any other library
<0> You don't need to replicate the code of tutorials, learning opengl is the important part
<2> i believe i will using it
<2> i think ive found something know
<2> im deeply thankful for your patience and responsiveness
<2> good bye
<2> when i run lighthouse 3d:s tutorial on glut (among many other tutorials) i get "undefined reference to:" "glutInit","glVertex" and many other files. why?
<0> You need to link with the libraries of course
<0> -lGL -lGLU -lglut
<2> ok ill try that, thanks again
<3> Maloeran: thanks! :)
<3> Its not possible to copy an entire line directly? it would be faster i guess..
<3> Btw. I also wonder if I am thinking correct. I am doing a 2D game, which atm works nice (around 400 fps @ 1280x960 resolution). The way I do it is store all images as textures, then use texture references to map them onto quads to draw tiles/mobs/whatever every frame. Is this the right way to do it? or are there faster ways, maybe using translate somehow?
<4> magnus_: As binding a texture is still very expensive, yes that's a good way to do it.
<3> I only bind textures once, on level loading
<4> A even better one is to have several tiles on the same texture, and then draw them all together.
<3> hm or wait
<4> To save yourself from unneccesary bindings.
<3> glBindTexture(GL_TEXTURE_2D, texture);
<3> thats texture binding? :)
<4> yes
<3> then i do it for every tile/mob/sprite :(
<3> Hm
<3> or I could sort the sprite/tile list and draw them in order and somehow detect when next type of image to be drawn comes up
<4> is each sprite its own texture?
<3> if they look the same they have the same texture
<4> That's not what I'm asking.
<3> :)
<4> Again: Do you have several different sprites saved in the same image. E.g tilesets.
<3> No
<3> Separate images for each tile
<3> aaah thats why lots of games have all tiles in one image
<4> That would really speed up things, as I mentioned above.
<3> they just change the uv coords
<4> Correct.
<3> Thats smart. I use that for my fontSet
<3> (all fonts in one texture, etc..)
<3> Thanks for the tip! :)
<4> You're welcome.
<4> It's also a pretty neat way to store animations.
<3> yeah, it **** to have badguy-X.png for X 1->5
<3> The backside is that its not as flexible when you add new tiles, etc. Now I just add the .png and add a tag in the xml file describing the tileset
<4> Well, if you have several tilesets with the same structure, your xml file can ***ume its layout.
<4> And then you can make names for the different tiles.
<3> Yeah. How large can the texture be in x-pixels times y-pixels?
<4> The max width and height can be queried for.
<4> It's dependant on your graphics card.
<4> Hm, or maybe not.
<4> I don't see any glGet parameters for such a thing.
<4> I'm quite unsure actually. But even the Geforce 2 supports 2048x2048 textures.
<5> glGetInteger with GL_MAX_TEXTURE_SIZE
<0> magnus_, sort primitives by textures indeed, and you can pack multiple images per texture as mentionned
<3> hm ok
<3> I could keep my current system with the files and generate this one-texture-tilemap in code


Name:

Comments:

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






Return to #opengl
or
Go to some related logs:

#computers
#nhl
#windowsxp
neutered man humor
cpatial gains tax
#politics
#visualbasic
#freebsd
teflon trackpad
#beginner



Home  |  disclaimer  |  contact  |  submit quotes