Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
328 views

How to achieve no gaps between triangles in software renderer like in Quake?

I've heard alot that I need to use fixed-point math, top-left rule, etc. to eliminate gaps between triangles but the thing is how did Quake not have any gaps, did it? I've seen Quake's math file and ...
MaximMogulev's user avatar
1 vote
1 answer
1k views

How can I render a font in C with OpenGL? [closed]

What I tried: I was testing some things in order to render text with stb_truetype.h and OpenGL in C. I took as a reference the example that appears here. Basically, this example, loads a .ttf file and ...
Álvaro Rodrigo's user avatar
2 votes
1 answer
2k views

SDL_RenderPresent is writing over the previous frame

Whenever I call SDL_RenderPresent, the previous frame is replaced with black before the new frame is displayed. It's almost like when I call ...
EKW's user avatar
  • 159
0 votes
1 answer
390 views

How to map intensity from dot product to float RGB from 0 to 1?

I'm getting the dot product of the surface normal and light position. The weird thing is the dot product is larger than 1. Also, I want to map that intensity from 0->1 to Float RGB from 0->1. Here is ...
Andre Ahmed's user avatar
4 votes
1 answer
2k views

Fog with Blend in OpenGL

I want to add fog in my scene which contain transparent textures made by Blend , when i enable the fog the transparent textures appear white From a distance but when i disable it the textures ...
MhdAljobory's user avatar
3 votes
1 answer
131 views

connecting multiple anti-aliased lines together

I implemented/copied the wu line algorithm from pseudo-code on wiki-pedia and other places. When drawing a sine wave it breaks down at the point where the line changes from y dominant to x dominant ...
eat_a_lemon's user avatar