How to add an image/C++ OpenGL?


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

I have been trying to look online for this and, so far, I haven't found anything useful. I would like to add a .bmp image to an OpenGL window. The lines here (GL_LINES), are irrelevant, something else to put with the image.

I’m fairly new to C++. I would appreciate it if anybody could help with anything.
1
2
3
4
5
6
7
8
9
10
11
12
void myDisplay(void) { glClear(GL_COLOR_BUFFER_BIT); // clear the screen glBegin(GL_LINE_LOOP); glVertex2i(318,0); glVertex2i(318,250); glVertex2i(322,250); glVertex2i(322,0); glEnd(); //I want to add "Tiger (left)_.bmp" here glFlush(); // send all output to display }
Thanks.

No comments posted yet

Your Answer:

Login to answer
319 Like 48 Dislike
Previous forums Next forums
Other forums

Feed Maker
Hi all.
First of all I must say I am not a php developer so I am afraid I don't know much about i

RTF fomatting to email content
Im trying to sen an email with content is picked up from a rtf-file (file_get_contents('*.rtf'). Mai

simple script won't work. Please help
I'm new to php, and I am having trouble displaying a simple script in my web browser. My php code ex

Multipe Dynamic Controls & AutoPostback Issue
I currently have a need to create many dynamic controls (Example Textboxes) that need to do a PostBa

Coding question?
Hey guys, I have a quick question. If I want to make a way for people to pay for health in my game,

Click counter to ignore traffic from search bots
I have a click counter on my site that...well, counts the number of clicks a link gets on the frontp

browse folder only
hi,
is there a way i can browse or get the directory or folder only and not the file?
i just w

Inserting a variable in a link
I have this code that I want to insert for my own variable but I have no idea how. This is what I wa

PEAR in appliactiond development
When I was picking up PHP I went from procedural programming, fairly quickly into OOP, then after wr

Creating a unique 'control panel' for each user
Hi there,

I'm thinking of designing a site that will allow users to sign up and have their ow

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash