473,320 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to add OpenGl in C++

93 64KB
hi again, What file should I include for a OpenGl plugin for Code::Blocks?

Error: File not found in directroy

Newly made file(didn't write this):

Expand|Select|Wrap|Line Numbers
  1. #include <windows.h>
  2. #include <gl/gl.h>
  3.  
  4. LRESULT CALLBACK WindowProc(HWND, UINT, WPARAM, LPARAM);
  5. void EnableOpenGL(HWND hwnd, HDC*, HGLRC*);
  6. void DisableOpenGL(HWND, HDC, HGLRC);
  7.  
  8.  
  9. int WINAPI WinMain(HINSTANCE hInstance,
  10.                    HINSTANCE hPrevInstance,
  11.                    LPSTR lpCmdLine,
  12.                    int nCmdShow)
  13. {
  14.     WNDCLASSEX wcex;
  15.     HWND hwnd;
  16.     HDC hDC;
  17.     HGLRC hRC;
  18.     MSG msg;
  19.     BOOL bQuit = FALSE;
  20.     float theta = 0.0f;
  21.  
  22. pluss some more non-important code... 
  23.  
Aug 1 '13 #1
2 1754
weaknessforcats
9,208 Expert Mod 8TB
OpenGL has header files and library files.

You need to:
1) locate the all files on your hard disc
2) add the paths to these files to your compilers pre-defined path list
3) add the libraries to your compiler's project
4) #include the header files. Probably, if you path is pre-defined, then you #include is probably just #include <header.h> rather than a partial path between the brackets.
Aug 1 '13 #2
Xillez
93 64KB
ok, thanks, but found an installer that does it for me... so everything works, but thanks for the instruction...

X
Aug 1 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Rick Muller | last post by:
I have a problem that I would like to get some advice on from other Pythonistas. I currently manage a (soon to be) open source project for displaying molecular graphics for a variety of different...
15
by: oracle411 | last post by:
Hi I'm new to OpenGL, but have an OpenGL application written in CPP that I would like to display on a web browser. Was wondering how this could be done? Thank you very much
2
by: Michael Sgier | last post by:
Hi OpenGL in VC7. I get errors with the default include gl file. Which and where to get working OpenGL files? I also get errors with glfunctions in Kdevelop. Any help here? Thanks indeed....
3
by: john townsley | last post by:
Hi I want to do some OpenGl stuff with c++ on a winXP (home) machine. I have Borland c++ 5, MVS c++ 5 What C++ do you recommend (any others?)and where do you get the OpenGL stuff. thanks
10
by: Bad_Kid | last post by:
which is better for what?
0
by: Scott Chang | last post by:
Hi all, I tried to use Managed C++ coding of VC++.NET (2002)and OpenGL version 1.2 to draw a hexagon shape of benzene. My OpenGLdrawBenzene.cpp is the following: // This is the main project file...
4
by: tobfon | last post by:
I'm creating a scientific visualization application with rather high demands on performance. I've created a nice rendering engine for it in C++/OpenGL and a python interface to the rendering...
3
by: jg.campbell.ng | last post by:
I'm beginning learning Python and OpenGL in Python. Python fine. But difficulties with OpenGL; presumably with the installation of OpenGL. OS = Linux FC5. Python program gl_test.py: from...
9
by: Achim Domma | last post by:
Hi, I'm developing a GUI app in Python/C++ to visualize numerical results. Currently I'm using Python 2.4 with wx and PyOpenGLContext, but there are no windows binaries for Python 2.5 for quite...
3
by: Leon | last post by:
Hey, i am trying to develop a game, and I am using OpenGL and pthread. (on Ubuntu, so i also use the X library.) Now i have a problem. I have initialized OpenGL in the main thread, and i want to...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.