diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-05 10:12:55 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-02-05 10:12:55 -0500 |
commit | dd3887ec47137b6bf993674356a73b3266bb8a51 (patch) | |
tree | c9981783a6574b58dd9f503384b2fe651495b224 /main.c | |
parent | 1e7e392b9d5e593aeb9680d82b76afddad8ce2e6 (diff) |
got text working with modern OpenGL
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -305,13 +305,10 @@ int main(int argc, char **argv) { glViewport(0, 0, w, h); glClearColor(0,0,0,1); glClear(GL_COLOR_BUFFER_BIT); + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - for (int i = 0; i < 200; ++i) { - gl_geometry_rect(rect(V2(0, 4*(float)i), V2(100, 100)), 0xffffffff >> i); - - gl_geometry_draw(); - } - text_render(font, "hello", 5, 5); + text_render(font, "Hello how are you?", 5, 5, 0xff00aaff); SDL_GL_SwapWindow(window); } |