| |
| |
| |
|
Page: 1 2 3
Comments:
<0> prophile: can you help me understand why there is a problem when combining opengl and sdl? <1> corto: SDL_OPENGLBLIT is a hack and will either work at a snail's pace or not at all <1> corto: you can copy from SDL to OpenGL with textures <0> prophile: but can you have 2 rendering context at the same time? one using sdl and the other using opengl <2> prophile: You're talking about converting an SDL_Surface with the pitch for OpenGL, aren't you? <2> corto: no <1> corto: possibly, but you'd have to do some nasty hacking to do it <1> corto: like running them from different threads <2> That just makes no sense <0> OK guys! well, I've been trying like a fool then... <0> I was now thinking on shuting down SDL, and restart it with the correct video format, do my rendering, and shutdown again, restart go back to openg... <0> SDL_SetVideoMode() when called twice will re-set the video mode right? could be used for switching from the 2 rendering contexts? <2> corto: Why would you want to do that? I did not get the beginning of your problem because I just entered the channel <0> Eskapade: the begining is a long time ago, I have to have raw pixel access on screeen <0> and opengl is just one more layer to go through actually slowing things down. So i need to use raw sdl <2> Don't they have anything about that on NeHe? They got SDL sources, too.
<0> eskapade, mixing the 2 rendering contexts? <0> hmmm <2> corto: Well, maybe not that. I don't get why you want to stick with SDL if you use OpenGL anyway at some point. <0> eskapade, on certain hardware, opengl gets very slow to draw images on screen, the upload to a texture takes longer than it should take to do the whole displaying <0> i'm talking bitmap here <2> Non-power-of-two bitmaps? <0> yup <0> or not all the time, like screen sizes <2> Oh there's something to help with that <0> when dealing with textures it is padded to pow(2) <2> http://www.mevis.de/opengl/gluBuild2DMipmaps.html <2> http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=07 (ctrl f for glubild2dmipmaps) <0> this function is the slowest of all <0> because it makes mipmaps of the texture being used <0> I usually upload the texture raw, with no mipmapping (it wont be used) <0> but uploading a texture is out of question, takes too much time for a large image <0> the putpixel in opengl is faster <0> but putpixel in sdl is even faster <2> http://developer.apple.com/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_texturedata/chapter_10_section_4.html#//apple_ref/doc/uid/TP40001987-CH407-SW3 <2> Not sure whether this helps you <0> lemme check <0> not really, it adds work that needs to be done each time a frame needs to be displayed <0> I'm trying to simplify, using only sdl <2> Mm, no idea then. Sorry <0> np <0> I'll try switching from GLmode to SDLmode (just like a windowed and fullscreen switch) and see how that works <3> Hi, does anyone know of the most common sdl-bottleneck factor ? .. my game is running at an alarmingly low fps on certain machines. I'm just doing simple 2d-graphics (1024x768x32 HWSURFACE|DOUBLEBUFF) alot of SDL_BlitSurface <4> svearike: do you refresh all the screen each frame? <3> Raziel, yes I do <5> svearike: you're probably not getting hardwareblitting <4> :P no good <2> Raziel: does that matter when he uses double buffering? <3> biscon, I would think not actually, because the speed does not seem to vary between DOUBLEBUFF , SW and HW (different combinations) <4> I dunno, but I've got great speed improves with dirty rectangles <5> Im on linux and far as I know the standard X11 driver for SDL won't sport any hardware blits if not using DRI <3> ok, here is the most alarming part, on linux I get around 79 fps, on windows I get 30:ish, and a friend got 15 fps (win, and still a faster machine then mine) <3> so basically my linux kicks a**, even though I haven't got any proper video drivers installed/configured <5> svearike: probably because you are using DRI getting hardware blitting.. windows should provide hardware blitting as well trough the DX7 interfaces <5> svearike: some open source drivers are able to accelerate 2d, what gfx card you got? <3> 00:02.0 VGA compatible controller: Intel Corp. 82852/855GM Integrated Graphics Device (rev 02) <5> svearike: hmm tried profiling your program? <3> biscon, nope? you lost me there :) <5> svearike: not familiar with intel on board gfx, but I know that they opensourced their drivers lately, so 2d (and 3d for that matter) could easily come preinstalled with the standard drivers <5> svearike: a profiler is a tool which can tell you in which part of your programs the CPU spends the most time :) <3> but the biggest question seems to be, why is it so dramatically slower on windows ? I thought windows would have good support for all it's drivers etc.. sure I don't think that computer has DX7, but still <5> svearike: are you doing anything else than rendering? <3> biscon, yes I'm "updating" all my objects and then "drawing" them <3> worth mentioning is that I'm using C++ ... that in it's self might be a bottleneck (compared to c atleast) <5> svearike: I don't think that is the problem, but generally 2d fullscreen performance ****s these days, the hardware is build for accelerating hardware, good news is that its actually quite easy to use 3d hardware for 2d and your performance will skyrocket <3> biscon, hm, how would I go about to do that then ? I want the performance to skyrocket :D <5> svearike: im using opengl initialized trough SDL for 2d graphics, since I started doing that I have never had low framerates :) <5> well you should learn the absolute basics of opengl, either from a tutorial or a book.. but if you don't care about 3d at all perhaps it would be easier to look at some code which uses gl for 2d, reading up on the functions <3> biscon, Ok :) that sounds really promising, I tried doing that on my linux, but then I got 4~7 fps :) (no drivers) should probably work on windows though <5> there is a project called zEngine on sourceforge, kind of a 2d sprite engine implemented on top of gl but really basic.. it isn't all that good but you can study the code <3> biscon, so you can't use simple SDL_BlitSurface when you do OpenGL ? I read in the manual that you could, but perhaps that isn't accelerated then ? <5> svearike: as with windows you need the right drivers on linux to get hardware acceleration <3> biscon, I have done SOME opengl:ing, but I'm no expert <3> biscon, yeah but I mean, who doesn't have the drivers on windows ? and especially for opengl ? <5> svearike: nope.. you can't render with SDL.. but you just use a quad and a texture instead.. you can even configure opengl to setup a 2d like coordinatesystem <3> biscon, the world is turned upside down.. since when should 3d-graphics be faster than 2d-graphics ?
<5> svearike: well if you doesn't have some kind of exotic card you usually have the driver as well :) nvidia's linux drivers are great and I know there are drivers for your intel board as well <3> biscon, you wouldn't happen to know where to find them ? :D I gave it a half-hearted search before but didn't find any <5> svearike: because 3d is almost just about drawing triangles <5> svearike: with 2 triangles you can make a rectangle.. smear some texture on it <3> biscon, with this opengl-2d-acceleration story, do you actually load all the textures on to the gfx-card and then access them from there ? <5> svearike: yups opengl got a somewhat decent resourcemanager so you don't have to worry about filling vidmen (LRU cache) <5> you upload them to the card and get a texture id in return.. you use that id to bind a certain texture <3> biscon, ok well maybe I should check that zEngine out then :) but it sounds like such an overkill for my little tiny 2d-app :) I remember when mode 13h was all that mattered,, 320*200, that was fast <3> biscon, yeah I thought as much, (remember doing something like that in the past) <3> biscon, well I guess one upside is that I can actually perform some zooming capabilites to my game :) <5> well if you are mostly blitting It aint.. the code isn't all that much bigger, its just another way of doing it <5> svearike: oh yeah thats really easy and alpha blending comes for free <5> svearike: as well as antialiasing if you're into that :) <3> biscon, hehe :) well you make it all sound great, but it won't be great unless I find opengl drivers for my linux :) maybe I should write it so that it will go against either OpenGl or 2d :) should be pretty easy <5> flipping, rotating, scaling as well <5> svearike: you had the onboard 815g intel gpu? <3> lspci says: Intel Corp. 82852/855GM <5> svearike: http://intellinuxgraphics.org/documentation.html <-- good news you're supported <5> svearike: http://intellinuxgraphics.org/download.html <-- you need the mesa 3d download on this page <3> aah, perfect :) <3> thanks <5> svearike: np just googled your lspci output <3> hmm.. actually I see that in xorg.conf I have i810 preset, but still glxgears is really slow <5> svearike: well far is I could tell from a brief look on the page I linked, they have a seperate 3d driver.. the mesa driver, mesa is just another implementation of opengl <3> biscon, hm, this is a bit strange hierarchy to me. yeah I see mesa=gl drivers, but do you believe I need to update those in order to get gl-support in Xorg ? <5> svearike: I don't know if you need to update them, but you got to have them, if the regular driver is only 2d accelerated opengl will fallback on cpu rendering <5> svearike: but I think you need that DRM kernel module running, don't worry we are not talking about digital rights management ;) <5> I've always been an nvidia guy so im familiar with setting X up with them, but you should be able to find plenty of info, or just ask in #ubuntu <3> :) <3> OpenGL renderer string: Mesa GLX Indirect <3> glxinfo gave me that. would that imply that it's completely software based ? <5> yeah that actually sounds pretty much like it is, but I use nvidia glx so im not sure.. but I think its their "slang" for software rendering <6> yes, that's software rendering <3> will have to check that DRM-module as well then <5> svearike: indeed it is, im starting to have to google inorder to answer you questions ;) <3> biscon, haha :) thanks for your efforts :) <3> biscon, I just found out that I probably had selected the wrong driver in the kernel :) I changed it to i810 (in the DRM) section, do you know if you actually have to change anything in the xorg.conf? as I understood it, the DRI is using the kernel-drm modules <5> svearike: http://dri.sourceforge.net/doc/DRIintro.html - Introduction to the Direct Rendering Infrastructure. nice short read if you wanna know how it works on linux <5> svearike: aslong as you load the DRI modules in your xorg.conf my guess would be that it should work <5> svearike: probably just that kernel driver thing then :) <3> I compiled it into the kernel,, that was pretty stupid of me, now I have to 1) reboot 2) have no easy way to see if it gets loaded hehe <5> svearike: yeah modules are better then you can just rmmod & buttprobe the new module :) <3> hehe, yeah :) <7> :) who wants a big *** kernel anyway <5> lol <3> haha <5> at least I know Tannenbaum wouldn't ;) <3> well I'm off for a reboot , (going to greet my new big *** kernel) <7> :) <7> damn <7> im getting tired <7> need more coffein <5> hehe would like some as well but then I can't fall asleep and I gotta get up for work again tomorrow <7> i hate coffie but i gotta finish some code for school for tmr so i need that <7> need it* <3> nope, no luck :) <5> how does the kernel like your driver? had a look at dmesg? <3> what the **** ? . <3> something just happened to my keyboard :) <3> pipe doesn't work anymore.. *sigh* <5> using gentoo? <3> aaaah.. free diskspace on / == 0 bytes <3> biscon, nope, slackware <7> i feel like im gonna throw up thanx to this coffie =/ <5> okay had problems with the pipe in x on gentoo once, im ubuntu now.. to lazy for the geek distros <3> :) I have to restart x to see if anything happens btw (dmesg said NOTHING about i810 driver) <5> WS: I love the taste of coffee, just mix it with some sugar and milk, much more enjoyable <7> biscon: yeah i have some milk and sugar in it but i still hate it, i think i made it pretty strong tho, never liked coffie anyway, its just a desperate measure to stay awake :) <5> once I didn't like it either, just drink enough if it and you'll get the hang of it.. like smoking (although I won't recommend that :) <8> aaah, back to normal :) <5> tommy: you we're superman the last few hours or? <5> were <8> biscon, yeah, the superman who couldn't type pipe :) <7> biscon: i hated beer too but now i love it altho it hasn't quite got the same effect, im not thinking about starting with coffie :)
Return to
#sdl or Go to some related
logs:
dc++ error 62 INVALID What is difference aptitute apt-get installing disk-admin gnome java ata1 timeout without command gcc-config error gentoo #suse sendmail other queue dir #math gzlauncher peachy_
|
|