#what framework should i use

106 messages · Page 1 of 1 (latest)

trail pine
#

so i have just finished with raylib to get me used to c++ graphics programming so what should i advance to now? I have also been thinking of using OpenGL

coral archBOT
#

When your question is answered use !solved or the button below to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

covert sparrow
#

opengl for sure

#

its kinda janky but its much simpler to work with than like

#

vulkan

#

vulkan is if you desire pain and want to spent 8 months on a simpler raster engine

regal flame
#

I would argue against using OpenGL. It's a really poorly designed API and doesn't really teach you how the GPU works

regal flame
#

Vulkan 1.3+ is perfectly fine. You can get a textured cube up in a weekend

covert sparrow
#

<- has spent 8 months making a raster engine

covert sparrow
#

ok thats not really fair

regal flame
#

Okay? I've spent plenty of time working on raster and ray tracing and 99% of my effort is not in Vulkan

covert sparrow
#

i guess my point is that vulkan is many times more complicated than opengl

#

BUT

#

as with everything, it depends on ur goals

polar pollen
covert sparrow
#

if you want to learn really nitty gritty gpu stuff then vulkan is ur bestie

#

if you dont then honestly stick with raylib theres nothing wrong with it

regal flame
#

Also, OpenGL and Vulkan aren't frameworks. They're APIs to low level GPU functions

trail pine
#

ok

regal flame
covert sparrow
#

its nicer but still quite difficult

#

theres no getting around that

trail pine
#

i'll watch a few vulkan tutorials to see what it's like

covert sparrow
#

no read something like howtovulkan

polar pollen
trail pine
#

k

covert sparrow
#

if all youve done is raylib vulkan will be a massive step up

trail pine
#

ive done raylib and sdl

covert sparrow
#

I went from sfml to opengl to vulkan

polar pollen
trail pine
#

i really dont like sdl though

trail pine
regal flame
#

SDLGPU or WebGPU are better stepping stones than OpenGL is these days

regal flame
covert sparrow
#

opengl is not perfect but it did help me as a atepping stone and learnopengl was a great resource

trail pine
#

i hate sdl keywords like its so different from all the other ones

covert sparrow
#

but dragons probably right theres better options

regal flame
#

LearnOpenGL is wrong about quite a bit, unfortunately

covert sparrow
#

i cant personally say

trail pine
#

i already know a bit of opengl like i made this (gimme a sec to forward it)

regal flame
#

Especially the PBR stuff

#

Plus, GL is just a really poorly designed API

trail pine
#

nvm i cant forward it here

polar pollen
# trail pine is that just regular sdl or a different thing

it is a nice abstraction that very nicely teaches you the general logic flow of all modern APIs. I used it when I struggled to understand pretty much anything about vulkan, as I couldn't see the bigger picture. SDLGPU will show you the bigger picture, albeit in a simpler form that is very useful still

covert sparrow
#

having gone down this route I cant say I highly recommend it

trail pine
#

what i made in opengl a bit ago so i know a BIT

covert sparrow
#

learning vulkan is only for those who desire pain

polar pollen
#

I can send you the SDLGPU tutorial I followed to get me started

trail pine
#

ok

polar pollen
#

here you go

#

why does the link look so fishy

#

either way, it shows you how to use uniforms, upload your own vertex buffers and get the general logic loop going

trail pine
#

thx

polar pollen
#

you will also need a shading language

#

have you thought on that?

covert sparrow
#

have you used glsl

#

certainly right

#

I was dumb and stuck with glsl when I moved away from opengl and I wish I switched to hlsl sooner
glsl is like opengl just kinda antiquated

polar pollen
covert sparrow
#

you can also look into slang but I think thats much less used and I havent played with it

regal flame
polar pollen
regal flame
#

it's more oriented to RT, but the math is the same

polar pollen
#

that picture is a render?

regal flame
#

looks like it

polar pollen
#

thank you

regal flame
#

np

trail pine
covert sparrow
#

id reccomend switching to hlsl

#

glsl is pretty outdated

regal flame
#

It basically forces you to use globals for a lot of stuff

#

(i.e. you can't pass around buffers, images, etc)

trail pine
#

WhT would you need complex shades 4 just have a class for drawing stuff and pass it there

regal flame
#

A full-blown PBR pipeline isn't trivial, especially when you start doing IBL and some fancier bindless techniques for descriptor management

#

Languages like HLSL and Slang are easier to modularize out of the box

covert sparrow
trail pine
#

i pass it into my game class which then does most the hard lifting

covert sparrow
#

i mean if ur doing a 2D game u probably dont need super complex shading

#

but then why are you trying to go deeper into GP with that

polar pollen
#

what do you mean by game class doing the hard lifting?

trail pine
#

Only things I pass in the shader is color(obv) a mat4 for view, a mat4 for projection, a model mat4, color, texcoords, obviously vertices and then transparency

covert sparrow
#

if ur interested in learning GP ur probably going to want to write complex shaders

#

if ur goal is a game id say dont fix what aint broke

#

theres also more to shaders than passing stuff in

polar pollen
#

and optionally tangets and bitangents, though you could calculate those in the fragment/pixel shader

trail pine
#

I usually do 2d that's what I do for 2d but when I do 3d I add more

polar pollen
#

you need projection for 2D?

covert sparrow
#

shaders also include, yk, shading

#

which can be very simple and very complex

#

so the answer to "why would I need complex shaders" is "when you want complex shading"

#

the choice of using hlsl is not just about complexity either its just a better tool for the job if ur not using opengl

regal flame
#

Quick example: I'm currently working on implementing the OpenPBR specification, and I would not want to do this in GLSL 😅

trail pine
covert sparrow
#

???

regal flame
#

Yeah, there's some use for orthographic projections in 2D

covert sparrow
#

I mean you need some projection no matter what

#

but idk what they are talking about with aseprite