OGL Image Problem

Sta7ic
Unregistered
 
Post: #1
I'm trying to get loaded PNGs onto the screen using glDrawPixels. The test cube that is supposed to draw is drawing, and the PNG is claiming to be loaded, but nothing's happening.

(most of) The display loop:

display(){
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(-50, 50, -50, 50, -20, 20);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glRasterPosition2i(100, 100);
glutSolidCube(10.0);
glDrawPixels(g_image.width, g_image.height, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, &(g_image.data));
glutSwapBuffer();
}

Is something missing or being done wrong to throw off the glDrawPixels command?

-"Sta7ic" Matt
Quote this message in a reply
Sta7ic
Unregistered
 
Post: #2
...does any one of the 55 logged viewers have any experience or sample source to share?
Quote this message in a reply
Member
Posts: 177
Joined: 2002.08
Post: #3
What do you mean by "nothing's happening"? Are you sure the GL context is properly initialized- can you draw anything else in it? Try loading the PNG into a normal Carbon or Cocoa window just to be sure the pixels made it to RAM.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  mirror image problem? WhatMeWorry 3 3,176 Feb 15, 2005 08:44 AM
Last Post: WhatMeWorry