[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
OpenGL/Graphics Programming Thread
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 20
Thread images: 2
File: opengl.png (278 KB, 800x600) Image search: [Google]
opengl.png
278 KB, 800x600
Haven't seen one of these in a while.
Do you think it's because it takes 500 lines of OpenGL just to render a triangle?

>Resources
Online OpenGL tutorials are mostly shit, the stark differences between 2.1 fixed pipeline and 3.0 core profile OpenGL could fill several books, you should read one instead.
Old OpenGL books are cheap as fuck, and chances are, you're not going to be writing code for the newest graphics cards anyway, so just pick whatever edition that covers the GL version of your graphics card.
For example, the 4th edition of the blue covers 2.1, 5th edition covers 3.3, 6th edition covers 4.5, etc.

>Recommended books
OpenGL SuperBible (blue book)
OpenGL Programming Guide (red book)
OpenGL Shading Language (orange book)
>>
>Do you think it's because it takes 500 lines of OpenGL just to render a triangle?
It takes 500 lines to render a triangle in Win32 too.

SFML/Qt or bust.
>>
>>53421763

There's the Vulkan programming book soon, but I dunno if anyone is planning on learning Vulkan first for graphics programming.

http://www.amazon.com/gp/product/0134464540/

I'm planning on being that madman though.
>>
>>53421763
i'm reading through the superbible, it's pretty good, but you gotta ignore all the freeglut parts, because the author just looooves freeglut, and it doesn't teach you anything about initializing an opengl instance on your platform.
>>
>>53422387
Same. I know sdl,qt and gtk+ and would like to learn 3d programing but can't decide between opengl and vulkan
>>
>>53423135
Vulkan is a low level graphics API.
It's the sort of thing you could reimplement OpenGL with.

If you just want to create graphics, stick with OpenGL, it's not going away.
>>
>>53422387
>learning Vulkan first for graphics programming
Yeah, don't do that.

Learn your basics on OpenGL or Direct3D and then go to Vulkan.
>>
>>53421763
>it takes 500 lines of OpenGL just to render a triangle
This is why Vulkan was created
>>
>OpenGL SuperBible (blue book)
>OpenGL Programming Guide (red book)
>OpenGL Shading Language (orange book)

Are these good for someone who doesn't know shit about any kind of graphics programming?
>>
>>53424703
superbible assumes you know nothing about graphics programming, or even any math
>>
File: xpr.png (9 KB, 600x360) Image search: [Google]
xpr.png
9 KB, 600x360
>>53421763
>tfw I made that OP image
I miss the graphics programming threads. They never last though, they always die and fizzle out.

I'm working on an accelerated gui. Transparency sorting is a bitch. I ran up against this problem and worked on it for a couple of days before giving up

So now I'm just doing naive transparency sorting and batching
>>
>>53421763
Who /homemade engine/ here?

C++ multiple meshes, transformations, textures and lighting so far
>>
>>53424862
I've done about the same in C# only with physics and input
But now I'm waiting for Vulkan examples to eventually replace the OpenGL unless Vulkan turns out to have some massive flaws
>>
I made an OpenGL program once, then I learned that what I really wanted was a scene graph.
>>53424931
So how are you using OpenGL with C#? OpenTK?
>>
>>53424973
>OpenTK?
Yes
>>
>>53424657
Ignore this faggot
Learn vulkan first, don't waste time on shit you won't end up using
>>
>>53424862
I made one years ago with GLFW, it does OpenGL 3.3, tested on Nvidia and AMD Linux binary drivers. I haven't updated it since.
>>
>>53422387
Current OpenGL have so many legacy crufts. To learn how to effectively use OpenGL, you need to learn some OpenGL history as well. Then there's the issue of quality of drivers between vendors.

OpenGL originally was meant for professional applications like CAD, where you submit commands into the state machine and let it handle everything for you. You have very little control of what the GPU internally does. That's why we have OpenGL ISV drivers from CAD software vendors that's optimized specifically for their software.

But that often doesn't apply to video games. Game engines want to have as much control of the GPU as possible to squeeze out every little bit of performance. Also, OpenGL API was designed for old graphic cards. Newer GPUs are actually a standalone computer specialized for math. They tried to remedy this by introducing OpenGL profiles and extensions. It makes the entire API confusing and bloated for beginners.

Currently, OpenGL is available on many platforms as it's the only choice, but from the looks of it, Vulkan might be supported on many platforms as well. Nvidia already has it on their Linux, Windows, and Android drivers. AMD currently only has it on Windows. Qualcomm announced they'll support it for their newer chips. MESA drivers will have to wait. Apple went their own way and created Metal. Windows is planning on countering it with DX12, but that locks you to Windows (and Xbox) only.

I'd start from Vulkan if I were you, but it doesn't hurt to learn a bit of OpenGL and see how things were a long time ago.
>>
Halp. Need to implement shadow maps and irradiance maps
>>
>>53424684
Creating a triangle in Vulkan is probably like 5k lines.
Thread replies: 20
Thread images: 2

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.