Author Topic: [C++][Crinkler][glut]  (Read 24687 times)

0 Members and 1 Guest are viewing this topic.

Offline Canopy

  • Atari ST
  • ***
  • Posts: 208
  • Karma: 20
    • View Profile
Re: [C++][Crinkler][glut]
« Reply #20 on: April 16, 2013 »
Quote
what kind of resources do you want to include/embed?

i'll assume you mean a binary file like a picture, but works for model data etc
mmm no exactly (i don't like using pictures, i prefer code-generated drawings). i was thinking about sounds, libraries and stuff.

ok, as raizor said the gfx/sound can go in the resources, libraries can too (DLLs that is not .libs)

For DLLs to work you'd have to either extract them to system32 (which you won't have write access from an app on a lot of windows machines) OR the directory your .exe is running from and dynamically import.

you won't be able to use a DLL for which you're using a .lib as you'll get into a cyclic dependency which would stop your exe from loading so you'd have to use dynamic imports if you embed a DLL.
« Last Edit: April 16, 2013 by Canopy »

Offline lucastar

  • C= 64
  • **
  • Posts: 50
  • Karma: 5
    • View Profile
Re: [C++][Crinkler][glut]
« Reply #21 on: April 16, 2013 »
I'm still happy to have a look at the project, but I only have VS 2012 here. So it will render the project unusable for you if I make changes to it :\

It's ok, i have VS2012 too. I made it in 2005 because i thought it could be a bug. Thank you very much!!

Quote
ok, as raizor said the gfx/sound can go in the resources, libraries can too (DLLs that is not .libs)

For DLLs to work you'd have to either extract them to system32 (which you won't have write access from an app on a lot of windows machines) OR the directory your .exe is running from and dynamically import.

you won't be able to use a DLL for which you're using a .lib as you'll get into a cyclic dependency which would stop your exe from loading so you'd have to use dynamic imports if you embed a DLL.
Ok, now i understand it. So the easiest thing is not using glut... or include the dll and extract it to use it in execution time.



Thanks!
« Last Edit: April 16, 2013 by CosmicColours »

Offline lucastar

  • C= 64
  • **
  • Posts: 50
  • Karma: 5
    • View Profile
Re: [C++][Crinkler][glut]
« Reply #22 on: April 16, 2013 »
I'm still happy to have a look at the project, but I only have VS 2012 here. So it will render the project unusable for you if I make changes to it :\

 :o :o bitfonts scrollers!!! I wanted to learn that too! thanks!

Edit:
I watched the demo. Just... amazing. This things make me realize the little i know. It's now on my top 5 favourite demos (and i usually like much more retro demos). I deduce you work for some game company or something... ::)
« Last Edit: April 16, 2013 by CosmicColours »

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1154
  • Karma: 175
    • View Profile
Re: [C++][Crinkler][glut]
« Reply #23 on: April 16, 2013 »
I'm still happy to have a look at the project, but I only have VS 2012 here. So it will render the project unusable for you if I make changes to it :\

 :o :o bitfonts scrollers!!! I wanted to learn that too! thanks!

Edit:
I watched the demo. Just... amazing. This things make me realize the little i know. It's now on my top 5 favourite demos (and i usually like much more retro demos). I deduce you work for some game company or something... ::)

Haha, are you talking about my phenomena intro? If so, I'm flattered, thank you :)

No, I don't work for a game company, this is all just hobby stuff for me. I do (mostly) boring security/defence stuff for work these days, so demo coding is just for fun.  To be honest, I learnt pretty much everything I used for that intro here, at the DBF forum. Just lots of hours trying stuff out, reading tutorials and studying other peoples code and blogs is all you need really. I'd only been using OpenGL for less than a year when I made that, so don't get disheartened. A little bit of work and studying and you can make some really nice stuff.

Quote
This things make me realize the little i know.


I think that's the same for most of us mere mortals ;) I try and look at it along of the lines of "seeing something really cool makes me want to find out how its done". I've never been that great at math either, so don't stuff like that put you off either. Perhaps enter the next DBF demo competition? It's really good practice and a great way to get feedback on your work. You'll also find a lot of people here willing to give you pointers and tips too.
raizor

Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1294
  • Karma: 466
    • View Profile
    • my stuff
Re: [C++][Crinkler][glut]
« Reply #24 on: April 16, 2013 »
So the easiest thing is not using glut...
There's nothing wrong with glut as long as you're not heading for really small filesizes.
If you just want to get rid of the dll you can use a static version of the lib.
This way all the functions are linked into your exe and are not loaded from from the dll.
I haven't used glut for a decade but I'm pretty sure there's a static version available for download.

or include the dll and extract it to use it in execution time.
Nah, that's crap! :P
Challenge Trophies Won:

Offline lucastar

  • C= 64
  • **
  • Posts: 50
  • Karma: 5
    • View Profile
Re: [C++][Crinkler][glut]
« Reply #25 on: April 16, 2013 »
Quote
I haven't used glut for a decade but I'm pretty sure there's a static version available for download.

I will search it and try to download it. But is opengl a static library?
Perhaps it will be better use "pure" opengl...
Thanks!

Offline Canopy

  • Atari ST
  • ***
  • Posts: 208
  • Karma: 20
    • View Profile
Re: [C++][Crinkler][glut]
« Reply #26 on: April 16, 2013 »
Perhaps enter the next DBF demo competition? It's really good practice and a great way to get feedback on your work. You'll also find a lot of people here willing to give you pointers and tips too.

I second that, I'd been dabbling here n there, my entry for the last one really helped jump start me and forced me to learn some stuff and I'm now spending a spare evening or wet weekend afternoon coding pretty much every week now.

I also keep finding on these forums that I'm following the footsteps of some GL stuff  Raizor did in 2011 ;)

« Last Edit: April 16, 2013 by Canopy »

Offline lucastar

  • C= 64
  • **
  • Posts: 50
  • Karma: 5
    • View Profile
Re: [C++][Crinkler][glut]
« Reply #27 on: April 16, 2013 »
I will try, but i am pretty far from the demos posted here. I know vey little about 3D programing and let's not talk about shading...
At the moment i'm working on this 2d retro... and is causing me a lot of trouble as you can see xD.

Thank you very much guys for all your help!

Offline Canopy

  • Atari ST
  • ***
  • Posts: 208
  • Karma: 20
    • View Profile
Re: [C++][Crinkler][glut]
« Reply #28 on: April 16, 2013 »
Hah you haven't seen what I entered then, the last challenge was 2D :)

and it was the first ever OpenGL ES program I'd ever written... as GL ES is 'modern gl' I had to learn about shaders to get it done...

Its amazing how much I learned even from that.. and how much i've moved on since then (including now using proper GL v3+)

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1154
  • Karma: 175
    • View Profile
Re: [C++][Crinkler][glut]
« Reply #29 on: April 16, 2013 »
You can probably remove GLUT from your code without too many hassles. Have a look at IQ/RGBA's 64k intro framework , which uses SetWindowText to display the current FPS in the window titlebar and contains code for setting up an OpenGL window without GLUT. Having said that, if you're not concerned about filesize, then the static GLUT lib is probably a good bet. I've never used the static GLUT myself though. One thing to bear in mind when looking at IQ's framework is that it doesn't link to the default libraries which may cause you some headaches (as you're using Vectors). Again, if you're not worried about size, then that's probably not a problem...
raizor

Challenge Trophies Won:

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1154
  • Karma: 175
    • View Profile
Re: [C++][Crinkler][glut]
« Reply #30 on: April 16, 2013 »
I will try, but i am pretty far from the demos posted here. I know vey little about 3D programing and let's not talk about shading...
At the moment i'm working on this 2d retro... and is causing me a lot of trouble as you can see xD.

Thank you very much guys for all your help!

3D and shaders really aren't that scary once you get your head around the basics. OpenGL and Direct3D take a lot of the pain away now, so you can get stuff moving around in 3D without understanding too much about what's going on behind the scenes. It's worth learning a little bit about how matrices and what OpenGL does behind the scenes, but in depth knowledge is not essential, at least not to begin with. It'll probably take you a few days of fiddling around, but seeing your first homemade light-sourced cube spinning around in OpenGL will be quite a thrill. You can then build on that and make it move around in time to the music, throw some textures on it or whatever you fancy. Just start small and build on it as you go. Once you're a bit more comfortable, you can start playing with shaders too and really go wild. Of course, there are a ton of exciting things to do in 2D too :D
raizor

Challenge Trophies Won:

Offline lucastar

  • C= 64
  • **
  • Posts: 50
  • Karma: 5
    • View Profile
Re: [C++][Crinkler][glut]
« Reply #31 on: April 16, 2013 »
Hah you haven't seen what I entered then, the last challenge was 2D :)
where can i see it?
Quote
and it was the first ever OpenGL ES program I'd ever written... as GL ES is 'modern gl' I had to learn about shaders to get it done...
GL ES... i will take a look at that

You can probably remove GLUT from your code without too many hassles. Have a look at IQ/RGBA's 64k intro framework
I will take a look at that too... and include std libraries! xD

Quote
It's worth learning a little bit about how matrices and what OpenGL does behind the scenes
Yes, in fact i like very much that, very low level programming and math stuff. It just is so extense... my head can't learn so fast xD. Right now i can just understand how to draw and move 3D objects.

PD: i have now changed my user name because i found some page over there with "CosmicColour", and i don't like repeating names... this one is definitive

Offline Canopy

  • Atari ST
  • ***
  • Posts: 208
  • Karma: 20
    • View Profile
Re: [C++][Crinkler][glut]
« Reply #32 on: April 16, 2013 »
All the challenge ever done here can be found here  > http://www.dbfinteractive.com/forum/index.php?board=9.0


GL ES is 'just' a cut down OpenGL for mobile platforms, its based upon the shader GL stuff introduced in OpenGL 2.0 ish.

http://en.wikipedia.org/wiki/OpenGL_ES

If you want to do raspberry pi, ipad or android tablet graphics then its what you need to learn.

For now i'm forgetting about it and sticking to desktop OpenGL, I'm trying not to do anything that won't work on ES when i decide to port stuff to ipad or raspberry pi.
« Last Edit: April 16, 2013 by Canopy »

Offline lucastar

  • C= 64
  • **
  • Posts: 50
  • Karma: 5
    • View Profile
Re: [C++][Crinkler][glut]
« Reply #33 on: April 16, 2013 »

If you want to do raspberry pi, ipad or android tablet graphics then thats its what you need to learn.
I did something for android using libgdx, but i quit because i don't like java and it was only (i think) for 2D... and my hart always tells me to code for pc xD. I though that using opengl in android was not recommended.

Raspberry is a very interesting option to make pretty things... but i have a lot to learn before.

Offline lucastar

  • C= 64
  • **
  • Posts: 50
  • Karma: 5
    • View Profile
Re: [C++][Crinkler][glut]
« Reply #34 on: April 18, 2013 »
IQ/RGBA's 64k intro framework
My firewall is the only one that detects a virus there??
Damn i wanted to take a look at that... :'(

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1154
  • Karma: 175
    • View Profile
Re: [C++][Crinkler][glut]
« Reply #35 on: April 18, 2013 »
IQ/RGBA's 64k intro framework
My firewall is the only one that detects a virus there??
Damn i wanted to take a look at that... :'(

You'll get that a lot as soon as you start going anywhere near exe compressors. The heuristics engines in most antivirus software cause the same problems. I usually have a rule in my antivirus to exclude my development directory from scans. It's also handy to have another excluded location where you can drop demos and intros you want to watch. Obviously be careful what you run in that directory though :)

There are some 'sandbox' programs out there that will let you run a program in isolation. I've personally never bothered much with them though. Sandboxie is one I looked at a while back.
raizor

Challenge Trophies Won:

Offline lucastar

  • C= 64
  • **
  • Posts: 50
  • Karma: 5
    • View Profile
Re: [C++][Crinkler][glut]
« Reply #36 on: April 18, 2013 »
Ok, i will turn off my antivirus to download it.
Thanks!

Another question... on the image: the colours of the "Welcome" word are usually code-generated or textures?
« Last Edit: April 18, 2013 by lucastar »

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1154
  • Karma: 175
    • View Profile
Re: [C++][Crinkler][glut]
« Reply #37 on: April 18, 2013 »
I'm probably not the best person to answer that, but I'd imagine there's a gradient background and the text acts as a stencil so that the characters are transparent and show the background gradient. Someone like Padman would probably be able to give you a more accurate answer :)
raizor

Challenge Trophies Won:

Offline lucastar

  • C= 64
  • **
  • Posts: 50
  • Karma: 5
    • View Profile
Re: [C++][Crinkler][glut]
« Reply #38 on: April 18, 2013 »
I'm probably not the best person to answer that, but I'd imagine there's a gradient background and the text acts as a stencil so that the characters are transparent and show the background gradient.
Time ago i did exactly that with SDL... but i thought that was not the correct way to do it.

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1294
  • Karma: 466
    • View Profile
    • my stuff
Re: [C++][Crinkler][glut]
« Reply #39 on: April 18, 2013 »
Time ago i did exactly that with SDL... but i thought that was not the correct way to do it.
Back in time most video-chips could tell you when the cathode ray jumps into the next scanline.
If you used this to simply change one of your colors, you got fancy vertical gradients.
Todays "oldschool" intros are just immitating this effect but there's usually nothing clever behind it.
Challenge Trophies Won: