Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
February 08, 2012
Home
Help
Search
Calendar
Login
Register
Dark Bit Factory & Gravity
»
GENERAL
»
Projects
»
Blitzmax shader test
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Blitzmax shader test (Read 783 times)
0 Members and 1 Guest are viewing this topic.
TinDragon
Pentium
Posts: 622
Karma: 23
Blitzmax shader test
«
on:
March 21, 2009 »
As you know I have been coding an opengl engine in blitzmax, well I got stuck on something so decided to see if I could get GLSL shaders to work in bmax. Sfter hunting for information on shaders and how to use them in opengl I tired for several hours to work out first if bmax had all the calls available, which it does, I then spent several more hours learning how to call them in the right order with various degrees of success. Then I struggled on some more trying to work out how to get the shader code into the shaders, getting it in the right format proved more of a challenge than everything else, but finally life appeared on my screen
So here is a test.exe which shows that bmax can do shaders and that I managed to get one into it, it was hard work and its rather ugly code and I have no idea if I am cleaning up after myself when you exit correctly SO it might have a memory leak, but it should be right
The actually vertex and fragment shader code is from an example I got off the net since I have never coded a shader, there included in the archive since i could not get the code to compile if I added them to the exe, something else to sort out at some point
Logged
zawran
Sponsor
Pentium
Posts: 886
Karma: 63
Re: Blitzmax shader test
«
Reply #1 on:
March 21, 2009 »
It looks cool
[edit] I just had a look at those shader files. It looks like a certain amount of understanding of math is involved. The fortunate thing is that a lot of complete shader files can be found around the web.
«
Last Edit: March 21, 2009 by zawran
»
Logged
TinDragon
Pentium
Posts: 622
Karma: 23
Re: Blitzmax shader test
«
Reply #2 on:
March 23, 2009 »
thanks for trying it out, was hoping to get alittle more feedback so I could tell it this was working correctly on more systems but it seems to have been a very quiet weekend on DBF
So far I have had it tested on vista32 with Geforce 8500, vista64 with radeon 4870x2 and xp32 with radeonx1650 and its worked fine so I am fairly confident that it's doing everything correctly, I will likely do some more testing onve I explore this area some more but for now I want to get some more functions into my oglengine for lights,camera and texturing
Logged
Pixel_Outlaw
Pentium
Posts: 1343
Karma: 79
Re: Blitzmax shader test
«
Reply #3 on:
March 23, 2009 »
I got around 40 FPS on my computer.
Ati Radeon Xpress 1100
Logged
Challenge Trophies Won:
hellfire
Sponsor
Pentium
Posts: 960
Karma: 394
Re: Blitzmax shader test
«
Reply #4 on:
March 23, 2009 »
works fine on a geforce 8600 gts.
Logged
Challenge Trophies Won:
TinDragon
Pentium
Posts: 622
Karma: 23
Re: Blitzmax shader test
«
Reply #5 on:
March 23, 2009 »
thanks for testing it out folks
I guess the ati xpress chipset might not be the fastest at shaders since its from the look of the ati site a laptop intergrated solution, but its nice to know it actually worked
I did finally work out why I could not include the shaders in the exe and have fixed that problem so I can cross that of my list, I also found a much simpler way to load said shader source into the correct format to pass to opengl, not that it improves proformance but the code looks much cleaner. Hopefully as my engine progresses and I get to the point of adding more advanced features this experiment will have proved useful.
thanks
jon
Logged
matthew
C= 64
Posts: 27
Karma: 2
Re: Blitzmax shader test
«
Reply #6 on:
March 23, 2009 »
It looks very good, I've just tried it on my computer running XP with an Intel card & it worked fine.
Logged
Shockwave
good/evil
Founder Member
DBF Aficionado
Posts: 16787
Karma: 439
evil/good
Re: Blitzmax shader test
«
Reply #7 on:
March 23, 2009 »
Works fine ATI X1650
Logged
Shockwave ^ Codigos
Challenge Trophies Won:
rbz
Founder Member
DBF Aficionado
Posts: 2325
Karma: 392
Re: Blitzmax shader test
«
Reply #8 on:
March 25, 2009 »
Works fine here too, GF 8800 GTS
Logged
rbz ^ Codigos
Challenge Trophies Won:
Print
Pages: [
1
]
Go Up
« previous
next »
Dark Bit Factory & Gravity
»
GENERAL
»
Projects
»
Blitzmax shader test