Archived

This topic is now archived and is closed to further replies.

Rian

OpenGL OpenGL w/ Dev-C++

Recommended Posts

I just began using OpenGL and am having problems with Dev-C++. Am I doomed to spend money on MSVC or can I get it free/cheap somewhere? Is getting the more "powerful" compiler worth it? Is there any reason why Dev-C++ isn''t working with OpenGL, or is it my own programming errors? Has a descent 3D game ever been made with Dev-C++ or is it not powerful enough?

Share this post


Link to post
Share on other sites
quote:
Original post by Rian
Is there any reason why Dev-C++ isn''t working with OpenGL, or is it my own programming errors?

It''s your fault. OpenGL works fine with Dev-C++ and the compiler it uses. What exactly is the issue?
quote:
Original post by Rian
Has a descent 3D game ever been made with Dev-C++ or is it not powerful enough?

The compiler behind Dev-C++ (an old version of GCC), is used to make almost anything you see in Unix environments. Look online for any 3D game for Unix; I can almost guarantee that that program will have been designed to compile in GCC. It is true that most software for Windows is made with MSVC, but you can get along fine in Dev-C++.

Share this post


Link to post
Share on other sites
I''ve worked pretty extensively with Dev-C++ and OpenGL together. If you''d reply with information about what exactly is going wrong, we might be able to help you.

Later,
ZE.

P.S. Releases 4.00 and 4.01 had some pretty severe bugs, but they were not a result of OpenGL. I expect they''ll be fixed in version 5.0, which is due out in beta any day now...If not, I just go back to MSVC Intro Ed. :-\

//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links

[if you have a link proposal, email me.]

Share this post


Link to post
Share on other sites
A great free c++ compiler I found was the Bloodshed one...

Its free, has a great IDE AND even an OpenGL template!!!

For something thats free, its esceptional quality

I forget the website though...

Share this post


Link to post
Share on other sites
Thanks guys. I didn''t expect to get a reply so soon. I love this website!

I guess I should recheck my include files and libraries. I thought I had that all set up,
but maybe something got misplaced...

Most of my problems have to do with the linker. ie, some functions don''t seem to be where
they should be. I''ll recheck everything tonight.

Share this post


Link to post
Share on other sites
quote:
Original post by Rian
Has a descent 3D game ever been made with Dev-C++ or is it not powerful enough?



As a matter of fact, Dec-C++ is only an IDE (it uses an external command line compiler). An IDE makes your life and developpment easier but isn't the "real" tool. You could make Quake3 with only notepad and a command line compiler but it would be a real pain.

EDIT : And as a side note, you would certainly have the same problem with MSVC.


[edited by - Prosper/LOADED on March 20, 2002 8:30:23 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by Rian
Thanks guys. I didn''t expect to get a reply so soon. I love this website!

I guess I should recheck my include files and libraries. I thought I had that all set up,
but maybe something got misplaced...

Most of my problems have to do with the linker. ie, some functions don''t seem to be where
they should be. I''ll recheck everything tonight.




Dude, by all means, just tell us exactly what the problem is. I used Dev-C++ for over a year, and I know most of its quirks. If you still haven''t figured it out, drop a line.

Later,
ZE.

Share this post


Link to post
Share on other sites
Man, do I feel stupid. I found the problem, and, as I had thought, I didn''t have my libraries set-up right.

I kept getting errors from the linker saying gluPerspective,
CDS_FULLSCREEN, etc couldn''t be found, but after reading the help file, I realized that you had to fill out "Further object files" under project options with more than just -lopengl32.

For anyone else who made the same stupid mistake, the correct, full line should be: "-lopengl32 -lglaux -lglu32" if you include everything. I think that should do it, unless there''s more...

In my defense, I''m new to c++ after years of Pascal and am still learning all the headers and include stuff. Turbo Pascal doesn''t use a linker, as far as I know.

Anyway, thanks for the help. I''m sorry I couldn''t be more specific, but didn''t have access to my code from where I posted the question. I''ll be more specific next time.

Share this post


Link to post
Share on other sites
You fixed the CDS_FULLSCREEN bug by linking a library? Most of the time you have to explicitly define it...

#define CDS_FULLSCREEN 4

I might be wrong, but I''ve never seen another fix for it under Dev-C++ except maybe an updated windows.h

Later,
ZE.

BTW, Dev-C++ 5 is now in beta! Pick up a copy at www.bloodshed.net, but beware that the servers are slow as mess...

//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links

[if you have a link proposal, email me.]

Share this post


Link to post
Share on other sites

  • Forum Statistics

    • Total Topics
      627783
    • Total Posts
      2979035
  • Similar Content

    • By JFT
      Hi,

      I am trying to optimize shadow mapping for an rts-view (nearly top down) with directional light.

      My approach so far is to intersect the camera view frustum with the plane of the terrain on which all the units are moving and
      fit a box around the four intersection points:

      Then I use the center of the box and the light direction to construct a view matrix.
      To construct the orthographic projection matrix I use the corners of my box. 

      With that I somehow do not get the wanted results (no shadows) /shadow map is not correctly created for the view of the camera.
      I think I am maybe missing some translation/rotation?

      Is there a better way for rts-views with a single shadow map ?

      Thanks for your help beforehand!
    • By lonewolff
      Hi guys,
      With OpenGL not having a dedicated SDK, how were libraries like GLUT and the likes ever written?
      Could someone these days write an OpenGL library from scratch? How would you even go about this?
      Obviously this question stems from the fact that there is no OpenGL SDK.
      DirectX is a bit different as MS has the advantage of having the relationship with the vendors and having full access to OS source code and the entire works.
      If I were to attempt to write the most absolute basic lib to access OpenGL on the GPU, how would I go about this?
    • By DelicateTreeFrog
      Hello! As an exercise for delving into modern OpenGL, I'm creating a simple .obj renderer. I want to support things like varying degrees of specularity, geometry opacity, things like that, on a per-material basis. Different materials can also have different textures. Basic .obj necessities. I've done this in old school OpenGL, but modern OpenGL has its own thing going on, and I'd like to conform as closely to the standards as possible so as to keep the program running correctly, and I'm hoping to avoid picking up bad habits this early on.
      Reading around on the OpenGL Wiki, one tip in particular really stands out to me on this page:
      For something like a renderer for .obj files, this sort of thing seems almost ideal, but according to the wiki, it's a bad idea. Interesting to note!
      So, here's what the plan is so far as far as loading goes:
      Set up a type for materials so that materials can be created and destroyed. They will contain things like diffuse color, diffuse texture, geometry opacity, and so on, for each material in the .mtl file. Since .obj files are conveniently split up by material, I can load different groups of vertices/normals/UVs and triangles into different blocks of data for different models. When it comes to the rendering, I get a bit lost. I can either:
      Between drawing triangle groups, call glUseProgram to use a different shader for that particular geometry (so a unique shader just for the material that is shared by this triangle group). or
      Between drawing triangle groups, call glUniform a few times to adjust different parameters within the "master shader", such as specularity, diffuse color, and geometry opacity. In both cases, I still have to call glBindTexture between drawing triangle groups in order to bind the diffuse texture used by the material, so there doesn't seem to be a way around having the CPU do *something* during the rendering process instead of letting the GPU do everything all at once.
      The second option here seems less cluttered, however. There are less shaders to keep up with while one "master shader" handles it all. I don't have to duplicate any code or compile multiple shaders. Arguably, I could always have the shader program for each material be embedded in the material itself, and be auto-generated upon loading the material from the .mtl file. But this still leads to constantly calling glUseProgram, much more than is probably necessary in order to properly render the .obj. There seem to be a number of differing opinions on if it's okay to use hundreds of shaders or if it's best to just use tens of shaders.
      So, ultimately, what is the "right" way to do this? Does using a "master shader" (or a few variants of one) bog down the system compared to using hundreds of shader programs each dedicated to their own corresponding materials? Keeping in mind that the "master shaders" would have to track these additional uniforms and potentially have numerous branches of ifs, it may be possible that the ifs will lead to additional and unnecessary processing. But would that more expensive than constantly calling glUseProgram to switch shaders, or storing the shaders to begin with?
      With all these angles to consider, it's difficult to come to a conclusion. Both possible methods work, and both seem rather convenient for their own reasons, but which is the most performant? Please help this beginner/dummy understand. Thank you!
    • By JJCDeveloper
      I want to make professional java 3d game with server program and database,packet handling for multiplayer and client-server communicating,maps rendering,models,and stuffs Which aspect of java can I learn and where can I learn java Lwjgl OpenGL rendering Like minecraft and world of tanks
    • By AyeRonTarpas
      A friend of mine and I are making a 2D game engine as a learning experience and to hopefully build upon the experience in the long run.

      -What I'm using:
          C++;. Since im learning this language while in college and its one of the popular language to make games with why not.     Visual Studios; Im using a windows so yea.     SDL or GLFW; was thinking about SDL since i do some research on it where it is catching my interest but i hear SDL is a huge package compared to GLFW, so i may do GLFW to start with as learning since i may get overwhelmed with SDL.  
      -Questions
      Knowing what we want in the engine what should our main focus be in terms of learning. File managements, with headers, functions ect. How can i properly manage files with out confusing myself and my friend when sharing code. Alternative to Visual studios: My friend has a mac and cant properly use Vis studios, is there another alternative to it?  
  • Popular Now