What's a good and easy piece of OpenGL code I can cannibalise?

What's a good and easy piece of OpenGL code I can cannibalise?
When in doubt it's a fairly effective way of learning, but although QuakeSpasm was in the perfect format it's pretty large and complex.

Other urls found in this thread:

lazyfoo.net/tutorials/SDL/51_SDL_and_modern_opengl/index.php
wiki.freepascal.org/OpenGL_Tutorial
youtube.com/watch?v=ArJe--CGatg
twitter.com/SFWRedditVideos

>good
>easy
>openGL
choose two.

Surely someone out there must have made a template though?
A template that just has a few things:
>creation of a window and an OpenGL context
>a good way to arrange your shaders
>handles user input
There's libraries for it, sure, but then if you ever need to tweak some fine detail, or you actually want to learn low level OpenGL, you're fucked.

If you're okay with SDL2 here is something that might help you.
lazyfoo.net/tutorials/SDL/51_SDL_and_modern_opengl/index.php

Low level OpenGL is hard, but usable. You'll need to write your own framework anyway.
Just look for libraries that will add some OOP and won't make you kill yourself unlike plain OpenGL.

If OpenGL could be good and easy, someone would actually use it. Why do you think everybody uses Direct3D instead, OP?

But anyway, if you insist, here's a piece of code you can use. You'll probably understand what I mean once you see the code:

wiki.freepascal.org/OpenGL_Tutorial

Ah, but first I need to get the hang of installing libraries in C.
Pity it's not justwerks like Java, where your Java libraries are Java files.

I forgot Direct3D existed.
How does it compare?

>How does it compare?
It doesn't, OpenGL is literally in the stone age next to it. Why do you think OpenGL is dead in the water?

Because OpenGL is being redone from the ground up as Vulkan, while Direct3D will remain an eternal clusterfuck just like Windows 10.

If you don't know how to install/use a library it's probably a bad idea to jump into openGL or any graphics api for that matter.

Also no one creates an openGL context without a library. Even if you use the winapi that's still a library.

>Vulkan
What is that but an admission of defeat?

>Direct3D
>eternal clusterfuck
You've obviously never written code for either.

I wish freetard fanboys would stop be so opinionated about everything without at least having the slightest bit of knowledge about it.

>>Vulkan
>What is that but an admission of defeat?
>only freetards uses opengl

how do u report sum1 for avatarfagging?

Not even freetards use OpenGL actually, since they all have a separate Windows installation for gaming and/or 3D modeling.

Blue arrow => report post

It's more of the fact that the instructions for installing the library are outdated, actually.
I'm being asked to put files in all sorts of folders that don't exist.

You're on windows then, eh?
Ever heard of the PATH system variable?

all four of us?

I don't even remember last Direct3D game I've played, even though I play on windows, linux and PS3 all the time.
Nowadays, every game engine supports both libraries and developers don't give a fuck. Direct3D is limited to Windows and xbox which makes it even less suitable for games. Unless you only play AAA on Windows.

>every game engine supports both libraries
Not true at all.

>Direct3D is limited to Windows and xbox
That's the absolute majority of devices out there.

>implying other consoles use OpenGL
Nope. The PS3 uses PSGL. The PS4 uses GNM, GNMX and PSSL. Nintendo uses proprietary languages/APIs that you don't even hear about unless you're a gamedev and have access to the official SDKs.

Managed to get it to work, simple enough once you realise that CodeBlocks expects all the stuff in one format which it will make clear to you.

But now it's saying "___ was not declared in this scope" for anything glfw related so I guess that didn't work out as planned.

Correction: It's saying that about around half the glfw related things.
It complains about glfwOpenWindow, but not glfwTerminate.

>libraries

Ah, I see the problem, a bunch of functions in the example code were replaced, but the example code didn't change.

>Not true at all.
Well, Unity, Godot, Source, CryEngine, Unreal, all support OpenGL. Is there any commonly used engine that doesn't support it?
Also after Source moved to OpenGL from direct3d it gained significant FPS boost.

>That's the absolute majority of devices out there.
Looking people around me only one girl around me uses OSX, and 50% people uses Windows, others use linux. I have two PS3 at my place and everyone who has a console I know has PS3. I don't even know anyone with xbox.

>Nope. The PS3 uses PSGL. The PS4 uses GNM, GNMX and PSSL. Nintendo uses proprietary languages/APIs that you don't even hear about unless you're a gamedev and have access to the official SDKs.
PSGL is based on OpenGL. Also it's optional, you can just use opengl on PS3 without any problems.
And of course, Android supports OpenGL which is de facto a large game market.

>pAnjeetdroid

>he got fucked in the ass by Apple or Windows

>he doesn't use a free non-pajeet mobile OS

At least my OS have apps.
I use Cyanogen anyway.

>muh softwares

Who dis?

It's the local wolf girl, Momiji Inubashiri.

Thx :3
I got a nice webm of her playing a flute but sound isn't allowd :c

Did you link all the required libraries in the proper order? Add directories for compiler and linker into the project's settings?
Replying cuz awoooo

Post on gif and link

I know that one youtube.com/watch?v=ArJe--CGatg

ARF!