VividGL 2D_Example1.
Community Forums/Showcase/VividGL 2D_Example1.
| ||
Will be releasing a few demos over the coming days, before (And after) VividGL-3D Lite's release. Here's a little demo demonstrating some of it's (3D accelerated) 2d features(Which can be used at the same time as it's 3d features) This should run on any OpenGL card capable of multi-texturing, does not use pixel shaders. http://www.excess.eclipse.co.uk/2D_Example1.rar This demo uses a smoke image to create what appears to be a glowing ball of light, with vapours emitting. Here's the actual demo code I used. Function names subject to change. Include "Includes\VividGL_Lite.bb" Graphics_Init(640,480,16) glSetbuffer Graphics_Back() ;- smokeTex=Texture_Load("Media\Smoke1.jpg",glMipMap) While Not KeyDown(1) glCls(False) For j=1 To 1 smk.smk=New smk smk=New smk smk\life=1 smk\xi=Rnd(-2,2) smk\yi=Rnd(-2,2) smk\x=Rnd(GraphicsWidth()/2-20,GraphicsWidth()/2+20) smk\y=Rnd(GraphicsHeight()/2-20,GraphicsHeight()/2+20) Next pc=0 Lock2D() activate_Texture(smokeTex,0) Render_Begin() For smk=Each smk ColorAlpha 1*smk\life,1*smk\life,1*smk\life,0 Render_QuadFast(smk\x-smk\size,smk\y-smk\size,smk\size*2,smk\size*2) smk\size=smk\size+2.5 smk\life=smk\life*0.98 smk\x=smk\x+smk\xi smk\y=smk\y+smk\yi If smk\life<0.1 Delete smk Next Render_End() Unlock2D() glText 1,1,"My balls. Are made. Of light." Graphics_Flip(False) Wend Type smk ;demo related. Field x#,y#,size# Field life#,xi#,yi# End Type |
| ||
Cool. |
| ||
Looks good - does it really need all those DLLs to run though!? |
| ||
Looks like a few are Visual C++ ones. Nice demo though. |
| ||
The text is messed up in mine.. comming out as a string oh varrying ammounts of H's and T's and I think I saw a few S's as well. Are the Lock2d() etc for buffer locks? |
| ||
Function names pending, but please I advise, don't use underscores. Alright demo, would be better with a fps counter :) |
| ||
Underscores are bad form. Your indentation needs fixing. You are not consistent, for example the demo says "li." and you call it lite here. But apart from that, it works! |
| ||
Micheal, come release you'll need one .dll for non shader apps, or one .dll + cg runtimes(.dlls).. In fact, i dunno why I even included the cg .dlls in this release, blitz only complains if a .dll is missing if the prog actually goes to use it. not too sure about the vc runtimes..recently shifted to vc2005. Shattered, can you post an image? The text sub-system still uses proper gl2d, and I believe I may have pixel buffer objects on by default.(Only supported on newer cards) As for Lock2D(), no, you don't need to 'lock' a buffer in gl to draw 3d, it just sets up the gpu for orthogonal 2d rendering, gpu states etc. Render_Begin/End is optionmal, you can use Render_Quad() without it, it's a tad slower.(Wrote in C++, though, so not THAT slow.:) ) Rob, fair enough, I dislike them too, but remember, come bmax, I'll be reducing each sub syste to a class with methods. So it'll be like, Graphics.Init(640,480,160) Texutre MyTexture MyTexture.Load("Smoke.Bmp") Entity Ship Ship.Load("Mig.vmf",16).. So, it's also to keep a consistancy between b3d and bmax versions. |
| ||
I see a black screen with the white text in the corner but nothing else. I am on a Dell machine that only has an Intel card in it however (Optiplex GX270), I think its an Intel Springdale Chipset. Would the app tell me if my video card was too crap to display the program? A |
| ||
Cool effect. |
| ||
i got a MAV |
| ||
Worked perfectly on my setup and very smooth also. |
| ||
Hi. I just tried running this on my laptop and I got a memory access violation error. On the main black screen the only thing I get is the y with two dots above it character. Mind you, my laptop's graphics card is a very poor 64 megs VAI/S3G KM400/KN400 graphics card which cannot handle any of the newer games apart from Unreal Tournament 2004 for some weird reason!! Just to expand on that - it runs Blitz3d no problem although sometimes I do experience slowdown and low fps when there is lots being rendered on the screen. **EDIT** - Forgot to mention that the BlitzMax Rockets demo game worked fine on my laptop and that, obviously, uses OpenGL, although your system may be using more advanced OpenGL functionality which is not supported by my laptop graphics card. I will try it on my main desktop PC later on. I am sure that will run it fine as that has a Radeon 9600 graphics cards, 512 megs of ram, Pentium 2.8 GHz processor etc. ** EDIT 2 ** - Tried the demo on my main PC. Worked fine. Hope that helps a little. |
| ||
User Lib not found here. I assume i need a user lib of some sort then? :o) I also assume i'm an idiot and will copy the files across so it works :o) |
| ||
Yeah, still says user lib not found. Tried copying them to system 32 folder and the userlib blitz folder. Still nothing. |
| ||
runs fine on my laptop although I don't see the actual use of this demo as it can be achieved with Blitz3D without real problems ___________ P-M 1,5 ghz, 512MB DDR, 60GB HD, Mobility Radeon 9700 64MB, DX9c + Summer SDK |
| ||
Dreamora, doubtful, blitz3D doesn't support 3d accelerated 2d. You'd have to fake it all using quads and screen allignment and what not, real messy stuff. Besides, how can you not see the need to do compatability tests? :) Ross, That's really not possible, I literally only re-installed windows last night, so the only .dlls I have installed on my win folder are your standard issue sp 2 ones. So, if anything you're missing a system .dll or two, that gl uses. I guess. Daz, yep it did, thanks. Btw, that rocket demo was by James L Boyd and was for blitzMax, which is not connected to VividGL in any way other than it being vivid's eventual home :) |
| ||
Andy, in vivid you can check if any feature(Within reason) is supported. I will release a little diagnosis tool in a bit, that tells you in plain english what vivid can and can not do on your(Or anyones) machine. Should hopefully prevent any nasty suprises(For you guys) come release. |
| ||
Works fine here, fast pc etc etc. |
| ||
Works fine. Looks lovely. |
| ||
Cool, and ta.(said macho man.) |
| ||
MAV here too. |
| ||
Can you determine in which module/.dll? (In xp, you can click for more details, and it should list the .dll/process that crashed.) |
| ||
No XP here, man. |
| ||
"CAROL ANN! DON'T GO INTO THE LIGHT!!" |
| ||
I dowload all samples , it say error ( User Lib Not Found ) ??? win xp , p4 , dx 9.c , gforce fx 5200 |
| ||
..is that all??..some foggy stuff in the middle of my screen?.. |
| ||
That's what the demo is... This thread is... 4 months old?!!?? |