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

Preventing blank or already entered values
Im trying to learn how to place a read file line by line and prevent duplicate entries and also BLAN

Cursor statement failed with errors
Following statement failed with the errors.

cursor proj_cursor1 is (select projectID from

php title problem
Hi,

I am having a problem managing my page title with PHP.

Currently I have my <

Show specific day of the week
I have been racking my brain trying to get this function to work properly and it is doing so for eve

word wrap in emails help needed
Hello, I understand how wordwrap works in php and have used it well before. However when I used wor

Remove values in array2 from array1
I have two arrays.

Array 1 is where the array key holds various different numbers. For exampl

Help with Password Encoding/Decoding?
Trying to design a "change password" tool. On my signup code I'm using base64_encode, now

Table colours fail when extra row added
Hey Gurus,

I got a weird problem with formating the colour of a table made in php. Everything

Restricted access to sub-folder in iis6 doesn't work?
Basically I'm trying to add restriction to sub-folder (which contains pdf) in web.config for iis6 as

Basic Question Regarding PHP Includes
Hi

Just starting out with PHP.

Working on a site that uses some basic includes, these

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