I cannot find and interpret anything into my own knowledge of the usage of glBitmap(). My aim for the usage of this function is to be able to render letters and text to the SDL screen using OpenGL.
My current error-filled code is:
#include <SDL/SDL.h>
#include <SDL/SDL_opengl.h>
#include "functionfile.h"
int main(int argc, char **argv)
{
glClear(GL_COLOR_BUFFER_BIT);
GLubyte A[14] = {
0x00,0x00,
0x60,0xc0,
0x3f,0x80,
0x00,0x00,
0x0a,0x00,
0x0a,0x00,
0x04,0x00,
};
init_ortho(640,480);
glBitmap(100,100,0,0,50,50,A);
glLoadIdentity();
SDL_GL_SwapBuffers();
SDL_Delay(5000);
SDL_Quit();
return 0;
}
which results in a white 100×100 pixels of unrecognizable fuzz in the window.
Please read the documentation of glBitmap and try to understand it. You’ve got some serious misconceptions.
The first two parameters of glBitmap tell it, how large the image is you feed to it. It’s not the destination size. The other parameters influence how the raster position is adjusted. glBitmap does not scale the contents that go the screen. If your bitmap is 8×8 pixels, it will come out as 8×8 pixels.
The Red Book has a rather nice section about glBitmap: http://fly.cc.fer.hr/~unreal/theredbook/chapter08.html