Is it possible to draw anything in OpenGL 3+ without writing GLSL shaders? Will it run on older computers?
Asked Answered
F

1

6

I'm new to OpenGL3 and now I'm considering moving to OpenGL3 and port my old code. I started reading the few tutorials I found on the web just yesterday. I already have experience with the old OpenGL. What struck me that that almost everything I know about it is deprecated/removed/burninated from the core.

So I need some pointers to understand the new architecture.

I need to pass vertex buffers to the graphics hardware, it will be faster, it's okay. But from this point tutorials move on writing and compiling GLSL shaders. Does this mean that from now I'll need shaders to accomplish even the (previously) simplest tasks and care of all the gory details? Eg. drawing a gouraud shaded triangle but making sure that it's rendered perspectively correct (fragment shader). Or doing the perspective transformations themselves (vertex "shading").

I've never written shaders or used any advanced rendering before. So it's high time to learn GLSL anyway...

Will the code work on older computers? My first computer is 9 years old (bought in 2004) and still working, many 3D games of that age worked on it without problem... Does OpenGL3 require modern hardware?

Faltboat answered 4/12, 2013 at 13:23 Comment(3)
well, glsl was first released with ogl 2 so a lot of computers support those versions. however you wont have the latest features of the language. I suggest you focus on learning the latest version that your pc supports and worry about portability later.Mirella
OpenGL 2.0 was released in 2004 which supported an ARB extension of Shaders if I remember correctly. Though my guess is that at least most computers support OpenGL 3.2 today (2009, 4 years ago) Also like @AntonD said learn and focus on the new stuff. Why? because it's much easier to learn the old stuff when already knowing the new stuff. Doing it the other way around can be a lot harder in the end.Bearing
Yes, you most certainly can. There are compatibility profiles for this purpose. However, a great deal of the new functionality in GL3 and beyond only applies to and/or can only be used in shaders. GL3 generally requires DX10 class hardware even though some DX10 stuff was not promoted into core GL until GL4, and some features in GL3 do not require DX10 hardware. Your 2004 hardware is unlikely to fit the bill, be it due to lack of vendor interest in supporting new versions of OpenGL on older hardware or a genuine lack of hardware feature support.Homogeneous
S
11

Is it possible to draw anything in OpenGL 3+ without writing GLSL shaders?

No. You must use shaders to render using the programmable pipeline.

But from this point tutorials move on writing and compiling GLSL shaders. Does this mean that from now I'll need shaders to accomplish even the (previously) simplest tasks and care of all the gory details?

Yes. But that's a good thing, because it makes things sooo much simpler. Where you had to make a plethora of OpenGL state setting calls before, now all you have to do is write it down in a concise manner and can load it with a single glUseProgram call.

Also no serious OpenGL program ever (even with old fixed function pipeline) made use of OpenGL's built-in matrix manipulation functions. The matrices are required for other things as well, so just compute them yourself and load them.

Will the code work on older computers? My first computer is 9 years old (bought in 2004) and still working, many 3D games of that age worked on it without problem... Does OpenGL3 require modern hardware?

OpenGL-3 capable hardware hit the market in late 2006. Everything sold after 2003 support OpenGL-2 just fine. GLSL based shaders got introduced with OpenGL-2 and much of what's done in OpenGL-3 can be applied to OpenGL-2 just fine.

Silici answered 4/12, 2013 at 14:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.