   Scaling Window and Performance
  How would it be possible to render graphics in a window of any dimension without a performance hit?Is there a way to draw textures differently on to the window or than as posted below? Perhaps a low resolution image where every pixel is a quad? <-- JUST THINKING OUT LOUD***How could I do it? I know there's a way. I know because I'm watching a DirectX application do it right now.So how is that achieved in OpenGL?As stated above, I'm drawing one quad that fills the windows dimensions... But when I scale the window things get choppy and slow. (But not if I do it in this other application. So there must be a way. :)glBegin(GL_QUADS);glTexCoord2f(0.0, 0.0); glVertex3f(-da, -da,  0.0);glTexCoord2f(0.0, 1.0); glVertex3f(-da,  da,  0.0);glTexCoord2f(1.0, 1.0); glVertex3f( da,  da,  0.0);glTexCoord2f(1.0, 0.0); glVertex3f( da, -da,  0.0);glEnd();
Quote:As stated above, I'm drawing one quad that fills the windows dimensions... But when I scale the window things get choppy and slow. (But not if I do it in this other application. So there must be a way. :)Choppy because it is rendering 1 quad? That's a joke right?If you make the window bigger, than the GPU needs to write to more pixels so it will obviously consume more time. The solution is for to have faster hardware.You need to understand the graphics pipeline and understand what is the slowest part : from vertex transform, primitive assembly, rasterization, depth test, stencil test, shaders, blending, output to framebuffer.   ;  Let me rephrase.Assume I'm doing work on a texture that's 10x10, when the window scales to 20x20 is there a way to still only do the work for 10x10 screen, and the gpu just scale that to match the viewport?   ;  It's very simple.If you are rendering 1 single quad and it gets choppy and slow, then there is something wrong with your system. What is your GPU, OS? Try to update your drivers. What FPS are you getting anyway?What does glGetString(GL_VENDOR), glGetString(GL_VERSION) return?   ;Quote:Original post by aevanthonyHow would it be possible to render graphics in a window of any dimension without a performance hit?The short answer to this question is that it's not possible.  Increasing window size will always have an effect on frame rate.  Whether it's a small or large change depends on what you're doing.And yes, if rendering a single quad makes things really choppy slow, you either have a serious problem with your machine (whether hardware or driver), or you're doing something very wrong.   ;  Do me a favor, go download Winamp, run Milkdrop, start the visualizer, scale the window around. How did they do it? Who knows? Anyone?If that application can do it on this hardware then I should be able to. No matter what the actual hardware is. The point is, they can achieve the effect *on this computer right now* and I don't know how to do it in OpenGL. If they can do it, then it's possible. Obviously.GeForce 5500.  I don't care how crappy you think this card is, the cold hard facts remain, WinAmp's visualization plug-in's do it. I should be able to as well.The thing I need to know are, what do I tell OpenGL to force this method of behavior while the window is scaled?I actually have some ideas, I'll go try them out.Everyone says OpenGl can do what DirectX can. Well I'm putting that to the test. If you guys can't think of a way then OpenGL might not actually be up to par.>:)I'm determined though so I won't stop, especially since i know it's physically possible since another API can do it.   ;Quote:Original post by aevanthonyGeForce 5500.  I don't care how crappy you think this card is, the cold hard facts remain, WinAmp's visualization plug-in's do it. I should be able to as well.The thing I need to know are, what do I tell OpenGL to force this method of behavior while the window is scaled?I actually have some ideas, I'll go try them out. Those visualizations draw onto a fixed sized bitmap and then scale it to the size of the viewport when they draw it later. It's nothing special, they just scale the output the same way it's always done, and yes, you pay in performance for it, but the hit is so small, it's negligible.There is nothing to tell OpenGL. Just draw a full screen quad. That's what is done.   ;  Finally, someone just gives me a damn answer! yes!So... how do they do it exactly? Because even a bitmap has to be turned in to a texture before going to the GPU, right? So how is OpenGL set to deal with scaling textures? It's not working for me.I'm rendering to a quad, so if that's what they're doing in DirectX then what's different about it in OpenGL?If I scale a 256x256 window to some higher dimension, the texture's *dimensions seem to *scale with. At least that's the best way I can articulate it.How do I fix the textures resolution to not match the windows. I need it to stretch instead.How do I tell OpenGL to do that? Something with the ViewPort?   ;Quote:Original post by aevanthonyFinally, someone just gives me a damn answer! yes!So... how do they do it exactly? Because even a bitmap has to be turned in to a texture before going to the GPU, right? So how is OpenGL set to deal with scaling textures? It's not working for me.I'm rendering to a quad, so if that's what they're doing in DirectX then what's different about it in OpenGL?There is nothing different.Make a bitmap, modify it. Use the call to make it into a texture, and then render your quad. You're looking too far into things. It's probably easier just to use a fragment program to do it instead. Your texture resolution won't match the window, it will stay whatever you set it as, and GL will draw your quad to the window dimensions.   ;  I am using a fragment shader. I'm using Shaders to manipulate textures. I am rendering to a quad... I'm using FBO's even.But it's not doing what this DirectX application is when I scale the window...I just want to know why.When I scale the window up to 600x600 it's slowing down as if it's trying to render a 600x600 texture. But the texture I've programmed to use is 256x256, and when the window is 256x256 it's fine.There's got to be a way to render a "stretched to fit" image of that 256x256 texture. And GLSL only perform calculations on that 256x256 texture regardless of window size.Hmmm...   