Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
BBQgiraffe

How does Chocolate Doom load textures into SDL?

Recommended Posts

Sorry if this sounds like a stupid question, I'm semi-decent with C/C++ and am poking around the Chocolate Doom source code to learn more about game engines, and I just can't figure out how it loads images into SDL from the WAD,I know how to use some SDL stuff but I'm used to having SDL_Image do all the work for me, does anyone know how it loads files from WAD?

 

 

Share this post


Link to post

It'd be a good idea to look through this book: http://fabiensanglard.net/gebbdoom/

 

Chocolate Doom doesn't change the engine enough to make any details differ; it mostly just implements SDL hooks in i_video. SDL gets full 320x200 frame renders 35 times a second, and then it's SDL's job to put that on an OpenGL surface and scale it.

Share this post


Link to post
On 9/13/2019 at 2:34 PM, chungy said:

It'd be a good idea to look through this book: http://fabiensanglard.net/gebbdoom/

 

Chocolate Doom doesn't change the engine enough to make any details differ; it mostly just implements SDL hooks in i_video. SDL gets full 320x200 frame renders 35 times a second, and then it's SDL's job to put that on an OpenGL surface and scale it.

oh so SDL itself doesn't do the BSP math or sprite blitting, it just renders the frame Doom generates?

Share this post


Link to post

And it's the same deal for all other ports. Even those that do change the renderer completely (Eternity's Cardboard, the OpenGL renderers in GLBoom+, GZDoom or Doomsday, etc.) do not use SDL (when they're using SDL in the first place) for generating the image, only for displaying it on a surface.

 

The Doom engine is quite particular about how things look, so it's the only way you can render Doom levels without them looking wrong.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×