Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I also had a problem with pixelformat, when you use RGBA instead of ABGR so your render of that red sphere doesn't appear
-
Haha, not this time. Raytracing engine. I've caught the photorealistic rendering bug, it's what occupies me for most of the time these days. I made a few PBR shaders in GLSL but nothing beats implementing a Trowbridge-Reitz BRDF in your own raytracer.
I render to a memory buffer and then shove it onto the monitor via some graphics API. I was using SDL earlier, but changing to OpenGL now because it's easy to host it inside a Qt application.
I did make a game engine before, though (OpenGL). Couldn't turn it into a game due to time constraints :/
Related Rants
Protip: always account for endianness when using a library that does hardware access, like SDL or OpenGL :/
I spent an hour trying to figure out why the fucking renderer was rendering everything in shades of pink instead of white -_-
(It actually looked kinda pretty, though...)
I'd used the pixel format corresponding to the wrong endianness, so the GPU was getting data in the wrong order.
(For those interested: use SDL_PIXELFORMAT_RGBA32 as the pixel type, not the more "obvious" SDL_PIXELFORMAT_RGBA8888 when making a custom streaming SDL_Texture)
rant
pink
endianness
sdl