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.

Did you know?Explore Trending and Topic pages for more stories like this.
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

Echoing If Function?
A script I am using has If statements in the comments form to basically tell the form what to do. Cu

Suggestions for Functional module
Hello experts,
I Have done B.Sc(Mathematics) and MCA & have learnt SAP/ABAP but do n

need Array help
This is what I have to do.
$teamname[1] = "Red Sox"
$teamname[2] = "Gian

Performance impact of cookies
Hi, I was just wondering what impact there would be in terms of performance if you where to set then

Change snippet to use CURDATE
I am using time() in the snippet below, I would like to use CURDATE() and have the database setup fo

styling a RadioButtonList
HiI need to have a radio button and close to it, its lable, then a space then another set of those.

comparing tables across databases sql refinement ideas required
Hi all

Via pl/sql I need to ensure that data between tables in different databases match

JSON SORT WITH PHP
I have two products that I want to sort by say "Id:17, value: xxx" using php
The page w

Typedef struct vs just struct
Anyone know the rationale for using typedef for structs when a struct is itself a typedef? I have s

how to hide input fields on selection screen using variant attribute
Hello all,

I want to know how to hide input fields on selection screen using variant attr

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