hey there…
i’m using the latest version of agl (from apple dev site) on a g3 9.0.4…
the code i’m using was lifted from some stuff i did on windows…
it works fine on that os…
however i use agl on the mac…and i have my own event loop…i don’t use any of the opengl callback stuff…
i cannot seem to get projection going…
i just keep getting a blank screen…
it’s only when i keep my cube translations near the origin that i see anything but it appears more orthogonal than anything else…
can anyone see anything wrong with my perspective set up + drawing code???
any help would be greatly appreciated…
thanks
C_grexOpenGLTestMacApp::Reshape(int i_w, int i_h)
{
//set up viewport
glViewport(0, 0, i_w, i_h);
glEnable(GL_DEPTH_TEST);
bool
C_grexOpenGLTestMacApp::Render(void)
{
//mptr_ctx is a member of this class and has been inited fine
if(aglSetCurrentContext(mptr_ctx) == GL_FALSE)
return false;
this unfortunately has no effect on the result…
i’m passing the following params to set up a pixel format for that context…
GLint lia_attr[5] = {
AGL_RGBA, //RGBA pixel format
AGL_DOUBLEBUFFER, //double buffered pixel formats are considered
AGL_DEPTH_SIZE, //depth buffer of size 16
16,
AGL_NONE //attributes must be terminated by this value
};
this is really annoying…
and i can’t see what it is i’m doing wrong here…
thanks…
forgive me…
i’m an idiot…
i forgot to set the context before i called my reshape method at initilisation…
problems are always in the most obvious place and the most obvious place is the last place you look…
thanks darius for your help…