View Full Version : glGenTextures ... what's going on?

06-03-2004, 01:53 AM

I'm having a problem using glGenTextures. According to the documentation, if I declare this:

#define NTEXTURES 4
GLuint texture[NTEXTURES];

and later on I do this:

glGenTextures(NTEXTURES, texture);

I should be getting in the texture array 8 different integers, right?

Well, that doesn't work for me, and I dunno why :-( all the sentences are outide any glBegin/glEnd block.

Any idea?

06-03-2004, 02:00 AM
Sorry, I meant 4 different integers (silly me)


06-03-2004, 02:59 AM
Make sure you have an OpenGL rendering context current, otherwise all OpenGL calls are ignored and do nothing.

06-03-2004, 04:10 AM
OK! That has solved the issue... I had forgotten to create the OpenGL window before setting up the texture :eek: ) (well, I created it AFTER)

Thanks very much!