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

Proposals / Re: GL3 changes from immediate to retained mode
« on: August 03, 2013, 12:57:38 AM »
Harri, another thing about this is that DX has FVF or Flexible Vertex Format.

General ENIGMA / Model Index Buffers
« on: August 03, 2013, 12:39:50 AM »
//Are these functions really needed? They just break stuff!

Whoever left me that gold fucking nugget in the source code, here is my response: Yes

Game Maker traditionally does not provide functions for passing indices to the index buffer, making it pretty awful for optimized models. If you don't know how an index buffer works, then Google it. I would prefer that topics be posted here under "General ENIGMA" for discussion by all developers, lets try to avoid comments like this in the source code from now on guys, ok? Please proceed to discuss a change in the function specification if you like, I am open to other idea's.

I am also wanting us to add a...
Code: [Select]
void d3d_model_push_colordata(gs_scalar* data);
void d3d_model_push_texturedata(gs_scalar* data);
and also maybe like this...
Code: [Select]
void d3d_model_push_colordata(int dslist);
So that a pointer to an array can be passed by the end programmer to push an entire array or data structure list of color data into the model, avoiding for loops and shit.

General ENIGMA / Frustum Culling and View Hashing
« on: August 03, 2013, 12:33:39 AM »

Well this is obviously an easy way we can get games speeded up. I am talking of course of adding a quadtree for culling 2D objects outside the view. I don't intend or am I even suggesting to implement this for the draw_sprite commands or anything, just simply for objects who are set a sprite and do not have a draw event and by default simply draw their sprite.

The reason is because sometimes people implement their own view bounds checking, for instance, cheeseboy does in his Raptor Blasters game. Also programmers may have their own methods of making their game faster that our method might impede. Therefore I am only suggesting this for objects that do not have draw events.

The idea is simple, we divide all the objects update into a quadtree based on their local x and y and mask, then simply draw only the ones in view by default.

Off-Topic / Re: Marshmellos Do you like them white, brown, or black?
« on: August 02, 2013, 10:55:28 PM »
Meh, I'm more of a smores or dip your Oreo's in milk kind of guy :P

General ENIGMA / Re: Half Pixel Alignment, OpenGL and DirectX
« on: August 02, 2013, 08:12:31 PM »
Actually, just to update on this, this problem is specific to D3D 9. It looks awful Josh, we have to do something about it, the solution does work for OpenGL 1, but D3D 9 is notorious for this problem.

General ENIGMA / Direct3D 10 and Windows Software Development Kit
« on: August 02, 2013, 07:20:01 PM »
Well after investigating why I had problems with adding a Direct3D 10 graphics system, I have figured out why. MinGW ships the D3D 9 headers and libraries but only one of the D3D10 headers and two of its libs libd3d10 and libd3dx10, the d3dx10.h header is needed for transformations and vector classes. So this means regardless of installation we need to add the requirement for users that want D3D10 or later to install the Windows SDK, which now directly includes the DirectX SDK, they are no longer separate. This is a huge SDK, and in turn requires .net Framework 4, meaning we also need to add a dependency for that if people want the D3D10 or later graphics. I think this is why YYG's are still using D3D9. Thoughts guys?

Edit: Studio also requires you to install .net 4 and .net 3.5 for Windows 8

So should we just focus on .net framework 4, and be a step ahead of them?

General ENIGMA / Re: Delusions of Grandeur
« on: August 02, 2013, 04:26:49 PM »

General ENIGMA / Re: Delusions of Grandeur
« on: August 02, 2013, 01:31:12 AM »
Everything looks fine to me :P Josh, please lay down the crack pipe, stop smoking pcp, and seek professional help.

General ENIGMA / Half Pixel Alignment, OpenGL and DirectX
« on: August 01, 2013, 02:27:16 AM »
As some of you may not be aware, vector graphics require a half pixel align or else there are edge artifacts, anybody who has worked with SVG's knows about this. Anyway, DX and OGL require you do the half pixel alignment yourself for 2D rendering. Now Josh's original proposal to me was to just shift the ortho projection function by (-0.5,-0.5) and that appeared to work because I was using draw_rectangle. Now this does not fix it for every draw function, as x and y are by default float because of gs_scalar and what both graphics API's use internally. This means if you call say draw_sprite(random(room_width), random(room_height)); you'll end up with half the sprites half pixel aligned and the other half of them not. The only way I could resolve it locally was to cast to integer before passing the coordinates to the draw functions and then letting the projection matrix shift (-0.5, -0.5)

The only solution to this I can think of is to either explicitly require integer for x and y with 2D drawing functions (which breaks them for transforming say a sprite into a 3D billboard as float is still the highest precision allowed). We could create a separate scalar for 2D x and y drawing functions so people can easily choose their cast. Or we can manually enter (-0.5, -0.5) to every single 2D drawing function. Looking for input on this you guys, specifically you, Josh Dreamyland.

Proposals / Re: GL3 changes from immediate to retained mode
« on: August 01, 2013, 02:21:56 AM »
Only vertex shaders could help there.
Exactly, it is OpenGL 3, the goal was to rewrite all of it to use shaders. In fact, just Google, I found all the basic immediate mode functions recreated into shaders yesterday somewhere, lost the link :/, but it was open source.

General ENIGMA / DirectX Models and Primitives
« on: August 01, 2013, 02:19:21 AM »
Yes, I already spoke on this a bit before, but Direct3D offers an internal mesh class that can do optimization and has interfaces for dynamic level of detail (LOD), and can also by default load (*.x) model files, which models can be exported from Blender in.

From what I can gather however, the mesh class works with triangle lists internally, however you can get a pointer and control locking and unlocking of its index and vertex buffer, however I was looking at the specification for DrawSubet()
D3DX Meshes use indexed triangle lists, and are therefore drawn with IDirect3DDevice9::DrawIndexedPrimitive.

So I am unsure if we can use this to create models that can have other primitive types. It is however possible for us to make it so that people only thing they are using the other primitive types and just hack them all into triangle lists, after all that is the fastest way to do it, that is *the* primitive of the GPU. Quads all that shit are on there way out and are already software processed in OpenGL 3 and later.

Also, when the base mesh interface loads a (*.x) model file it also gives you the file name from its material telling you where its texture is located. The base mesh interface holds transformation, texture, and material information, so we would also need to add a d3d_model_get_texture() function to avoid having inaccessible textures in memory. Just looking for some input guys... I want to say just go ahead and use it but idk, I would have to hack in and fake other primitive types, which albeit would be really fast anyway, but idk if you guys are ok with me doing that or what or if we should just write our own mesh interface like I did with OpenGL 3.

Proposals / Re: GL3 changes from immediate to retained mode
« on: July 31, 2013, 08:31:27 PM »
Well I would also like to mention that contrary to Josh's belief the D3D9 sprite batcher can also render tiled sprites by simply setting the source rectangle larger than the bounds and enabling texture repetition render state...

The only thing I don't know about is, whether I should force texture repetition on and leave it on in the sampler when these functions get called or implement a perplexed system for checking whether its enabled and then disable it again.

Proposals / Re: GL3 changes from immediate to retained mode
« on: July 31, 2013, 05:41:18 PM »
Code: [Select]
draw_sprite(spr_wall, 0, 0);


That is possible in Game Maker and using the DX batching class. DX can also outperform this with different textured sprites, I presume because of batching, and it must be mixing it with a shader. If we add all that to the OpenGL one Harri committed, we could make it a LOT faster than what he has right now.

General ENIGMA / Re: Scalar Types
« on: July 31, 2013, 05:36:49 PM »
Do you mean why didn't I? I thought I avoided making alpha gs_scalar like the plague.

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

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.