Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Goombert

2671
I am using the zip installer which comes with MinGW64 Harri, if that is the case, first try to install the DX runtime, then try to install the DX SDK and see which of those fixes it, but do it in that order, as I'd rather have people download the runtime than the SDK.

d3d9.h contains most of the rendering headers
d3dx9.h contains math functions, vector classes, and matrix transformation stuffs

There is also a lib for both of those which is linked, -ld3d9 and -ld3dx9

Quote
And why can't you do this now in OGL? Do you mean just using d3d_transform functions to rotate sprites?
No I was just ensuring everyone that the behavior has not been lost with this new sprite batching class.

2672
Proposals / Re: GL3 changes from immediate to retained mode
« on: July 31, 2013, 09:21:42 AM »
Harri, yup, exactly what I was thinking.

2673
Proposals / Re: GL3 changes from immediate to retained mode
« on: July 31, 2013, 07:34:13 AM »
Yes, these were all the things I was originally planning to do with OpenGL 3. But Harri, for that I was thinking of a common interface for vertex formats of all the basic shapes like a plane and what not, and include them from a common header, thats what those GLshapes.cpp and GL3shapes.cpp files are about. I just didn't have the energy to do it. Also, that is why there's a shaders folder, we need to rewrote all the behavior expected into GPU programs as well. Especially for particle effects.

2674
Me and Josh did a few test cases and the sprite batch does properly organize depths, and in fact transformations can be applied to the sprites/backgrounds/text to turn them into 3D billboards like many people do in Game Maker.

2675
Proposals / Re: Vertex color
« on: July 31, 2013, 04:42:49 AM »
Quote
We use VBO's instead of lists as it is just better usually. But even lists cannot be changed. So if you turn this into a list:
It was in response to that :P I was not sure if you were aware that OpenGL 1 still uses call lists.

2676
Quote
Sadly we don't. I would really want an android port, but the framework it requires (together with a shit ton of configuration for SDK/NDK) makes it all hard to do. Maybe I'll just try making GLES run on Windows (if that is even possible) and then try to make it work on another device.
Nonsense Harri, I have faith in you  :)

Edit: We can also add the display_reset for AA it's just a flag in the D3D present parameters. And now I get my full 8 levels of MSAA and Morphological anti-aliasing provided by my ATI Radeon graphics card, so I still say the fuck with OpenGL. The Direct3D code is much more abstract but yet so much more compact and easier to read and write.

Edit 2:

Text rendering and fonts on the way!!!

2677
Guys, hey I got the #1 reason we are going to use DX now, look at the updated screen shot, that is 50,000 draw_sprite calls at 30fps, OpenGL can't handle 15,000 on my pc at more than 12fps. That is utilizing DX's internal sprite batching class, please proceed with the DirectX vs. OpenGL debates. :P

Please merge pull request....
https://github.com/enigma-dev/enigma-dev/pull/283

Also to prove my point, this is the d3d blend modes and their OpenGL and Direct3D equivalents.
Code: [Select]
  bm_zero             =  1,  // GL_ZERO                  D3DBLEND_ZERO
  bm_one              =  2,  // GL_ONE                   D3DBLEND_ONE
  bm_src_color        =  3,  // GL_SRC_COLOR             D3DBLEND_SRCCOLOR    //only for dest
  bm_inv_src_color    =  4,  // GL_ONE_MINUS_SRC_COLOR   D3DBLEND_INVSRCCOLOR //only for dest
  bm_src_alpha        =  5,  // GL_SRC_ALPHA             D3DBLEND_SRCALPHA
  bm_inv_src_alpha    =  6,  // GL_ONE_MINUS_SRC_ALPHA   D3DBLEND_INVSRCALPHA
  bm_dest_alpha       =  7,  // GL_DST_ALPHA             D3DBLEND_DESTALPHA
  bm_inv_dest_alpha   =  8,  // GL_ONE_MINUS_DST_ALPHA   D3DBLEND_INVDESTALPHA
  bm_dest_color       =  9,  // GL_DST_COLOR             D3DBLEND_DESTCOLOR     //only for src
  bm_inv_dest_color   = 10,  // GL_ONE_MINUS_DST_COLOR   D3DBLEND_INVDESTCOLOR  //only for src
  bm_src_alpha_sat    = 11   // GL_SRC_ALPHA_SATURATE    D3DBLEND_SRCALPHASAT   //only for src

So like I said the graphics portion of Game Maker was designed around D3D, obviously because of the function naming as well, so this definitely will cut down on visual anomalies in games. I've also noticed the transform functions have the same behavior as one would expect in Game Maker.

2678
Proposals / Re: Vertex color
« on: July 30, 2013, 04:14:46 PM »
Harri, OpenGL3 uses VBO's, OpenGL 1 still uses call lists, and it is likely to remain that way.

2679
General ENIGMA / Re: DirectX Image formats and Fonts
« on: July 30, 2013, 04:13:48 PM »
No, Josh, DirectX does not have the format available for RGBA only ARGB or RGB, please see the Microsoft documentation...
http://msdn.microsoft.com/en-us/library/windows/desktop/bb172558%28v=vs.85%29.aspx

And I was not suggesting throwing out fonts altogether, I was just wondering if we wanted to abstract it to make use of some of these nice features of the API. Now what I meant with sprites and backgrounds is that DX provides a sprite drawing class, which I could just as easily use for the background functions, that is what the last link was about...
http://www.two-kings.de/tutorials/dxgraphics/dxgraphics09.html


2680
I don't care about all that, I care about the people who come here and don't have OGL support, that's great if it works good for all of us, but it doesn't help us if we just ignore those people, and DX9 is just a stepping stone in DX10 and DX11 for me, I am going to write them all. We already have GLES for other embedded systems, it's dumb that we ignore the operating system that controls 90% of the market, which is not going to favor in our interest.

Anyway, I disagree that its not going to be used either, look Game Maker's 3D functions were designed around Direct3D, we've had to do screwy shit to get things to work exactly like they do in Game Maker because of the differences in OGL vs DX, not that we shouldn't get our OGL system as close as possible, I am just saying using a D3D graphics system would make those anomalies a lot less possible. Not to mention the code is much easier to work with, the code I've written so far has been a lot less bloated than OGL, and its not as convoluted with all the extensions and querying. Because you are targeting a specific version, you already know what and what you can not work with, not to mention there is no "immediate mode" so you can switch between hardware/software vertex processing at runtime, this has always been an important thing with DirectX when new technology comes out because it allows people to choose to try and emulate it if they don't have proper graphics hardware.

2681
Quote
Personally, though, I think DX9 Is a step in the wrong direction.
Completely disagree, one good thing about ENIGMA is its compatibility, we can run in virtual machines where Stupido is not capable of doing so. Microsoft likes to be bastards with OpenGL support, and once I get the hang of DX it won't take long and I'll be working on DX10 and 11.

2682
General ENIGMA / DirectX Image formats and Fonts
« on: July 29, 2013, 09:15:06 PM »
Ok well this something we need to discuss.  ENIGMA has its own code for loading various image formats, but Direct3D has a S*** TON of built in formats supported...

from...
http://msdn.microsoft.com/en-us/library/windows/desktop/bb172801%28v=vs.85%29.aspx
".. the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga"

DirectX also has internal classes for dealing with fonts, you can simply request them by name and tell it to render, it takes like 5 lines of code...
http://www.two-kings.de/tutorials/dxgraphics/dxgraphics09.html
You can also ask it to build a mesh from font numerics and it will do so.

So this begs the question as to what to do about our fontstruct as it obviously needs moved so that its not included in our DX system when it doesn't need to be.

DirectX also provides internal classes for drawing sprites and batching them...
http://www.two-kings.de/tutorials/dxgraphics/dxgraphics09.html

Now this also leads to another thing as to whether or not we want to use those sprite functions for backgrounds as well. Not to mention in GameMaker sometimes people will apply transformations to text and sprite drawing functions to use them as 3D billboards. I would like some input from you guys Harri, forthevin, Josh.

Edit:

I have managed to get texture loading and draw_sprite implemented...

As you can see there is a tad bit of a problem, DX uses ARGB, ENIGMA loads textures into RGBA :( You can tell by the sprites pixel color being off.

2683
Off-Topic / Re: YoYoGames Compiler for 300$
« on: July 29, 2013, 07:06:04 PM »
Yes, agreed senior forthevin, I have been saying this for some time, it also appears to go like a pyramid scheme with them. Remember way back in the day when the Sandbox got flooded with new users buying game maker? There were games everywhere, by the thousands, and then all of the sudden its userbase started drastically declining, that's when they decided to start with Studio going in a whole new direction, to convince customers to come back. Nobody wants to pay 800$ for buggy software that teaches them bad programming habits, my god most of what YYG added was just open source stuff like Box2D duct tapped into Game Maker, and they can't even do that well.

2684
Proposals / Re: Vertex color
« on: July 29, 2013, 07:03:27 PM »
Actually son of a bitch, I never thought about this, yeah I know what you mean now Harri, I was wondering the same thing for multiple texture coordinates with my OpenGL3 mesh class, because we also need to expand on the base model API from game maker to support multitexturing and material surfaces anyway. Now another thing, with Studio adding shaders they are also adding vertex specification functions that allow you to define a custom spec and send it to the shader, idk much about it yet, but its on their technical blog, we need to read up on that some as well.

And Harri, halp me with DX ~ :)

2685
Well not only that forthevin but we have already had people here whose hardware supports DirectX10 and 11 but not OpenGL 1, you know how Micro$hit likes to be. This will definitely increase the compatibility of our engine, its just a matter of hardware is all. And though you can forget about the likely possibility of Xbox port, this does make ENIGMA much more portable if we were to do so for various Windows platforms, including Windows Phone. There is also a difference between the API's let us not forget Game Maker was designed with Direct3D for most of its rendering, and OpenGL has been causing visual anomalies in some games just due to the difference in their function specifications. Also with DirectX you can switch between software and vertex processing at runtime, there is no such thing as an immediate mode in DX which makes the code much more durable.

Anyway, I have implemented some projection, color, lighting, fog, and transform functions, please merge.
https://github.com/enigma-dev/enigma-dev/pull/278
My primary focus is to get sprites, backgrounds, and models/primitives working and hopefully we can set it as the default Graphics System for Win32. When this occurs I will set up a Direct3D 10 and 11 graphics system, most of the code should just be copy and paste work.