Jump to content


Photo

Opengl Wrapper


  • Please log in to reply
29 replies to this topic

#1 qwertyuiop23

qwertyuiop23

    GMC Member

  • New Member
  • 940 posts

Posted 28 July 2007 - 08:50 AM

Hi,

I am in the process of creating an OpenGL wrapper. Now this is a wrapper like you have never seen before. I don't promise pixel shaders or great new functions. All I wanted to do was create an OpenGL DLL that mimicked the d3d commands so that I could make my games run faster.

Any way here is some screenshots:
Posted Image
Shot at 2007-07-28

TODO LIST:
Link (.doc file)

Download
Contains:
*OpenGL.dll
*GMGLRelease.gm6
*heights.gml
*Grass3.bmp

Now manual yet as all things i want to do are not finished.

What I want people to do is test things out to see if they can be done using this DLL if not I may rewrite it like all other DLLs with flashy functions.

NOTE: One thing about vertexes, the number of vertexes in the model must equal a multiply of three otherwise it won't work.

Cheers
~Qwertyuiop23
  • 0

#2 Ivo Georgiev

Ivo Georgiev

    GMC Member

  • New Member
  • 274 posts

Posted 28 July 2007 - 09:55 AM

Nice but you must add the draw_block,draw_cyllinder,draw_cone and this functions.Ortho functions must be added too.There are a lots of things to do.
  • 0

#3 qwertyuiop23

qwertyuiop23

    GMC Member

  • New Member
  • 940 posts

Posted 28 July 2007 - 11:11 AM

Its on the todo list.
  • 0

#4 them4n!ac

them4n!ac

    GMC Member

  • New Member
  • 1170 posts

Posted 04 August 2007 - 09:32 PM

i have d3d9 wrapper but it's so low-level and even i can't remember how i can use it :)
your wrapper is good but it not has many things that advanced users would use... and i really can't figure out how you have made the screen redrawing function...
  • 0
what do you xpect to see here? another signature?
Cloud texture generator / renderer

#5 IamCalle

IamCalle

    GMC Member

  • GMC Member
  • 444 posts

Posted 15 February 2008 - 01:56 AM

Feel like I am bumping an old topic here, which is sad, because this wrapper needs attention, in my opinion. ;)


Any news in the development?
  • 0

#6 Game Lore

Game Lore

    GMC Member

  • New Member
  • 45 posts

Posted 20 February 2008 - 03:11 AM

Question: does it support 3d collisions like the half-life 2 engine because if it does i will praise you for ever more

-Game Lore ;)
  • 0
Moved onto C# and C++.
If you want help with collision detection/response I can still help you though, send me an email at rnaodm5@gmail.com

#7 them4n!ac

them4n!ac

    GMC Member

  • New Member
  • 1170 posts

Posted 22 February 2008 - 04:46 PM

Question: does it support 3d collisions like the half-life 2 engine because if it does i will praise you for ever more

-Game Lore :D

<{POST_SNAPBACK}>

opengl != 3d collisions
opengl dll != 3d collisions
this wrapper != 3d collisions
don't seek for food on the roof of a house, that would be the same! :D
  • 0
what do you xpect to see here? another signature?
Cloud texture generator / renderer

#8 Watever

Watever

    GMC Member

  • New Member
  • 146 posts

Posted 22 March 2008 - 10:33 PM

error!!!!!!!!!!!!!


___________________________________________
ERROR in
action number 1
of Create Event
for object obj_camera:

Error defining an external function.
  • 0
(\__/)
(='.'=)
(")_(")
This is bunny. Put him in your signature and help him on his way to world domination.

#9 WadeMcGillis

WadeMcGillis

    wademcgillis.com

  • GMC Member
  • 971 posts

Posted 08 April 2008 - 10:22 AM

error!!!!!!!!!!!!!


___________________________________________
ERROR in
action number 1
of Create Event
for object obj_camera:

Error defining an external function.


Do you have the DLL in the directory of the gmk?



@qwertyuiop23: Will you add a function to change the alpha translucency of the models?
  • 0

#10 headline@live.se

headline@live.se

    GMC Member

  • New Member
  • 1298 posts

Posted 08 April 2008 - 11:44 AM

ill try this when i get home from school :P
  • 0
92% of the population has moved to Rap. If you are one of the 8% that has stuck to rock, put this in your sig. RAP SUCKS!

keyboard_get_keyname

#11 qwertyuiop23

qwertyuiop23

    GMC Member

  • New Member
  • 940 posts

Posted 11 April 2008 - 08:40 AM

Ok to answer everyones's questions:

Yes i am still developing but over the last long while school and other thigns have got in the way. I am back on it working slowly though and before any grpahical things come in there will be a collision system added.

This DLL was designed so that my computer could run it. I have an on board graphics card so can't support pixel shaders and stuff. Plus i don't know if you have seen some of the stuff people can do with d3d i thought if i made hat quicker it would be cool.
  • 0

#12 X-tra Fear

X-tra Fear

    Behemoth Creator

  • GMC Member
  • 430 posts
  • Version:GM8

Posted 11 April 2008 - 11:59 AM

I edited my old post...

What now.

Edited by X-tra Fear, 30 September 2008 - 01:38 AM.

  • 0

#13 headline@live.se

headline@live.se

    GMC Member

  • New Member
  • 1298 posts

Posted 13 April 2008 - 04:35 PM

well, does this disable directx?
  • 0
92% of the population has moved to Rap. If you are one of the 8% that has stuck to rock, put this in your sig. RAP SUCKS!

keyboard_get_keyname

#14 biggoron

biggoron

    dura lex sed lex

  • New Member
  • 652 posts

Posted 13 April 2008 - 09:04 PM

XD

As if Microsoft would ever give that much power to OpenGL. Microsoft barely even bothered to make a software GL implementation.

in my opinion, DirectX is big, and useless. Especially DirectX 10... anyway, you can blame microsoft for the support we have on OpenGL... They do not support it at all and I dont know if this has changed in vista. the only support they have are these "extensions" which run slower than being integrated into the OS. In my opinion, Microsoft did that to make it look like DirectX is better when actually OpenGL would run better. Keep in mind what I said above, now something in OpenGL usually runs hmmm 6-8 less fps or maybe 20 than DirectX on something... so if microsoft stopped being stupid would OpenGL be faster? U'll never know because Microsoft stays at OpenGL 1.1 forever


D3D 10 has more features than GL 2.1, and is generally better for games just because of the way it works. In terms of what it does on the graphics card, D3D9 works almost identically to GL2.1. The main differences are the APIs (GL's is good, D3D's is bad) and the fact that D3D has one implementation. Also, OpenGL on Vista is at 1.4, but emulated as D3D functions.

Edited by biggoron, 13 April 2008 - 09:12 PM.

  • 0

#15 headline@live.se

headline@live.se

    GMC Member

  • New Member
  • 1298 posts

Posted 14 April 2008 - 05:29 AM

i meant, does you still need directx to run gm games?
  • 0
92% of the population has moved to Rap. If you are one of the 8% that has stuck to rock, put this in your sig. RAP SUCKS!

keyboard_get_keyname

#16 Phantom107

Phantom107

    Graphics Enthusiast

  • GMC Member
  • 2774 posts
  • Version:GM:Studio

Posted 14 April 2008 - 03:21 PM

I was reading your .doc file and saw you weren't going to include these functions:

3. d3d_set_hidden(enable)
54. d3d_model_load(ind,fname)
55. d3d_model_destroy(ind)
56. d3d_model_clear(ind)

Why not? A lot of users need functions.
  • 0

GMCSignature.png

 

The most advanced GM game yet. Check out the Titan Rush GMC topic here! Developed by Phantom Technology

Talented spriting artist, looking for work? PM me. I'm working on a small project and need assistance. :)


#17 brett14

brett14

    GMC Member

  • GMC Member
  • 1151 posts
  • Version:GM8

Posted 26 September 2008 - 03:05 PM

I think you should keep working on this project, as it would help me... and probably others too (if your mimicking the d3d functions exactly!)

[EDIT]

...if you are 100% sure your not going to continue this, can you release the source??

[/EDIT]

Edited by brett14, 26 September 2008 - 05:15 PM.

  • 0

P3DC V6.00 | Editor14 | Large 3D Terrain

GML programmer since 2005, C/C++ programmer since 2009, Java programmer since 2012


#18 PHL

PHL

    GMC Member

  • GMC Member
  • 189 posts

Posted 23 July 2010 - 06:56 PM

Please tell us whether an OpenGL dll can be used for your Game Maker game instead of DirectX or Direct3d.
Game Maker depends on DirectX, no?
  • 0
See and/or buy my art online at tamajongphilip.imagekind.com. Video games need graphic artwork of some kind.

PHL's Free Game Ideas - www.phl-freegameideas.webs.com

On the Internet you can buy PHL's Air Flying game at http://store.indieci...lsairflyinggame . (Friday 19th October 2012.)

#19 freko

freko

    The Professional

  • GMC Member
  • 504 posts
  • Version:GM8

Posted 23 July 2010 - 07:23 PM

Game Maker depends on DirectX, no?

Yes. Run Gm on dx7 and see..

Edited by freko, 23 July 2010 - 07:24 PM.

  • 0

#20 brett14

brett14

    GMC Member

  • GMC Member
  • 1151 posts
  • Version:GM8

Posted 23 July 2010 - 11:26 PM

DX7... That's like old. Nobody that has DX7 will bother to run your game.
  • 0

P3DC V6.00 | Editor14 | Large 3D Terrain

GML programmer since 2005, C/C++ programmer since 2009, Java programmer since 2012


#21 freko

freko

    The Professional

  • GMC Member
  • 504 posts
  • Version:GM8

Posted 24 July 2010 - 06:42 AM

DX7... That's like old

Thats what I was stating Gm actually needs dx(8 & above) to run and will fail if it doesn't.

Game Maker depends on DirectX, no?

So if you plan to switch the display to openGl, it will still need directX to run..don't you get it!!

Edited by freko, 24 July 2010 - 06:45 AM.

  • 0

#22 rappybas

rappybas

    GMC Member

  • New Member
  • 678 posts

Posted 07 September 2010 - 02:55 PM

This is great!

But one question, the texture I used does load, but for some reason it just doesn't show up!
tex is the variable I used. And I wonder, how does the engine know how to place the texture? Do I have to use any other functions?

egl_transform_set_identity()
egl_render()
egl_primitive_begin()

egl_vertex_texture( 1.0, 1.0,-1.0,tex,1);
egl_vertex_texture(-1.0, 1.0, 1.0,tex,1);
egl_vertex_texture( 1.0, 1.0, 1.0,tex,1);
egl_vertex_texture( 1.0, 1.0,-1.0,tex,1);
egl_vertex_texture(-1.0, 1.0,-1.0,tex,1);
egl_vertex_texture(-1.0, 1.0, 1.0,tex,1);

egl_vertex_texture( 1.0,-1.0, 1.0,tex,1);
egl_vertex_texture(-1.0,-1.0,-1.0,tex,1);
egl_vertex_texture( 1.0,-1.0,-1.0,tex,1);
egl_vertex_texture( 1.0,-1.0, 1.0,tex,1);
egl_vertex_texture(-1.0,-1.0, 1.0,tex,1);
egl_vertex_texture(-1.0,-1.0,-1.0,tex,1);

egl_vertex_texture( 1.0, 1.0, 1.0,tex,1);
egl_vertex_texture(-1.0,-1.0, 1.0,tex,1);
egl_vertex_texture( 1.0,-1.0, 1.0,tex,1);
egl_vertex_texture( 1.0, 1.0, 1.0,tex,1);
egl_vertex_texture(-1.0, 1.0, 1.0,tex,1);
egl_vertex_texture(-1.0,-1.0, 1.0,tex,1);

egl_vertex_texture( 1.0,-1.0,-1.0,tex,1);
egl_vertex_texture(-1.0, 1.0,-1.0,tex,1);
egl_vertex_texture( 1.0, 1.0,-1.0,tex,1);
egl_vertex_texture( 1.0,-1.0,-1.0,tex,1);
egl_vertex_texture(-1.0,-1.0,-1.0,tex,1);
egl_vertex_texture(-1.0, 1.0,-1.0,tex,1);

egl_vertex_texture(-1.0, 1.0, 1.0,tex,1);
egl_vertex_texture(-1.0,-1.0,-1.0,tex,1);
egl_vertex_texture(-1.0,-1.0, 1.0,tex,1);
egl_vertex_texture(-1.0, 1.0, 1.0,tex,1);
egl_vertex_texture(-1.0, 1.0,-1.0,tex,1);
egl_vertex_texture(-1.0,-1.0,-1.0,tex,1);

egl_vertex_texture( 1.0, 1.0,-1.0,tex,1);
egl_vertex_texture( 1.0,-1.0, 1.0,tex,1);
egl_vertex_texture( 1.0,-1.0,-1.0,tex,1);
egl_vertex_texture( 1.0, 1.0,-1.0,tex,1);
egl_vertex_texture( 1.0, 1.0, 1.0,tex,1);
egl_vertex_texture( 1.0,-1.0, 1.0,tex,1);
    
egl_primitive_end()

Edited by rappybas, 07 September 2010 - 02:58 PM.

  • 0

#23 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 07 September 2010 - 04:39 PM

Posted Image

This makes your games slower.
  • 1

#24 rappybas

rappybas

    GMC Member

  • New Member
  • 678 posts

Posted 07 September 2010 - 06:36 PM

This makes your games slower.

Then ur doing it wrong, facepalm back to you.
  • 0

#25 brett14

brett14

    GMC Member

  • GMC Member
  • 1151 posts
  • Version:GM8

Posted 07 September 2010 - 06:54 PM

No he isn't. Using models are faster, however drawing a primitive each step, recreating it before drawing it is slower than gm.
  • 0

P3DC V6.00 | Editor14 | Large 3D Terrain

GML programmer since 2005, C/C++ programmer since 2009, Java programmer since 2012


#26 rappybas

rappybas

    GMC Member

  • New Member
  • 678 posts

Posted 07 September 2010 - 07:15 PM

I use models now, and the Facepalm guy seemed like he was talking about GMOpenGL
  • 0

#27 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 07 September 2010 - 08:01 PM

Calling this DLL thousands of times a second is slow.
  • 0

#28 brett14

brett14

    GMC Member

  • GMC Member
  • 1151 posts
  • Version:GM8

Posted 07 September 2010 - 08:44 PM

What is GMOpenGL? Gamemakers uses DX8, is it a different dll?
  • 0

P3DC V6.00 | Editor14 | Large 3D Terrain

GML programmer since 2005, C/C++ programmer since 2009, Java programmer since 2012


#29 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 08 September 2010 - 01:21 AM

This DLL is GMOpenGL. DirectX is what Game Maker uses to render graphics. This DLL lets you use OpenGL.
  • 0

#30 qwertyuiop23

qwertyuiop23

    GMC Member

  • New Member
  • 940 posts

Posted 09 September 2010 - 06:43 AM

Ummm I haven't been working on this for YEARS!!! I don't even have the source for this anymore - I would suggest using Ultimate3D or GMOgre or something else as this has bad coding practice, lacks documentation and I would say contains many bugs.

Now to the person who was saying that this will run slower than GM....Well it won't. In my experience it runs about 3-4 times faster than normal GM however that was using GM6 so things may have changed.

Cheers
~Qwertyuiop23
  • 0