Jump to content

How does Chocolate Doom load textures into SDL?


BBQgiraffe

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
  • 2 weeks later...
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...