Author Topic: Joncom2000's attempt at Opengl  (Read 32946 times)

0 Members and 1 Guest are viewing this topic.

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Joncom2000's attempt at Opengl
« Reply #60 on: March 29, 2009 »
Zawran, he's probably used Glscale to flip the y axis to render the reflection, it's a fast and very common way of rendering reflections in OpenglRender the inverted scene, flip the Y axis, enable glblend, draw the floor, disable glblend and then render the other half of the scene.

Blitz3d uses directx but it probably does it the same way.

Stencil buffers are more useful for things like shadows and that kind of stuff.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline zawran

  • Sponsor
  • Pentium
  • *******
  • Posts: 909
  • Karma: 67
    • View Profile
Re: Joncom2000's attempt at Opengl
« Reply #61 on: March 29, 2009 »
Quote
he's probably used Glscale

Ah yes ofcause, don't know why I didn't think about scaling. That would be the easy way to do it :)

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: Joncom2000's attempt at Opengl
« Reply #62 on: March 30, 2009 »
Yep thats how I did it, b3d's mirror plane command does the same thing, it renders the scene upside down like that. Would be cool to get the sphere's reflecting the floor back, could use a cubemap i think for that bu not got that deep into special effects yet :)


Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: Joncom2000's attempt at Opengl
« Reply #63 on: April 01, 2009 »
Not much engine progress to report at the moment, havent added any new features but have cleaned up some of the code. Have been messing around with lights but not happy with the results at the moment. Having hit a bit of a wall with things not working how I expected I have taken a side step and much like zawran, after we had chatted about it I also started to code a GUI for use with my engine, while its not needed for demos it will be useful for editors and since i dont have the maxgui module it would be fairly hard work to use the windows GUI as I would have to code all the binding etc. myself and I am not that sure how I go about that  ;)

So far I only have basic window drawing and dragging coded, windows can be skinned and can be setup to have features like status bars and each window can be set to be dragable or not. Next feature is to add some gadgets so the windows can actually do something. I am not looking to make this a full on GUI so I will only be adding features to enable me to make the tools I want. Anyway here's a screenshot of some windows over a 3d backdrop, it runs fast enough at the moment but I need to get the font drawing to the window rather than over it to reduce redrawing of none changing stuff.


Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1294
  • Karma: 466
    • View Profile
    • my stuff
Re: Joncom2000's attempt at Opengl
« Reply #64 on: April 01, 2009 »
Looks promising!
A useful gui-item would be some sort of list or tree to hold the objects of your scene.
Is it possible to resize windows?
If so, how are you going to distribute the new space along items inside the window?
Challenge Trophies Won:

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: Joncom2000's attempt at Opengl
« Reply #65 on: April 01, 2009 »
windows arent resize-able at the moment, Not sure if I will implement that or not, depends if anything I make needs it I guess :D

I dont really know if I will need the windows to be moveable but since I hadn't coded that type of GUI element before I thought what the hell and added it. I could likely make editors with fixed buttons and gadgets but I wanted to have a go at making something alittle different to what I have done in the past, I have never coded a windowed GUI as such, so its an experiement as much as anything.

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: Joncom2000's attempt at Opengl
« Reply #66 on: April 07, 2009 »
Wonder if you folks would mind doing a little test for me, I have recoded the drawing part of my gui system after having some problems with the old method and have changed how I handle the text to allow retime updating of status text but I am not sure how well it will run on across hardware, while the gui is more for me I might at some point use it elsewhere and would be good to know it can run on more hardware at a decent fps. The windows are all dragable but there is a slight bug were you can end up collecting all the windows, I know about it but havent fixed it yet cos I had more pressing concerns :D

If you could post fps and gfx card info I would be grateful.

Thanks
Jon

Offline zawran

  • Sponsor
  • Pentium
  • *******
  • Posts: 909
  • Karma: 67
    • View Profile
Re: Joncom2000's attempt at Opengl
« Reply #67 on: April 07, 2009 »
Geforce 8500 GT, 550fps
Geforce 8800 GT, 3460fps

Runs really well it seems. No slowdown at any time.
« Last Edit: April 07, 2009 by zawran »

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1294
  • Karma: 466
    • View Profile
    • my stuff
Re: Joncom2000's attempt at Opengl
« Reply #68 on: April 07, 2009 »
Geforce 8800 GTS, 4000 fps.
Geforce 8600 GTS, 1600 fps
(both winxp)
« Last Edit: April 08, 2009 by hellfire »
Challenge Trophies Won:

Offline Pixel_Outlaw

  • Pentium
  • *****
  • Posts: 1382
  • Karma: 83
    • View Profile
Re: Joncom2000's attempt at Opengl
« Reply #69 on: April 07, 2009 »
47 FPS
ATi Radeon Xpress 1100.
Challenge Trophies Won:

Offline mziskandar

  • C= 64
  • **
  • Posts: 46
  • Karma: 1
    • View Profile
Re: Joncom2000's attempt at Opengl
« Reply #70 on: April 08, 2009 »
315fps on 9600xt (Intel P4 3.0HT)

Offline Pixel_Outlaw

  • Pentium
  • *****
  • Posts: 1382
  • Karma: 83
    • View Profile
Re: Joncom2000's attempt at Opengl
« Reply #71 on: April 08, 2009 »
My computers, she is a bad.  :boxer:
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: Joncom2000's attempt at Opengl
« Reply #72 on: April 08, 2009 »
Vista, nVidia 8600GT, 960fps.
Windows 7, Intel GMA 950, 2fps, my netbook, lol!
Jim
« Last Edit: April 08, 2009 by Jim »
Challenge Trophies Won:

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: Joncom2000's attempt at Opengl
« Reply #73 on: April 08, 2009 »
Thanks for the feedback folks, some suprizing numbers but for the most part shows that I am fairly safe to go down this drawing method route as far as using the gui with some 3d. The drawing overhead shouldnt get much higher for the gui so the only increase will be in event checking, once i start to add some gadgets :)

@Jim, does windows 7 and that intel chip have a decent opengl driver ? Could it be running it in software mode :D

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Joncom2000's attempt at Opengl
« Reply #74 on: April 08, 2009 »
Don't know if this is too late for you Jon but I got 860fps on this computer (ATI X1650 SE).
Looking good.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: Joncom2000's attempt at Opengl
« Reply #75 on: May 02, 2009 »
Not been doing much coding the last week or so but have been tinkering with shaders abit when i get a chance. Finally today I managed to get my first bumpmap shader to work, it's not of massive use since it doesnt deal with tangent space and all that other complex stuff that I havent mastered yet but it does atleast give the impression of 3d depth on the texture :)

Here's a shot and a sample exe for those interested.

Offline Pixel_Outlaw

  • Pentium
  • *****
  • Posts: 1382
  • Karma: 83
    • View Profile
Re: Joncom2000's attempt at Opengl
« Reply #76 on: May 02, 2009 »
Wow, when toggling between the off and on setting there is a world if difference.
Challenge Trophies Won:

Offline zawran

  • Sponsor
  • Pentium
  • *******
  • Posts: 909
  • Karma: 67
    • View Profile
Re: Joncom2000's attempt at Opengl
« Reply #77 on: May 02, 2009 »
Looks good and great to see that you are progressing.

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17414
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Joncom2000's attempt at Opengl
« Reply #78 on: May 03, 2009 »
The shader makes it look really really nice Jon. I like this a lot.

Shockwave ^ Codigos
Challenge Trophies Won:

Offline TinDragon

  • Pentium
  • *****
  • Posts: 644
  • Karma: 24
    • View Profile
    • J2K's blog
Re: Joncom2000's attempt at Opengl
« Reply #79 on: May 03, 2009 »
Thanks for the feedback :)

Its also nice to know its working on more than just my pc, its my 3rd attempt at getting some form of bumpmapping to work with a shader, I have learnt a fair bit while doing this about how to use different shaders and it's been a very interesting experience. My next move with them is to get my head round tangent space normals but thats for a little way of in the future. I have some updating to do of my opengl engine 1st, which currently doesnt even handle multi textures  :-[
I plan to add support for multitexturing and a few other minor features then start looking into the stencil buffer and probably shadows, also still need to code a proper model loader but been abit busy with other things.