How to draw pixels to a texture (OpenGL)

The code below is a code snippet that shows you how to draw pixels to a texture (for example to draw the Chip8 display)

#include <stdio.h>
#include <glut.h>
#include "chip8.h"
    
// Display size
#define SCREEN_WIDTH 64
#define SCREEN_HEIGHT 32

chip8 myChip8;
int modifier = 10;

// Window size
int display_width = SCREEN_WIDTH * modifier;
int display_height = SCREEN_HEIGHT * modifier;

void display();
void reshape_window(GLsizei w, GLsizei h);

// Use new drawing method
typedef unsigned __int8 u8;
u8 screenData[SCREEN_HEIGHT][SCREEN_WIDTH][3]; 
void setupTexture();

int main(int argc, char **argv) 
{		
    if(argc </glut.h></stdio.h>