Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
Reply to this topicStart new topic
> opengl on linux, Need help running windows code on linux
post Jul 24 2011, 06:32 AM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 1
Joined: 24-July 11
Member No.: 15,469

Hi ,i recently made a 2player roadfighter clone on opengl(devc++) on windows 7, I need to run it on linux ,i currently have ubunty 9.04 jaunty,and i need to do it by next week, as of now i am getting about 600 errors ,syaing most of the gl functions are out of scope and for glaux.h, that most of the header files it wants like windows.h and mmsystem.h is not found, I simply copy pasted them out of dev,I am guessing some different headers are required for linux,I have installed libmesa and freeglut3 ,
Ihave also tried installing codeblocks or codelite, and have not manged that yet,codeblocks gives an error on running,-child process not found, and codelite is giving dependency issues,
the following is the code , il paste the errors soon,
Old Today, 05:48 AM #5
LQ Newbie

Registered: Jul 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled


#include <stdio.h> // Header File For Standard Input/Output
#include <gl\glaux.h> // Header File For The Glaux Library
int start=0,help=0;
float y=0,x=0;
float xs=0,ys=0;
HDC hDC=NULL; // Private GDI Device Context
HGLRC hRC=NULL; // Permanent Rendering Context
HWND hWnd=NULL; // Holds Our Window Handle
HINSTANCE hInstance; // Holds The Instance Of The Application
GLuint base;
bool keys[256]; // Array Used For The Keyboard Routine
bool active=TRUE; // Window Active Flag Set To TRUE By Default
bool fullscreen=TRUE; // Fullscreen Flag Set To Fullscreen Mode By Default
bool light; // Lighting ON/OFF ( NEW )
bool lp; // L Pressed? ( NEW )
bool fp; // F Pressed? ( NEW )
char fil[10];
GLfloat xrot,xrot2; // X Rotation
GLfloat yrot,yrot2; // Y Rotation
GLfloat xspeed; // X Rotation Speed
GLfloat yspeed; // Y Rotation Speed
GLfloat z=-5.0f; // Depth Into The Screen

GLfloat LightAmbient[]= { 0.5f, 0.5f, 0.5f, 1.0f };
GLfloat LightDiffuse[]= { 1.0f, 1.0f, 1.0f, 1.0f };
GLfloat LightPosition[]= { 0.0f, 0.0f, 2.0f, 1.0f };

GLuint filter; // Which Filter To Use
GLuint texture[9]; // Storage For 3 Textures


AUX_RGBImageRec *LoadBMP(char *Filename) // Loads A Bitmap Image
FILE *File=NULL; // File Handle

if (!Filename) // Make Sure A Filename Was Given
return NULL; // If Not Return NULL

File=fopen(Filename,"r"); // Check To See If The File Exists

if (File) // Does The File Exist?
fclose(File); // Close The Handle
return auxDIBImageLoad(Filename); // Load The Bitmap And Return A Pointer
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 16th July 2018 - 05:33 PM